summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-16 09:56:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-16 09:56:34 +0000
commit051a5b08d2ef1e157e4899701e5a01bbbcd660b2 (patch)
tree55ec19372036f146512ff18d01e4f7b63b8d07e2
parent2bd099b099d597a46ca636845a017b151e08ce2a (diff)
downloadruby-051a5b08d2ef1e157e4899701e5a01bbbcd660b2.tar.gz
* merged from trunk r25728:26678.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/mvm@26679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--.gitignore1
-rw-r--r--.merged-trunk-revision2
-rw-r--r--ChangeLog2330
-rw-r--r--Makefile.in15
-rw-r--r--NEWS38
-rw-r--r--README.EXT6
-rw-r--r--array.c174
-rw-r--r--bcc32/Makefile.sub13
-rw-r--r--benchmark/report.rb4
-rw-r--r--benchmark/runc.rb4
-rw-r--r--bignum.c123
-rwxr-xr-xbootstraptest/runner.rb4
-rw-r--r--bootstraptest/test_eval.rb2
-rw-r--r--bootstraptest/test_flow.rb21
-rw-r--r--bootstraptest/test_io.rb3
-rw-r--r--bootstraptest/test_jump.rb12
-rw-r--r--bootstraptest/test_syntax.rb48
-rw-r--r--bootstraptest/test_thread.rb58
-rw-r--r--class.c15
-rw-r--r--common.mk26
-rw-r--r--compile.c11
-rw-r--r--configure.in961
-rw-r--r--cont.c10
-rw-r--r--defs/known_errors.def23
-rw-r--r--dir.c29
-rw-r--r--dln.c28
-rw-r--r--dmyversion.c2
-rw-r--r--doc/rubygems/ChangeLog5529
-rw-r--r--doc/rubygems/History.txt799
-rw-r--r--doc/rubygems/LICENSE.txt53
-rw-r--r--doc/rubygems/README40
-rw-r--r--enc/big5.c51
-rw-r--r--enc/trans/big5-uao-tbl.rb19784
-rw-r--r--enc/trans/big5.trans5
-rw-r--r--enc/trans/gb18030-tbl.rb32
-rw-r--r--enc/trans/gb18030.trans110
-rw-r--r--enc/trans/newline.trans26
-rw-r--r--enc/trans/utf8_mac.trans6
-rw-r--r--encoding.c72
-rw-r--r--enum.c183
-rw-r--r--enumerator.c150
-rw-r--r--error.c36
-rw-r--r--eval.c36
-rw-r--r--eval_intern.h1
-rw-r--r--ext/bigdecimal/bigdecimal.c137
-rw-r--r--ext/bigdecimal/bigdecimal_en.html52
-rw-r--r--ext/curses/view2.rb228
-rw-r--r--ext/digest/digest.c31
-rw-r--r--ext/digest/lib/digest.rb26
-rw-r--r--ext/dl/callback/depend15
-rw-r--r--ext/dl/callback/extconf.rb14
-rw-r--r--ext/dl/callback/mkcallback.rb238
-rw-r--r--ext/dl/cfunc.c4
-rw-r--r--ext/dl/closure.c230
-rw-r--r--ext/dl/cptr.c2
-rw-r--r--ext/dl/dl.c17
-rw-r--r--ext/dl/dl.h12
-rw-r--r--ext/dl/dl_conversions.c38
-rw-r--r--ext/dl/dl_conversions.h10
-rw-r--r--ext/dl/extconf.rb22
-rw-r--r--ext/dl/lib/dl/callback.rb51
-rw-r--r--ext/dl/lib/dl/closure.rb19
-rw-r--r--ext/dl/lib/dl/func.rb64
-rw-r--r--ext/dl/lib/dl/import.rb9
-rw-r--r--ext/dl/lib/dl/value.rb11
-rw-r--r--ext/dl/method.c251
-rw-r--r--ext/extmk.rb66
-rw-r--r--ext/iconv/charset_alias.rb3
-rw-r--r--ext/iconv/extconf.rb1
-rw-r--r--ext/iconv/iconv.c12
-rw-r--r--ext/iconv/mkwrapper.rb4
-rw-r--r--ext/openssl/ossl_ssl.c3
-rw-r--r--ext/pty/pty.c6
-rw-r--r--ext/purelib.rb2
-rw-r--r--ext/readline/readline.c4
-rw-r--r--ext/socket/addrinfo.h46
-rw-r--r--ext/socket/ancdata.c8
-rw-r--r--ext/socket/basicsocket.c33
-rw-r--r--ext/socket/depend2
-rw-r--r--ext/socket/extconf.rb50
-rw-r--r--ext/socket/getaddrinfo.c15
-rw-r--r--ext/socket/getnameinfo.c5
-rw-r--r--ext/socket/init.c2
-rw-r--r--ext/socket/ipsocket.c67
-rw-r--r--ext/socket/raddrinfo.c33
-rw-r--r--ext/socket/rubysocket.h2
-rw-r--r--ext/socket/socket.c74
-rw-r--r--ext/stringio/stringio.c36
-rw-r--r--ext/strscan/strscan.c6
-rw-r--r--ext/tk/lib/tk.rb12
-rw-r--r--ext/tk/lib/tk/variable.rb10
-rw-r--r--ext/tk/lib/tkextlib/tcllib/plotchart.rb4
-rw-r--r--ext/tk/sample/tkballoonhelp.rb18
-rw-r--r--ext/tk/tkutil/tkutil.c20
-rw-r--r--ext/win32ole/lib/win32ole.rb22
-rw-r--r--ext/win32ole/win32ole.c120
-rw-r--r--ext/zlib/doc/zlib.rd917
-rw-r--r--ext/zlib/extconf.rb3
-rw-r--r--ext/zlib/zlib.c76
-rw-r--r--file.c257
-rw-r--r--gc.c9
-rw-r--r--gem_prelude.rb23
-rw-r--r--hash.c64
-rw-r--r--include/ruby.h2
-rw-r--r--include/ruby/defines.h16
-rw-r--r--include/ruby/intern.h7
-rw-r--r--include/ruby/missing.h7
-rw-r--r--include/ruby/ruby.h5
-rw-r--r--include/ruby/st.h2
-rw-r--r--include/ruby/util.h6
-rw-r--r--include/ruby/win32.h6
-rw-r--r--insns.def77
-rw-r--r--io.c178
-rw-r--r--iseq.c8
-rw-r--r--lib/cgi.rb1
-rw-r--r--lib/cgi/core.rb6
-rw-r--r--lib/cgi/util.rb2
-rw-r--r--lib/csv.rb10
-rw-r--r--lib/delegate.rb85
-rw-r--r--lib/drb/eq.rb2
-rw-r--r--lib/find.rb40
-rw-r--r--lib/getoptlong.rb7
-rw-r--r--lib/irb/extend-command.rb22
-rw-r--r--lib/mathn.rb4
-rw-r--r--lib/matrix.rb103
-rw-r--r--lib/minitest/spec.rb42
-rw-r--r--lib/minitest/unit.rb64
-rw-r--r--lib/mkmf.rb79
-rw-r--r--lib/monitor.rb30
-rw-r--r--lib/net/ftp.rb20
-rw-r--r--lib/net/http.rb75
-rw-r--r--lib/net/https.rb46
-rw-r--r--lib/net/imap.rb39
-rw-r--r--lib/net/telnet.rb4
-rw-r--r--lib/pathname.rb59
-rw-r--r--lib/pstore.rb1
-rw-r--r--lib/rake.rb2
-rw-r--r--lib/rdoc/generator/html.rb4
-rw-r--r--lib/rdoc/markup/to_html_crossref.rb2
-rw-r--r--lib/rdoc/parser/ruby.rb2
-rw-r--r--lib/resolv.rb161
-rw-r--r--lib/rexml/document.rb18
-rw-r--r--lib/rexml/formatters/default.rb4
-rw-r--r--lib/rexml/parent.rb1
-rw-r--r--lib/rexml/parsers/baseparser.rb2
-rw-r--r--lib/rexml/rexml.rb2
-rw-r--r--lib/rexml/text.rb8
-rw-r--r--lib/rss/maker/base.rb47
-rw-r--r--lib/rubygems.rb29
-rw-r--r--lib/rubygems/command.rb4
-rw-r--r--lib/rubygems/command_manager.rb7
-rw-r--r--lib/rubygems/commands/setup_command.rb44
-rw-r--r--lib/rubygems/defaults.rb6
-rw-r--r--lib/rubygems/format.rb2
-rw-r--r--lib/rubygems/indexer.rb12
-rw-r--r--lib/rubygems/installer.rb2
-rw-r--r--lib/rubygems/package_task.rb4
-rw-r--r--lib/rubygems/platform.rb2
-rw-r--r--lib/rubygems/security.rb6
-rw-r--r--lib/rubygems/source_index.rb48
-rw-r--r--lib/rubygems/source_info_cache.rb4
-rw-r--r--lib/rubygems/spec_fetcher.rb23
-rw-r--r--lib/rubygems/test_utilities.rb31
-rw-r--r--lib/rubygems/validator.rb8
-rw-r--r--lib/rubygems/version.rb2
-rw-r--r--lib/securerandom.rb1
-rw-r--r--lib/set.rb33
-rw-r--r--lib/shell/command-processor.rb4
-rwxr-xr-xlib/tempfile.rb40
-rw-r--r--lib/thread.rb5
-rw-r--r--lib/time.rb40
-rw-r--r--lib/un.rb40
-rw-r--r--lib/uri/common.rb4
-rw-r--r--lib/uri/generic.rb4
-rw-r--r--lib/webrick/accesslog.rb12
-rw-r--r--lib/webrick/config.rb2
-rw-r--r--lib/webrick/httprequest.rb6
-rw-r--r--lib/webrick/https.rb4
-rw-r--r--lib/webrick/httpservlet/cgihandler.rb4
-rw-r--r--lib/webrick/httpservlet/filehandler.rb6
-rw-r--r--lib/webrick/httpstatus.rb32
-rw-r--r--lib/webrick/httputils.rb4
-rw-r--r--lib/webrick/ssl.rb1
-rw-r--r--lib/yaml/rubytypes.rb4
-rw-r--r--marshal.c92
-rw-r--r--math.c31
-rw-r--r--misc/ruby-mode.el8
-rw-r--r--missing/alloca.c2
-rw-r--r--missing/vsnprintf.c2
-rw-r--r--node.c921
-rw-r--r--node.h1
-rw-r--r--numeric.c58
-rw-r--r--object.c32
-rw-r--r--parse.y162
-rw-r--r--prelude.rb2
-rw-r--r--proc.c19
-rw-r--r--process.c4
-rw-r--r--random.c3
-rw-r--r--re.c81
-rw-r--r--regcomp.c12
-rw-r--r--regerror.c22
-rw-r--r--regexec.c8
-rw-r--r--regint.h2
-rw-r--r--regparse.c1
-rw-r--r--ruby.c14
-rw-r--r--sample/coverage.rb2
-rw-r--r--sample/occur2.rb11
-rw-r--r--sample/test.rb2
-rw-r--r--signal.c13
-rw-r--r--sprintf.c4
-rw-r--r--st.c2
-rw-r--r--strftime.c14
-rw-r--r--string.c128
-rw-r--r--symbian/setup8
-rw-r--r--template/known_errors.inc.tmpl4
-rw-r--r--test/bigdecimal/test_bigdecimal.rb18
-rw-r--r--test/cgi/test_cgi_cookie.rb4
-rw-r--r--test/cgi/test_cgi_core.rb4
-rw-r--r--test/cgi/test_cgi_multipart.rb26
-rw-r--r--test/cgi/test_cgi_session.rb8
-rw-r--r--test/cgi/test_cgi_util.rb6
-rw-r--r--test/csv/test_table.rb6
-rw-r--r--test/date/test_date_parse.rb7
-rw-r--r--test/digest/test_digest.rb16
-rw-r--r--test/digest/test_digest_extend.rb145
-rw-r--r--test/digest/test_digest_hmac.rb3
-rw-r--r--test/dl/test_base.rb2
-rw-r--r--test/dl/test_callback.rb42
-rw-r--r--test/dl/test_closure.rb130
-rw-r--r--test/dl/test_cptr.rb13
-rw-r--r--test/dl/test_dl2.rb12
-rw-r--r--test/dl/test_func.rb34
-rw-r--r--test/dl/test_handle.rb33
-rw-r--r--test/dl/test_method.rb11
-rw-r--r--test/drb/drbtest.rb5
-rw-r--r--test/drb/test_drb.rb2
-rw-r--r--test/drb/test_drbssl.rb2
-rw-r--r--test/drb/test_drbunix.rb2
-rw-r--r--test/erb/test_erb_m17n.rb36
-rw-r--r--test/fileutils/test_dryrun.rb2
-rw-r--r--test/fileutils/test_fileutils.rb4
-rw-r--r--test/matrix/test_matrix.rb311
-rw-r--r--test/matrix/test_vector.rb102
-rw-r--r--test/minitest/test_mini_test.rb33
-rw-r--r--test/mkmf/base.rb3
-rw-r--r--test/mkmf/test_find_executable.rb36
-rw-r--r--test/monitor/test_monitor.rb4
-rw-r--r--test/net/imap/test_imap.rb39
-rw-r--r--test/net/imap/test_imap_response_parser.rb66
-rw-r--r--test/open-uri/test_open-uri.rb2
-rw-r--r--test/open-uri/test_ssl.rb2
-rw-r--r--test/openssl/test_asn1.rb2
-rw-r--r--test/openssl/test_config.rb15
-rw-r--r--test/openssl/test_ns_spki.rb2
-rw-r--r--test/openssl/test_pkcs7.rb2
-rw-r--r--test/openssl/test_ssl.rb2
-rw-r--r--test/openssl/test_x509cert.rb2
-rw-r--r--test/openssl/test_x509crl.rb2
-rw-r--r--test/openssl/test_x509req.rb2
-rw-r--r--test/openssl/test_x509store.rb2
-rw-r--r--test/optparse/test_getopts.rb1
-rw-r--r--test/optparse/test_noarg.rb2
-rw-r--r--test/optparse/test_optarg.rb2
-rw-r--r--test/optparse/test_placearg.rb2
-rw-r--r--test/optparse/test_reqarg.rb2
-rw-r--r--test/resolv/test_dns.rb107
-rw-r--r--test/rexml/test_document.rb29
-rw-r--r--test/ripper/dummyparser.rb2
-rw-r--r--test/ripper/test_files.rb3
-rw-r--r--test/ripper/test_filter.rb3
-rw-r--r--test/ripper/test_parser_events.rb654
-rw-r--r--test/ripper/test_scanner_events.rb3
-rw-r--r--test/rss/test_maker_0.9.rb17
-rw-r--r--test/ruby/enc/test_utf16.rb2
-rw-r--r--test/ruby/envutil.rb128
-rw-r--r--test/ruby/test_alias.rb27
-rw-r--r--test/ruby/test_array.rb129
-rw-r--r--test/ruby/test_basicinstructions.rb6
-rw-r--r--test/ruby/test_beginendblock.rb12
-rw-r--r--test/ruby/test_bignum.rb23
-rw-r--r--test/ruby/test_case.rb6
-rw-r--r--test/ruby/test_class.rb11
-rw-r--r--test/ruby/test_complex.rb5
-rw-r--r--test/ruby/test_defined.rb7
-rw-r--r--test/ruby/test_dir.rb39
-rw-r--r--test/ruby/test_dir_m17n.rb193
-rw-r--r--test/ruby/test_econv.rb20
-rw-r--r--test/ruby/test_encoding.rb15
-rw-r--r--test/ruby/test_enum.rb34
-rw-r--r--test/ruby/test_enumerator.rb40
-rw-r--r--test/ruby/test_env.rb2
-rw-r--r--test/ruby/test_exception.rb62
-rw-r--r--test/ruby/test_file.rb4
-rw-r--r--test/ruby/test_file_exhaustive.rb2
-rw-r--r--test/ruby/test_float.rb22
-rw-r--r--test/ruby/test_fnmatch.rb2
-rw-r--r--test/ruby/test_hash.rb26
-rw-r--r--test/ruby/test_integer.rb23
-rw-r--r--test/ruby/test_io_m17n.rb8
-rw-r--r--test/ruby/test_iterator.rb6
-rw-r--r--test/ruby/test_literal.rb20
-rw-r--r--test/ruby/test_m17n.rb100
-rw-r--r--test/ruby/test_m17n_comb.rb2
-rw-r--r--test/ruby/test_marshal.rb150
-rw-r--r--test/ruby/test_method.rb20
-rw-r--r--test/ruby/test_module.rb66
-rw-r--r--test/ruby/test_object.rb20
-rw-r--r--test/ruby/test_primitive.rb6
-rw-r--r--test/ruby/test_proc.rb15
-rw-r--r--test/ruby/test_process.rb38
-rw-r--r--test/ruby/test_range.rb68
-rw-r--r--test/ruby/test_rational.rb5
-rw-r--r--test/ruby/test_regexp.rb9
-rw-r--r--test/ruby/test_require.rb19
-rw-r--r--test/ruby/test_rubyoptions.rb33
-rw-r--r--test/ruby/test_settracefunc.rb25
-rw-r--r--test/ruby/test_sprintf_comb.rb2
-rw-r--r--test/ruby/test_string.rb20
-rw-r--r--test/ruby/test_struct.rb30
-rw-r--r--test/ruby/test_symbol.rb4
-rw-r--r--test/ruby/test_system.rb4
-rw-r--r--test/ruby/test_thread.rb2
-rw-r--r--test/ruby/test_time.rb61
-rw-r--r--test/ruby/test_transcode.rb19
-rw-r--r--test/ruby/test_undef.rb37
-rw-r--r--test/ruby/test_variable.rb8
-rw-r--r--test/ruby/test_yield.rb32
-rw-r--r--test/rubygems/gem_package_tar_test_case.rb4
-rw-r--r--test/rubygems/insure_session.rb2
-rw-r--r--test/rubygems/simple_gem.rb30
-rw-r--r--test/rubygems/test_gem.rb10
-rw-r--r--test/rubygems/test_gem_commands_dependency_command.rb4
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb20
-rw-r--r--[-rwxr-xr-x]test/rubygems/test_gem_digest.rb0
-rw-r--r--test/rubygems/test_gem_doc_manager.rb2
-rw-r--r--test/rubygems/test_gem_indexer.rb89
-rw-r--r--test/rubygems/test_gem_package_tar_input.rb2
-rw-r--r--test/rubygems/test_gem_package_tar_writer.rb6
-rw-r--r--test/rubygems/test_gem_source_index.rb6
-rw-r--r--test/rubygems/test_gem_spec_fetcher.rb18
-rw-r--r--test/rubygems/test_gem_specification.rb2
-rw-r--r--test/rubygems/test_gem_version.rb4
-rw-r--r--test/socket/test_unix.rb2
-rw-r--r--test/stringio/test_stringio.rb2
-rw-r--r--test/strscan/test_stringscanner.rb2
-rw-r--r--test/test_delegate.rb81
-rw-r--r--test/test_find.rb224
-rw-r--r--test/test_ipaddr.rb3
-rw-r--r--test/test_mathn.rb10
-rw-r--r--test/test_open3.rb4
-rw-r--r--test/test_prime.rb10
-rw-r--r--test/test_set.rb3
-rw-r--r--test/test_time.rb9
-rw-r--r--test/uri/test_ldap.rb4
-rw-r--r--test/webrick/test_cgi.rb34
-rw-r--r--test/webrick/test_filehandler.rb68
-rw-r--r--test/webrick/test_httpauth.rb2
-rw-r--r--test/webrick/test_httpproxy.rb14
-rw-r--r--test/webrick/test_httpserver.rb2
-rw-r--r--test/webrick/test_server.rb12
-rw-r--r--test/win32ole/test_win32ole_param.rb17
-rw-r--r--test/xmlrpc/test_cookie.rb2
-rw-r--r--test/xmlrpc/test_webrick_server.rb6
-rw-r--r--test/xmlrpc/webrick_testing.rb2
-rw-r--r--test/yaml/test_array.rb18
-rw-r--r--test/yaml/test_boolean.rb37
-rw-r--r--test/yaml/test_class.rb18
-rw-r--r--test/yaml/test_exception.rb46
-rw-r--r--test/yaml/test_hash.rb18
-rw-r--r--test/yaml/test_null.rb20
-rw-r--r--test/yaml/test_omap.rb56
-rw-r--r--test/yaml/test_set.rb31
-rw-r--r--test/yaml/test_string.rb45
-rw-r--r--test/yaml/test_struct.rb33
-rw-r--r--test/yaml/test_symbol.rb22
-rw-r--r--test/yaml/test_yaml.rb26
-rw-r--r--test/yaml/test_yaml_properties.rb64
-rw-r--r--test/zlib/test_zlib.rb14
-rw-r--r--thread.c57
-rw-r--r--thread_pthread.c85
-rw-r--r--thread_pthread.h3
-rw-r--r--thread_win32.c23
-rw-r--r--time.c111
-rwxr-xr-xtool/compile_prelude.rb2
-rwxr-xr-xtool/eval.rb6
-rw-r--r--[-rwxr-xr-x]tool/install-sh17
-rwxr-xr-xtool/mkconfig.rb8
-rwxr-xr-xtool/rbinstall.rb24
-rwxr-xr-xtool/transcode-tblgen.rb2
-rw-r--r--transcode.c28
-rw-r--r--transcode_data.h3
-rw-r--r--util.c4
-rw-r--r--variable.c50
-rw-r--r--version.c26
-rw-r--r--version.h4
-rw-r--r--vm.c66
-rw-r--r--vm_core.h14
-rw-r--r--vm_dump.c6
-rw-r--r--vm_eval.c121
-rw-r--r--vm_insnhelper.c93
-rw-r--r--vm_insnhelper.h3
-rw-r--r--vm_method.c27
-rw-r--r--win32/Makefile.sub21
-rwxr-xr-xwin32/configure.bat25
-rwxr-xr-xwin32/mkexports.rb2
-rwxr-xr-xwin32/resource.rb2
-rw-r--r--win32/setup.mak5
-rw-r--r--win32/win32.c51
408 files changed, 39182 insertions, 4410 deletions
diff --git a/.gitignore b/.gitignore
index 645d1c4f02..e2ded6f987 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
*.bak
*.dylib
*.inc
+*.o
*.orig
*.rej
*.sav
diff --git a/.merged-trunk-revision b/.merged-trunk-revision
index d2e929faed..935f7281b6 100644
--- a/.merged-trunk-revision
+++ b/.merged-trunk-revision
@@ -1 +1 @@
-25728
+26678
diff --git a/ChangeLog b/ChangeLog
index 0140b7db52..11e57ed330 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,2059 @@
+Tue Feb 16 11:03:19 2010 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/dl/method.c: Adding DL::Method as a superclass for DL::Function
+
+Mon Feb 15 23:37:30 2010 Tanaka Akira <akr@fsij.org>
+
+ * io.c: check lseek error by errno. NetBSD 4.0.1 may return -1 as
+ a file position of tty.
+
+Mon Feb 15 23:08:56 2010 Tanaka Akira <akr@fsij.org>
+
+ * lib/pstore.rb (PStore#initialize): initialize @thread_safe.
+ [ruby-core:27853]
+
+Mon Feb 15 22:45:26 2010 Tanaka Akira <akr@fsij.org>
+
+ * st.c (st_foreach): don't access ptr->hash after func call.
+ It may access freed area.
+
+Mon Feb 15 22:25:16 2010 Tanaka Akira <akr@fsij.org>
+
+ * ext/zlib/zlib.c (zlib_mem_alloc): suppress valgrind warnings.
+ http://www.zlib.net/zlib_faq.html#faq36
+
+Mon Feb 15 22:18:49 2010 Tanaka Akira <akr@fsij.org>
+
+ * time.c (time_add): propagate fixed time offset.
+
+Mon Feb 15 17:42:20 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * signal.c (USE_SIGALTSTACK): NetBSD can't use sigaltstack(2)
+ with pthread.
+ http://netbsd.gw.com/cgi-bin/man-cgi?sigaltstack++NetBSD-current
+
+Mon Feb 15 13:11:47 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * array.c (rb_ary_push_m): use rb_ary_modify instead of
+ rb_ary_modify_check. This fixes regression due to r26632.
+
+Sun Feb 14 12:54:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * marshal.c (r_object0): removed duplicated entry for regexp.
+ [ruby-dev:40416]
+
+Sun Feb 14 04:45:31 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * marshal.c (r_object0): register regexp object before encoding
+ name. [ruby-dev:40414]
+
+ * re.c (rb_reg_alloc, rb_reg_init_str): split from rb_reg_new_str.
+
+Sat Feb 13 17:07:20 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * array.c (rb_ary_delete): RDoc update. a patch from Hugh Sasse.
+ [ruby-core:28128]
+
+ * array.c (rb_ary_compact_bang): ditto.
+
+Sat Feb 13 15:01:24 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * marshal.c (id2encidx): duplicated entry for encoding name.
+ [ruby-dev:40388]
+
+Sat Feb 13 12:17:52 2010 Tanaka Akira <akr@fsij.org>
+
+ * lib/tempfile.rb (Tempfile::Remover): new class to replace
+ Tempfile.callback. port r24902 from Ruby 1.8.
+
Sat Feb 13 07:11:57 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * (ruby_vm_send_signal): deal with signals properly.
+ * thread.c (ruby_vm_send_signal): deal with signals properly.
+
+Fri Feb 12 17:55:21 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm.c (thread_free): fixed typo.
+
+Fri Feb 12 02:27:39 2010 Akinori MUSHA <knu@iDaemons.org>
+
+ * lib/set.rb (Set#initialize, Set#replace, Set#merge)
+ (Set#subtract, Set#&): Fix duck type tests. [ruby-core:28078]
+
+ * lib/set.rb (Set#initialize, Set#replace, Set#merge)
+ (Set#subtract, Set#&): Try #each if #each_entry fails.
+
+Thu Feb 11 20:43:00 2010 Tanaka Akira <akr@fsij.org>
+
+ * io.c (rb_io_oflags_modestr): return "r" for O_RDONLY|O_APPEND.
+ [ruby-dev:40379]
+
+Thu Feb 11 19:19:21 2010 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * missing/alloca.c: s/RUBY_LIB/RUBY_LIB_PREFIX/ [ruby-dev:40395]
+
+Thu Feb 11 17:52:11 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm.c (vm_exec): reset thread state before restarting vm loop
+ from catch scope. [ruby-core:28129], [ruby-core:28143]
+
+Thu Feb 11 14:43:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * marshal.c (r_object0): read sequentially since marshal source
+ may not be possible to rewind. [ruby-dev:40386]
+
+ * marshal.c (r_object0): replace non-1.8 escapes directly.
+
+Thu Feb 11 09:49:31 2010 Tanaka Akira <akr@fsij.org>
+
+ * lib/resolv.rb: fix [ruby-core:28144] reported by Hans de Graaff.
+ (Resolv::DNS#make_requester): pass nameserver_port to
+ UnconnectedUDP.new.
+ (Resolv::DNS.bind_random_port): change the is_ipv6 argument to
+ bind_host.
+ (Resolv::DNS::Requester#initialize): change instance variable to
+ store multiple sockets.
+ (Resolv::DNS::Requester#request): pass readable sockets to
+ recv_reply.
+ (Resolv::DNS::Requester#close): close all sockets.
+ (Resolv::DNS::Requester::UnconnectedUDP#initialize): allocate
+ a socket for each address family of name servers.
+ (Resolv::DNS::Requester::UnconnectedUDP#recv_reply): read from the
+ passwd readable socket.
+ (Resolv::DNS::Requester::UnconnectedUDP#sender): use appropriate
+ socket for the target nameserver.
+ (Resolv::DNS::Requester::ConnectedUDP): follow the instance variable
+ change.
+ (Resolv::DNS::Requester::TCP#sender): ditto.
+ (Resolv::DNS::Config#nameserver_port): new method.
+
+Thu Feb 11 01:45:04 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm.c (vm_exec): temporarily revert r26628, which causes SEGV when
+ executing rubyspec.
+
+Wed Feb 10 16:31:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * array.c (rb_ary_push_m, rb_ary_unshift_m, rb_ary_aset),
+ (rb_ary_insert, rb_ary_replace, rb_ary_concat),
+ (rb_ary_uniq_bang, rb_ary_flatten_bang): check if frozen after
+ wrong number of arguments but before TypeError.
+ [ruby-core:28140]
+
+ * hash.c (rb_hash_replace): ditto.
+
+ * string.c (rb_str_replace): ditto.
+
+Wed Feb 10 04:06:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm.c (vm_exec): reset thread state before starting vm loop.
+ [ruby-core:28129]
+
+Tue Feb 9 23:48:25 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_divide): fix precision too.
+
+Tue Feb 9 23:26:07 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): fix precision.
+ [ruby-core:17472][ruby-dev:35372][ruby-dev:40105][ruby-dev:40358]
+
+Tue Feb 9 22:23:27 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * io.c (READ_CHECK): do not select fd before reading, that had made
+ TCPServer#gets stuck. [ruby-dev:40317]
+
+Tue Feb 9 21:27:38 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/rexml/text.rb (REXML::Text#initialize): REXML::Text.new checks
+ raw text for illegal characters without entity check, for the sake
+ of 1.8 compatibility. This had caused rubyspec error.
+
+Mon Feb 8 23:49:24 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * io.c (rb_io_getline_fast): wrong calculation of new position
+ from rb_str_coderange_scan_restartable(). [ruby-core:28103]
+
+ * io.c (read_all): ditto.
+
+ * sprintf.c (rb_str_format): ditto.
+
+Mon Feb 8 21:03:53 2010 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/socket.c (socket_s_ip_address_list): obtain the scope_id
+ of IPv6 link local address on OpenSolaris.
+
+Mon Feb 8 16:27:57 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * dmyversion.c: empty load path in miniruby.
+
+ * common.mk (COMPILE_PRELUDE): rbconfig is loaded on demand.
+
+ * tool/eval.rb, win32/{mkexports,resource}.rb: miniruby no longer
+ contains "." in $:.
+
+Mon Feb 8 15:15:07 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * object.c (rb_obj_clone): call initialize_clone hook method to
+ call initialize_copy.
+
+ * object.c (rb_obj_dup): call initialize_dup hook.
+
+ * lib/delegate.rb (Delegator#initialize_clone): use new hook to
+ implement deep copy. [ruby-dev:40242]
+
+ * lib/delegate.rb (Delegator#initialize_dup): ditto.
+
+ * test/test_delegate.rb (TestDelegateClass#test_copy_frozen): add
+ a test to ensure #clone copies frozen status.
+
+Mon Feb 8 10:28:58 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * configure.in: check pthread_attr_getstack to prevent obsolete
+ warning for pthread_attr_getstackaddr.
+
+Sun Feb 7 23:12:34 2010 Tanaka Akira <akr@fsij.org>
+
+ * sample/test.rb: sort files for syntax validation.
+
+Sun Feb 7 23:08:53 2010 Tanaka Akira <akr@fsij.org>
+
+ * bootstraptest/runner.rb: sort test files.
+
+Sun Feb 7 12:53:12 2010 Tanaka Akira <akr@fsij.org>
+
+ * lib/rake.rb (Rake::FileList::ARRAY_METHODS): fix test failure by <=>
+ definition at Kernel.
+
+Sun Feb 7 03:01:46 2010 Tanaka Akira <akr@fsij.org>
+
+ * math.c (math_lgamma): initialize sign because
+ lgamma(NaN) doesn't set the sign in OpenSolaris.
+
+Sun Feb 7 00:23:21 2010 Shugo Maeda <shugo@ruby-lang.org>
+
+ * class.c (rb_class_init_copy): raise a TypeError if the argument is
+ BasicObject. [ruby-core:27060]
+
+Sat Feb 6 23:37:11 2010 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/ftp.rb (initialize): set @sock to a NullSocket instance to
+ raise FTPConnectionError when not connected. [ruby-dev:40258]
+
+Sat Feb 6 23:25:57 2010 Shugo Maeda <shugo@ruby-lang.org>
+
+ * ext/curses/view2.rb: replaced with Hugh Sasse's version.
+ [ruby-core:27894]
+
+Sat Feb 6 22:57:00 2010 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/imap.rb (receive_responses): does not hang when an
+ unexpected BYE response received. fixed [ruby-core:27944].
+ Thanks, Bob Potter.
+
+Sat Feb 6 21:31:23 2010 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/monitor.rb (wait): supported timeout.
+
+ * test/net/imap/test_imap.rb (test_exception_during_idle): use timeout.
+
+Sat Feb 6 19:35:16 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * tool/compile_prelude.rb: fix require path.
+
+Sat Feb 6 12:02:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/delegate.rb (Delegator#method_missing),
+ (Delegator.delegating_block): don't hide backtrace from
+ __getobj__ and reduced exception messages when $DEBUG.
+
+Sat Feb 6 11:35:08 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/socket/ipsocket.c (ip_addr, ip_peeraddr),
+ ext/socket/socket.c (sock_s_getaddrinfo): added optional
+ reverse_lookup flag. [ruby-core:28007]
+
+Sat Feb 6 01:55:02 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/stringio/stringio.c (strio_ungetc): pads with \000 when the
+ current position is after the end. [ruby-dev:40271]
+
+Sat Feb 6 01:14:54 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/purelib.rb, common.mk: to simulate ruby command more precisely,
+ remove "." from $: of virtual environment for build and test.
+
+Sat Feb 6 00:02:31 2010 Tanaka Akira <akr@fsij.org>
+
+ * random.c (fill_random_seed): don't use O_NOFOLLOW because
+ /dev/urandom is a symlink in OpenSolaris.
+
+ * lib/securerandom.rb (SecureRandom.random_bytes): ditto.
+
+Fri Feb 5 16:38:08 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/delegate.rb (Delegator): include copy of Kernel.
+ [ruby-dev:40314]
+
+ * lib/delegate.rb (Delegator#{dup,clone}): class of copy should be
+ Delegator. [ruby-dev:40313]
+
+Fri Feb 5 09:26:54 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * bignum.c (big_op): remove unused variables.
+
+Fri Feb 5 02:06:57 2010 Aaron Patterson <tenderlove@ruby-lang.org>
+
+ * lib/yaml/rubytypes.rb: Struct members are emitted without a leading
+ colon. Thanks Yusuke Endoh! [ruby-core:28052]
+
+ * test/yaml/test_struct.rb: fixed tests to go with Struct changes
+
+ * test/yaml/test_yaml.rb: fixed tests to go with Struct changes
+
+Fri Feb 5 00:34:24 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * bignum.c (big_gt, big_ge, big_lt, big_ge): added Bignum#>, >=, < and
+ <= to allow to compare with BigDecimal. [ruby-dev:40167]
+
+Thu Feb 4 15:47:27 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * thread_pthread.c (native_thread_init_stack): use get_stack.
+ patched by KOSAKI Motohiro [ruby-dev:40309]
+
+ * thread_pthread.c (ruby_init_stack): use get_stack
+ on platforms which have pthread_attr_get_np.
+ (FreeBSD, DragonFlyBSD and NetBSD)
+ This is because FreeBSD and DragonFly BSD must use
+ pthread_attr_get_np to get stack size of main thread,
+ but Mac OS X and Linux with LinuxThreads must use getrlimit.
+ <http://www.nminoru.jp/~nminoru/programming/stackoverflow_handling.html>
+ <http://d.hatena.ne.jp/nurse/20100204>
+
+Thu Feb 4 09:55:38 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: FreeBSD, DragonFly BSD and OpenBSD needs
+ pthread_np.h to use pthread_*_np functions.
+ OpenBSD's pthread_*_np also depend sys/signal.h,
+ but it is included at signal.h via vm_core.h via thread.c.
+
+Thu Feb 4 08:15:53 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/delegate.rb (Delegator): now inherits BasicObject.
+ [ruby-dev:39154], [Bug #2679], [ruby-dev:40242]
+
+Thu Feb 4 03:00:59 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): get red of
+ floating point exception.
+
+Thu Feb 4 01:24:01 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): fix infinity
+ handling. 1 / Infinity was evaluated to NaN.
+
+Thu Feb 4 00:37:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * time.c (time_mdump, time_mload): dump/load utc_offset.
+ [ruby-dev:40063]
+
+Wed Feb 3 22:22:30 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: check for non-portable stack attribute functions.
+
+Wed Feb 3 20:10:52 2010 Tanaka Akira <akr@fsij.org>
+
+ * ext/iconv/charset_alias.rb: pass block argument to outer local
+ variable.
+
+Wed Feb 3 20:08:05 2010 Tanaka Akira <akr@fsij.org>
+
+ * file.c (realpath_rec): rb_path_last_separator may return NULL.
+
+Wed Feb 3 13:15:24 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * thread_pthread.c: DragonFlyBSD is also the same as FreeBSD
+ on getting the stack size of the main thread.
+
+Wed Feb 3 12:30:10 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * thread_pthread.c (ruby_init_stack): use pthread_get_attr_np
+ to get the stack size of the main thread on FreeBSD.
+
+ * thread_pthread.c: include pthread_np.h on FreeBSD.
+
+Wed Feb 3 11:38:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/dl/{closure,function}.c: removed C99 features and warnings.
+
+Wed Feb 3 10:12:09 2010 Aaron Patterson <tenderlove@ruby-lang.org>
+
+ * ext/dl/function.c: DL::Function now uses libffi
+
+ * ext/dl/cfunc.c (rb_dl_set_last_error): set to non static so errors
+ can be exposed.
+
+ * ext/dl/closure.c: DL::Closure will now be used in place of
+ ext/dl/callback/*.
+
+ * ext/dl/dl.c: legacy callbacks removed in favor of libffi
+
+ * ext/dl/dl_conversions.(c,h): used for converting ruby types to FFI
+ types.
+
+ * ext/dl/callback/*: replaced by libffi callbacks.
+
+ * ext/dl/lib/dl/callback.rb: Converting internal callbacks to use
+ DL::Closure
+
+ * ext/dl/lib/dl/closure.rb: Ruby parts of the new DL::Closure object
+
+ * ext/dl/lib/dl/import.rb: More conversion to use DL::Closure object
+
+ * ext/dl/lib/dl/value.rb (ruby2ffi): adding private method for
+ DL::CPtr to ffi value conversion.
+
+Tue Feb 2 18:15:12 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/socket/socket.c: turn on do_not_reverse_lookup by default,
+ which has been reverted in r9880 probably unintentionally,
+ according to matz. [ruby-core:24530]
+
+Tue Feb 2 14:46:06 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * enumerator.c: move implementation of each_slice, each_cons,
+ each_with_object to enum.c.
+
+ * enum.c (each_slice_i): convert multiple values from yield into
+ an array.
+
+ * enum.c (each_cons_i): ditto.
+
+ * enum.c (each_with_object_i): ditto.
+
+Tue Feb 2 14:30:27 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * enum.c (enum_each_entry): new method #each_entry to pack values
+ from yield into an array.
+
+ * lib/set.rb (Set#merge): use Enumerable#each_entry to implement
+ Set compatible to 1.8 behavior. [ruby-core:27985]
+
+ * lib/set.rb: replace is_a?(Enumerable) with respond_to?(:each)
+ for duck typing.
+
+ * lib/set.rb (SortedSet#add): typo fixed.
+
+Tue Feb 2 11:13:56 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/delegate.rb (Delegator#marshal_dump): exclude
+ delegator-specific instance variables.
+
+Mon Feb 1 21:26:41 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/matrix.rb (Vector#each2): returns a self. [ruby-dev:40241]
+
+Mon Feb 1 17:08:42 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * numeric.c (flo_minus): RDoc update. a patch from red stun
+ in [ruby-core:27951]
+
+Mon Feb 1 07:36:33 2010 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
+
+ * ext/tk/tkutil/tkutil.c: fix SEGV on TkUtil::CallbackSubst._setup_subst_table.
+
+ * ext/tk/lib/tk.rb: [ruby1.9] fix freeze at exit.
+
+ * ext/tk/lib/tk.rb: [POTENTIAL INCOMPATIBLE] return NoMethodError
+ for TkWindow#to_ary and to_str.
+
+ * ext/tk/lib/tkextlib/tcllib/plotchart.rb: wrong arguments.
+
+ * ext/tk/sample/tkballoonhelp.rb: fail to support TkEntry widgets.
+
+Sun Jan 31 23:20:43 2010 wanabe <s.wanabe@gmail.com>
+
+ * io.c (rb_io_each_codepoint): use cbuf when needs readconv.
+
+Sun Jan 31 23:07:23 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_dir.rb: use string instead of symbol as file name.
+
+Sun Jan 31 22:41:33 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * string.c (rb_string_value): fix the previous commit.
+
+Sun Jan 31 21:43:35 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * string.c (rb_string_value): make no exception for Symbol.
+ [ruby-dev:40274]
+
+Sun Jan 31 21:10:15 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm_insnhelper.c (vm_throw): fixed infinite loop. [ruby-core:27969]
+
+Sun Jan 31 21:29:58 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/rexml/text.rb (REXML::Text#initialize): do Text.check only when
+ parent is specified, since Text.check may need doctype. partially
+ revert r26518.
+
+Sun Jan 31 15:50:34 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/rexml/text.rb (REXML::Text#initialize): fix typo and a bug that
+ seems to be caused by refactoring.
+
+Sun Jan 31 15:46:37 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/rexml/parent.rb (REXML::Parent#delete): return the deleted node
+ because the rdoc of REXML::Element#delete_element says it returns
+ "the element that was removed." [REXMLTracker#161]
+
+Sun Jan 31 14:33:00 2010 James Edward Gray II <jeg2@ruby-lang.org>
+
+ * lib/csv.rb: A bug fix for deleting blank Table rows from Andy Hartford.
+
+Sun Jan 31 13:31:43 2010 wanabe <s.wanabe@gmail.com>
+
+ * gc.c (obj_free): free rb_classext_t of eigenclass. [Bug #1392]
+
+Sun Jan 31 13:00:14 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/rexml/document.rb (REXML::Document#add): fix duplicate XMLDecls
+ and bad DocTypes in REXML::Document. (Bug #19058) [ruby-core:27979]
+ based on the patch by Federico Builes.
+
+Fri Jan 29 22:49:21 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/getoptlong.rb (set_options): ensure that the type of argument is
+ Array, restoring this check that was deleted at r10239. This caused
+ rubyspec error.
+
+Fri Jan 29 12:59:33 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (mingw): needs $(DEFFILE) for extension libraries.
+ [ruby-core:27946]
+
+Fri Jan 29 11:09:49 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (try_do): log no source when no development env.
+
+ * lib/mkmf.rb (create_makefile): srcprefix always needs $(srcdir).
+
+ * lib/mkmf.rb (create_makefile): yield configuration if a block is
+ given.
+
+Fri Jan 29 09:43:30 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * enc/trans/utf8_mac.trans (buf_shift_char): don't see uninitialised
+ value. [ruby-dev:40233]
+
+Fri Jan 29 01:42:24 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/delegate.rb (Delegator#initialize_copy): use initialize_copy
+ instead of overriding clone/dup. [ruby-dev:40221]
+ it now always clones the target, it might cause incompatibility.
+
+Fri Jan 29 01:26:53 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): update RDoc to
+ denote that #to_i raises FloatDomainError for Inf and NaN.
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): fast #to_i using
+ BigDecimal_split().
+
+ * bignum.c (conv_digit): use faster ISDIGIT() assuming ASCII.
+
+Fri Jan 29 00:18:54 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/cgi.rb: set autoload to CGI::HtmlExtension. [ruby-dev:40194]
+
+Thu Jan 28 09:44:19 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * regcomp.c (onig_compile): initialize ScanEnv.
+ mainly to initialize env->warnings_flag [ruby-dev:40196]
+
+ * regparse.c (scan_env_clear): clear warnings_flag.
+
+Wed Jan 27 23:33:21 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/matrix/test_matrix.rb, test/matrix/test_vector.rb: add some
+ tests.
+
+Wed Jan 27 23:29:36 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/thread.rb (ConditionVariable#wait, signal, broadcast): return
+ self (for 1.8 compatibility).
+
+Wed Jan 27 23:27:54 2010 Keiju Ishitsuka <keiju@emperor2.pendome>
+
+ * lib/matrix.rb: add exception Matrix::ErrOperationNotImplemented
+ [ruby-dev:40149].
+ * lib/matrix.rb: change message of exception
+ Matrix::ErrOperationNotDefined [ruby-dev:40150], [ruby-dev:40176].
+ * lib/matrix.rb: add method Vector#/ [ruby-dev:40151].
+ * lib/matrix.rb(Matrix::Scalar#+,-,/): delete meaningless when
+ switch. [ruby-dev:40149]
+
+Wed Jan 27 23:22:54 2010 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * vm_dump.c (bugreport_backtrace): trivial change.
+
+ * vm_dump.c (rb_vm_bugreport): uninitialized local variable i.
+ [ruby-dev:40169]
+
+ * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_segv_test):
+ follow above change.
+
+Wed Jan 27 23:20:52 2010 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/ruby/test_exception.rb
+ (TestException#test_thread_signal_location):
+ change test method name.
+
+Wed Jan 27 22:48:40 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/matrix.rb (determinant): fix name error.
+
+Wed Jan 27 22:26:25 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm_eval.c (rb_backtrace): "circular require" warning was output to
+ stdout except the first line. All line is output to stderr now.
+ [ruby-dev:40147]
+
+Wed Jan 27 00:22:20 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod, BigDecimal_mod,
+ BigDecimal_divmod, BigDecimal_div2): BigDecimal#% and #div returned
+ an array itself that was returned by #divmod.
+
+Wed Jan 27 00:19:30 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/bigdecimal/bigdecimal.c (VpCtoV): do not raise infinity
+ exception for BigDecimal("0E200000000000").
+
+Tue Jan 26 21:50:31 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/bigdecimal/bigdecimal.c (VpCtoV): BigDecimal("0E200000000000")
+ was Infinity, not 0.
+
+ * test/bigdecimal/test_bigdecimal.rb: add a test for above.
+
+Tue Jan 26 21:36:22 2010 Tanaka Akira <akr@fsij.org>
+
+ * configure.in: test unsetenv returns a value.
+ unsetenv is void in older BSDs (FreeBSD 6 and OpenBSD 4.5 at least).
+
+ * hash.c (ruby_setenv): don't use the result of unsetenv if unsetenv
+ doesn't return a value.
+
+Tue Jan 26 21:32:03 2010 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/extconf.rb: suppress a warning.
+
+ * ext/extmk.rb: ditto.
+
+Tue Jan 26 20:23:22 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm.c (rb_vm_invoke_proc): this function must not catch TAG_RETURN
+ because vm_exec does. This caused rubyspec error. [ruby-dev:40158]
+
+Tue Jan 26 20:21:28 2010 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
+
+ * lib/drb/eq.rb: fix circular require in drb.
+ reported by akr. see [ruby-dev:40156] [ruby-core:27661]
+
+
+Tue Jan 26 19:59:17 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc. [Bug #2656]
+ patched by Hugh Sasse [ruby-core:27692] [ruby-core:27852]
+
+ * ext/zlib/doc/zlib.rd: removed.
+
+Tue Jan 26 16:43:34 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/strscan/strscan.c: fix rdoc. (length -> bytesize)
+ reported by Kornelius Kalnbach. see [ruby-core:27792]
+
+Tue Jan 26 07:06:05 2010 Tanaka Akira <akr@fsij.org>
+
+ * lib/matrix.rb: suppress warnings.
+
+Tue Jan 26 03:16:45 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * cont.c, vm_core.h, eval.c: because rb_protect must not be jumped by
+ callcc, revert r26407. And rename trap_tag to protect_tag and
+ change exception message (across trap -> across stack rewinding
+ barrier).
+
+Mon Jan 25 23:08:10 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * thread.c (do_select): wrong conditions. [ruby-core:27753]
+
+Mon Jan 25 22:31:53 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/envutil.rb: use method_defined? instead of
+ instance_methods.include?.
+
+Mon Jan 25 22:08:20 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * cont.c (rb_cont_call, cont_restore_1): remove trap_tag check because
+ it seems not to make sense. [ruby-dev:40121]
+
+ * vm_core.h, eval.c (rb_protect): ditto.
+
+Mon Jan 25 21:43:05 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/envutil.rb: fix the check if instance method `ruby' is
+ defined or not.
+
+Mon Jan 25 21:17:32 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_rubyoptions.rb (test_segv_test): add a test for
+ bugreport trace dumper.
+
+Mon Jan 25 17:47:02 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/pty/pty.c (pty_check): needs WNOHANG to poll, return $?, and
+ call raise_from_check() with pid_t. [ruby-dev:40141]
+
+Mon Jan 25 17:36:11 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * version.c (RUBY_LIB, RUBY_*_LIB): moved from configures.
+
+Mon Jan 25 12:11:45 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * signal.c (USE_SIGALTSTACK): only when SA_SIGINFO also is
+ available. see [ruby-core:27768].
+
+Mon Jan 25 12:02:34 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * dln.c, file.c, io.c, signal.c: add __HAIKU__.
+ patched by Alexander von Gluck [ruby-core:27767]
+
+Mon Jan 25 11:45:47 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * math.c (domain_check): ignore errno if y is inf.
+ r26335 is because NetBSD 5.0's asin and acos returns
+ 0.0 with errno EDOM. But it breaks Linux whose gamma returns inf
+ with errno ERANGE on.
+
+Sun Jan 24 22:48:05 2010 Koichi Sasada <ko1@atdot.net>
+
+ * eval.c, vm.c, vm_eval.c, vm_insnhelper.c: fix issues about
+ return and c-return trace. This issue skips (c-)return event
+ with global jump such as break or return. This fix make vm invoke
+ hooks at stack rewind timing. fix [ruby-core:27606] [Bug #2610].
+
+ * test/ruby/test_settracefunc.rb: add a test for above.
+
+Sun Jan 24 14:21:48 2010 Tanaka Akira <akr@fsij.org>
+
+ * string.c (rb_enc_strlen_cr): increment by rb_enc_mbminlen(enc) for
+ broken byte sequence. [ruby-core:27748]
+ (rb_str_inspect): ditto.
+
+Sun Jan 24 05:18:34 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread.c (thread_start_func_2): unlock all locking mutexes
+ before clean up. [ruby-core:26877]
+
+ * thread.c (rb_thread_atfork): no other threads to be joined.
+
+ * vm_core.h (rb_thread_lock_unlock, rb_thread_lock_destroy):
+ new functions.
+
+ * vm.c (ruby_vm_destruct): unlock and destroy global VM lock.
+
+Sun Jan 24 00:31:39 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rdoc/parser/ruby.rb: fix typo.
+ patched by Hal Brodigan [ruby-core:21536]
+
+Sun Jan 24 00:02:18 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rdoc/markup/to_html_crossref.rb: fix failure of the test.
+ patched by Tomoyuki Chikanaga and nobu [ruby-core:20564]
+
+Sat Jan 23 23:27:12 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * dir.c (dir_s_glob): add rdoc by Roger Pack. [ruby-core:27669]
+
+Sat Jan 23 23:12:56 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rdoc/generator/html.rb (RDoc::Generator::HTML#gen_into):
+ make the rdoc(generating html) run faster and use less memory.
+ patch by Tetsu Soh [ruby-core:27656]
+
+Sat Jan 23 19:54:48 2010 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * ext/win32ole/win32ole.c: add WIN32OLE.ole_initialize,
+ WIN32OLE.ole_uninitialize to use in win32ole.rb.
+ You must not use these methods.
+
+ * ext/win32ole/lib/win32ole.rb: add win32ole.rb
+ re-define Thread#initialize (fix ruby-core:27634)
+
+Sat Jan 23 00:25:19 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * sample/coverage.rb: preserve exit status.
+
+Sat Jan 23 00:21:18 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_dir.rb: get rid of debug print.
+
+ * test/ruby/test_module.rb: fixed to make test-all work.
+
+Fri Jan 22 23:54:04 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_array.rb: add a test for Array#rotate, rotate!.
+
+ * test/ruby/test_dir.rb, test/ruby/test_fnmatch.rb: add some tests
+ (for coverage of dir.c).
+
+ * test/ruby/test_enum.rb: add a test for Enumerable#minmax.
+
+ * test/ruby/test_enumerator.rb: add some tests for Enumerator#inspect,
+ Enumerator::Generator and Yielder.
+
+ * test/ruby/test_env.rb: add a test for ENV#index.
+
+ * test/ruby/test_exception.rb: add some tests (for coverage of
+ error.c).
+
+ * test/ruby/test_hash.rb: add a test for recursive check.
+
+ * test/ruby/test_integer.rb: add a test for number of argument of
+ Integer.
+
+ * test/ruby/test_method.rb: add a test for define_method.
+
+ * test/ruby/test_module.rb: add a test for constant of included
+ module.
+
+ * test/ruby/test_proc.rb: add a test for parameters with cfunc.
+
+Fri Jan 22 23:50:03 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_regexp.rb, test/ruby/test_symbol.rb,
+ test/ruby/test_variable.rb: add some tests (for coverage of
+ compile.c).
+
+Fri Jan 22 21:05:34 2010 Tanaka Akira <akr@fsij.org>
+
+ * time.c (time_mload): add submicro into vtm.subsecx. [ruby-dev:40133]
+
+Fri Jan 22 14:26:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * common.mk (rdoc): needs encodings and exts.
+
+Fri Jan 22 14:16:18 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: add missing comma.
+
+Fri Jan 22 01:07:16 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_bignum.rb, test/ruby/test_class.rb,
+ test/ruby/test_defined.rb, test/ruby/test_hash.rb,
+ test/ruby/test_primitive.rb, test/ruby/test_variable.rb: add some
+ tests (for coverage).
+
+Fri Jan 22 01:03:28 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_require.rb (test_define_class): expect TypeError
+ instead of NameError. [ruby-core:27504]
+
+Thu Jan 21 15:09:35 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * configure.in: some tidy.
+
+Thu Jan 21 11:15:46 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * array.c (rb_ary_rotate): new methods, Array#rotate! and
+ Array#rotate. [ruby-dev:17194]
+
+ * array.c (rb_ary_reverse_m): copy directly.
+
+Thu Jan 21 09:38:00 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: use AS_CASE instead of when, to get rid of
+ an unintentional substitution.
+
+Thu Jan 21 08:45:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * iseq.c (iseq_s_disasm): check for proc first. based on the
+ patch by Roger Pack in [ruby-core:27626]. [ruby-core:27227]
+
+Wed Jan 20 16:09:59 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * common.mk (compile.$(OBJEXT)): dependencies lacking.
+
+ * vm_method.c (rb_add_method_cfunc): invalid initializer for C89
+
+ * compile.c (iseq_insns_unification): int might be smaller than int*
+
+Tue Jan 19 20:00:30 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/resolv.rb (Resolv::Config.default_config_hash): return an
+ empty hash when resolv.conf is not available. [ruby-core:27620]
+
+ * lib/resolv.rb (Resolv::DNS::Config#lazy_initialize): fixed the
+ defaults of nameserver and port.
+
+Tue Jan 19 14:29:16 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * Makefile.in (clean-ext): allow glob patterns.
+
+ * ext/extmk.rb: ditto.
+
+Tue Jan 19 14:19:26 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/zlib/{extconf.rb, zlib.c): crc32_combine and adler32_combine is
+ supported on Zlib 1.2.2.1, so check them for old zlib.
+
+Tue Jan 19 09:03:37 2010 Aaron Patterson <tenderlove@ruby-lang.org>
+
+ * ext/zlib/zlib.c: added Zlib.crc32_combine and Zlib.adler32_combine
+
+ * test/zlib/test_zlib.rb: corresponding tests [ruby-core:27551]
+
+
+Tue Jan 19 02:02:32 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_array.rb: add some tests (for coverage).
+
+ * test/ruby/test_bignum.rb: ditto.
+
+Tue Jan 19 01:57:12 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * test/ruby/test_bignum.rb: some coerce definitions (for test) was
+ wrong.
+
+Tue Jan 19 01:53:11 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * bignum.c (bigsub_int): remove nonsense loop.
+
+Tue Jan 19 01:42:36 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * parse.y (top_compstmt, top_stmts, top_stmt): prohibit BEGIN {} in
+ non-toplevel scope. [ruby-core:21657]
+
+ * test/ruby/test_beginendblock.rb (test_begininclass): add a test for
+ above.
+
+Mon Jan 18 17:16:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/webrick/httpservlet/filehandler.rb (make_partial_content):
+ add bytes-unit. [ruby-dev:40030]
+
+Mon Jan 18 15:49:42 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/net/http.rb (Net::HTTPHeader#{content_range,range_length}):
+ use inclusive range same as the header representation.
+
+Mon Jan 18 03:59:57 2010 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/digest/digest.c (rb_digest_instance_hexdigest_bang): Fix
+ rdoc.
+
+ * ext/digest/lib/digest.rb (Digest::Class.base64digest)
+ (Digest::Instance#base64digest{,!}): New methods.
+
+Sun Jan 17 22:48:44 2010 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/digest/digest.c (rb_digest_instance_digest)
+ (rb_digest_instance_hexdigest): Save a method call of reset()
+ for a disposable clone.
+
+Sun Jan 17 19:24:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * math.c (domain_check): check errno first.
+ NetBSD 5.0's asin and acos returns 0.0 with errno EDOM.
+
+Sun Jan 17 14:24:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/iconv/iconv.c (rb_str_derive): use long.
+
+ * ext/iconv/iconv.c (iconv_convert): suppress a warning.
+
+ * lib/mkmf.rb (check_signedness): new method.
+
+ * lib/mkmf.rb (have_header, create_header): use String#tr_cpp.
+
+Thu Jan 14 13:06:58 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * numeric.c (flo_hash, int_chr): fixed type.
+
+Thu Jan 14 12:50:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_str_concat): fixed range check for Fixnum, and
+ added checks for integer overflow and invalid char code.
+
+Thu Jan 14 09:34:31 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * string.c (rb_str_concat): raise RangeError when the argument is
+ negative value. [ruby-core:27583]
+
+Thu Jan 14 08:49:59 2010 Tanaka Akira <akr@fsij.org>
+
+ * time.c (time_to_r): convert to rational if internal representation
+ is not rational.
+
+Thu Jan 14 04:01:50 2010 Tanaka Akira <akr@fsij.org>
+
+ * time.c (time_mdump): use nano_num and nano_den instead of subnano to
+ avoid Rational class in marshaled data which prevent unmarshal by
+ Ruby 1.8.
+ (time_mload): use nano_num and nano_den.
+
+Wed Jan 13 11:57:38 2010 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * object.c (rb_class_initialize): Make sure BasicObject doesn't get
+ initialized twice [ruby-core:27577]
+
+ * class.c (rb_class_init_copy): ditto
+
+Wed Jan 13 06:54:44 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: check for if struct timezone is defined.
+
+ * missing.h (struct timezone): define if not defined.
+
+ * win32/win32.h (struct timezone): defined in the newer w32api.
+ [ruby-core:27515]
+
+Wed Jan 13 00:33:09 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/shell/command-processor.rb: fix typo by Sho Hashimoto.
+ reported and patched at [ruby-dev:40058] [Bug #2599]
+
+Tue Jan 12 23:48:29 2010 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/rss/maker/base.rb, test/rss/test_maker_0.9.rb:
+ accept any time format in maker. [ruby-core:26923]
+
+Tue Jan 12 21:56:00 2010 Tanaka Akira <akr@fsij.org>
+
+ * string.c (rb_str_set_len): call rb_str_modify.
+
+ * file.c (realpath_rec): don't call rb_str_modify before
+ rb_str_set_len.
+
+Tue Jan 12 20:44:14 2010 Tanaka Akira <akr@fsij.org>
+
+ * file.c (realpath_internal): call rb_secure.
+
+Tue Jan 12 16:48:46 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/net/http.rb (Net::HTTP.start): options may not be given.
+
+Tue Jan 12 16:48:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/readline/readline.c (readline_readline): check if instream
+ is closed instead of fd 0.
+
+ * ext/readline/readline.c (Init_readline): use STDIN for input.
+ Reported by Sora Harakami. See
+ http://d.hatena.ne.jp/codnote/20100111/1263174134
+
+Tue Jan 12 16:09:02 2010 wanabe <s.wanabe@gmail.com>
+
+ * test/ruby/test_process.rb (test_execopts_env): MANDATORY_ENVS might
+ not be a part of ENV. e.g. TMPDIR.
+
+Tue Jan 12 14:07:31 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/net/http.rb (Net::HTTP.start): add hash argument to
+ set ssl related options. when use_ssl is set default value
+ of verify_mode is OpenSSL::SSL::VERIFY_PEER. [ruby-dev:40003]
+
+Tue Jan 12 14:53:07 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (init_env): use _wputenv() instead of
+ SetEnvironmentVariableW() because latter doesn't set msvcrt's environ
+ work area, of course.
+ [Bug #2552]
+
+Tue Jan 12 13:33:54 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * file.c (realpath_rec): trace symbolic link only when supporting
+ readlink().
+
+Tue Jan 12 12:49:39 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * misc/ruby-mode.el (ruby-here-doc-beg-match): fix for here-doc
+ which ends with an underscore.
+
+Tue Jan 12 09:58:03 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * hash.c: need to include errno.h for EINVAL.
+
+ * hash.c (ruby_setenv): fixed typo. see [ruby-dev:40026]
+
+Tue Jan 12 09:22:43 2010 Tanaka Akira <akr@fsij.org>
+
+ * prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]
+
+ * include/ruby/intern.h: declare rb_dir_getwd.
+
+ * dir.c (rb_dir_getwd): copied from dir_s_getwd to export.
+ (dir_s_getwd): use rb_dir_getwd.
+
+ * file.c (rb_file_s_realpath): new method File.realpath.
+ (rb_file_s_realdirpath): new method File.realdirpath.
+
+ * lib/pathname.rb (Pathname#realpath): use File.realpath.
+ (Pathname#realdirpath): use File.realdirpath.
+
+Mon Jan 11 22:45:08 2010 Akinori MUSHA <knu@iDaemons.org>
+
+ * hash.c (ruby_setenv): Improve the emulation of setenv(3) on
+ environments where putenv(3) is used. Raise EINVAL If a
+ variable name contains an '='.
+
+Mon Jan 11 18:16:38 2010 wanabe <s.wanabe@gmail.com>
+
+ * vm_insnhelper.h (GET_BLOCK_PTR): return 0 when in class frame.
+ [Bug #2583]
+
+Mon Jan 11 16:52:05 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * string.c (rb_str_strlen): added. [ruby-dev:40028]
+
+ * include/ruby/intern.h (rb_str_strlen): declared.
+
+Mon Jan 11 13:30:35 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/webrick/accesslog.rb (WEBrick::AccessLog#format): fixed typo.
+
+ * lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::Status#initialize):
+ accept 0 or more arguments. [ruby-dev:40021]
+
+Mon Jan 11 12:47:58 2010 Akinori MUSHA <knu@iDaemons.org>
+
+ * hash.c (ruby_setenv): ENV.[]= should raise an error if setenv(3)
+ or putenv(3) fails. [ruby-dev:40023]
+
+Sun Jan 10 17:25:24 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/webrick/accesslog.rb : Escape needed.
+
+ * lib/webrick/httpstatus.rb : ditto.
+
+ * lib/webrick/httprequest.rb : ditto.
+
+ * lib/webrick/httputils.rb : ditto.
+
+ * test/webrick/test_cgi.rb (TestWEBrickCGI::test_bad_): Test for it.
+
+Sun Jan 10 04:54:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * class.c (rb_define_class): raise TypeError same as class
+ statement. [ruby-core:27504]
+
+Sun Jan 10 04:41:20 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (configuration): needs ARCH_FLAG.
+
+Sat Jan 9 14:20:54 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * common.mk (install-all): maybe typo.
+
+Sat Jan 9 14:01:14 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * missing/vsnprintf.c (BSD_vfprintf): get rid of a warning of VC++ x64.
+
+Sat Jan 9 08:40:54 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * win32/configure.bat (WIN32DIR): regularise file separators.
+
+Fri Jan 8 23:35:18 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * proc.c (mnew): don't check visibility of method body if public
+ ZSUPER method is found. [ruby-dev:39767]
+
+ * test/ruby/test_method.rb: add a test for above.
+
+Fri Jan 8 22:59:40 2010 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm_method.c (rb_alias): skip ZSUPER method when searching body of
+ source method. [ruby-dev:39760]
+
+ * test/ruby/test_alias.rb: add a test for above.
+
+Fri Jan 8 21:15:21 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/net/http, lib/net/https: move content from net/https to
+ net/http. [ruby-dev:39986]
+
+Fri Jan 8 14:06:01 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * io.c (rb_io_s_read): close the IO if an exception is raised on
+ seeking. [ruby-core:27429]
+
+Fri Jan 8 13:12:26 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * marshal.c (w_symbol): dump no encoding for 7bit only coderange
+ symbol. [ruby-core:27375]
+
+Thu Jan 7 07:56:09 2010 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/minitest/*.rb: Imported minitest 1.5.0 r5596.
+ * test/minitest/*.rb: ditto.
+
+Tue Jan 5 19:30:53 2010 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/ruby/test_exception.rb: add a test. cf [ruby-dev:39116]
+
+Tue Jan 5 02:03:34 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in (DTRACE): clear this when `dtrace -l` fails.
+ Note that current FreeBSD needs privilege to call it;
+ so to use DTrace on FreeBSD, you should run configure as root.
+
+Mon Jan 4 21:24:18 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * gc.c: added UNLIKELY to probes for optimization.
+
+ * vm.c: ditto.
+
+ * thread.c: ditto.
+
+Mon Jan 4 09:30:54 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/Makefile.sub (TRACING_MODEL): follow yugui's previous changes.
+
+Mon Jan 4 09:30:25 2010 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * thread_win32.c (InterlockedExchangePointer): old SDK support.
+
+Sun Jan 3 23:54:51 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * trace.h: new file. wraps tracing mechanisms.
+
+ * defs/dtrace.d: new file. defined a dtrace provider "ruby".
+
+ * include/ruby/ruby.h (LIKELY): moved from vm.c.
+ (UNLIKELY): ditto.
+ (OBJSETUP): probe "object-create".
+ (RUBY_EVENT_RESCUE): new event.
+
+ * vm_exec.c (DEBUG_ENTER_INSN): embedded a probe insn-entry into it.
+ (DEBUG_END_INSN): insn-return.
+
+ * vm.c (LIKELY): moved into ruby.h.
+ (UNLIKELY): ditto.
+ (Init_BareVM): embedded a probe "raise" into it.
+
+ * variable.c (rb_class2name_without_alloc): new utility function.
+
+ * tool/rbinstall.rb (install?(:ext, :arch, :'ext-arch')): installs
+ dtrace.d if necessary.
+
+ * thread_pthread.c (add_signal_thread_list): probe "raise".
+ (rb_thread_create_timer_thread): ditto.
+
+ * thread.c (rb_thread_schedule_rec): probes "thread-enter" and
+ "thread-leave",
+ (thread_start_func_2): ditto.
+ (thread_cleanup_func): probe "thread-term"
+
+ * lib/mkmf.rb: supports dtrace postprocessor on making an extension.
+
+ * iseq.c (rb_vm_insn_name): new utility function.
+ (rb_vm_insn_len): ditto.
+
+ * insns.def (hook): probes "method-entry", "method-return", "line",
+ and "rescue".
+
+ * compile.c (iseq_compile_each): adds a trace op for "rescue" probe.
+
+ * gc.c (garbage_collect): probes "gc-begin" and "gc-end".
+ (obj_free): probe "object-free"
+ (garbage_collect_with_gvl): probe "raise"
+ (negative_size_allocation_error): ditto.
+ (rb_memerror): ditto.
+
+ * eval.c (rb_rescue2): probe "rescue"
+ (rb_longjmp): probe "raise"
+
+ * ext/probe/probe.c: new extension for application defined probes.
+
+ * ext/probe/extconf.rb: ditto.
+
+ * configure.in (--with-tracing-model): new option to choose a tracing
+ mechanism.
+ (DTRACE): new substitution. name of dtrace(1).
+ (RUBY_TRACING_MODEL): new substitution.
+ (DTRACE_OBJ): ditto.
+ (MINIDTRACE_OBJ): ditto.
+ (GOLFDTRACE_OBJ): ditto.
+ (LIBRUBY_DTRACE_OBJ): ditto.
+ (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on
+ the system needs postprocessing.
+ (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace
+ supports USDT.
+
+ * Makefile.in:
+ (DTRACE): new variable. name of dtrace(1).
+ (TRACING_MODEL): new variable. name of the chosen tracing mechanism.
+ (DTRACE_OBJ): same as the one in configure.in.
+ (MINIDTRACE_OBJ): ditto.
+ (GOLFDTRACE_OBJ): ditto.
+ (LIBRUBY_DTRACE_OBJ): ditto.
+ (CPPOUTFILE): new substitution. necessary for generating dtrace.d
+ (trace_none.h): new target for TRACING_MODEL=none
+ (RUBY_H_INCLUDES): appended a header for tracing.
+ (distclean-local): also removes preprocessed version of dtrace.d
+ ($(LIBRUBY_A)): needs $(LIBRUBY_DTRACE_OBJ) if dtrace needs
+ postprocessing.
+ ($(PROGRAM)): ditto.
+ (golf): ditto.
+ (miniruby): ditto.
+ ($(arch_hdrdir)/ruby/dtrace.d): new target. preprocessed version
+ of defs/dtrace.d. generated if necessary.
+ ($(arch_hdrdir)/ruby/trace_dtrace.h): new target.
+ definition of probes.
+ ($(LIBRUBY_DTRACE_OBJ)): new target. generated if dtrace needs
+ postprocessing.
+ ($(DTRACE_OBJ)): ditto.
+ ($(MINIDTRACE_OBJ)): ditto.
+ ($(GOLFDTRACE_OBJ)): ditto.
+
+Sun Jan 3 15:34:19 2010 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * lib/rexml/text.rb: String no longer has #each.
+ Patch by Mitsutaka Mimura (takkanm). [ruby-dev:39949].
+
+Sun Jan 3 01:29:18 2010 Tanaka Akira <akr@fsij.org>
+
+ * lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#inspect):
+ implemented.
+
+Sat Jan 2 15:57:54 2010 Tanaka Akira <akr@fsij.org>
+
+ * lib/resolv.rb (Resolv::DNS#initialize): new option :nameserver_port.
+ (Resolv::DNS#each_resource): pass port number.
+ (Resolv::DNS#make_requester): ditto.
+ (Resolv::DNS::Config#lazy_initialize): initialize @nameserver_port
+ instead of @nameserver.
+ (Resolv::DNS::Config#single?): return port number addition to the
+ nameserver.
+ (Resolv::DNS::Config#generate_timeouts): use @nameserver_port.
+ (Resolv::DNS::Config#resolv): yield port number.
+
+Sat Jan 2 00:43:22 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/uri/common.rb (initialize_regexp): allow leading
+ and trailing white space, and forbid extra characters
+ on another lines. [ruby-core:26223]
+ RFC 3986 Appendix C. Delimiting a URI in Context
+ draft-duerst-iri-bis-07 7.2. Web Address processing
+
+Fri Jan 1 23:17:49 2010 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/uri/generic.rb (URI#normalize!): normalize case of
+ scheme. [ruby-core:27309]
+
+Fri Jan 1 00:47:57 2010 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/digest/digest.c (rb_digest_instance_method_unimpl): Suppress
+ compiler warnings.
+
+Fri Jan 1 00:00:00 2010 Tanaka Akira <akr@fsij.org>
+
+ * tool/mkconfig.rb: generate RbConfig.ruby in rbconfig.rb.
+
+ * lib/webrick/httpservlet/cgihandler.rb: use RbConfig.ruby.
+
+ * test/ruby/envutil.rb: ditto.
+
+ * benchmark/report.rb: ditto.
+
+ * benchmark/runc.rb: ditto.
+
+ * tool/eval.rb: ditto.
+
+Thu Dec 31 18:18:55 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/socket/rubysocket.h: include addrinfo.h only when using our own
+ getaddrinfo.c.
+
+Thu Dec 31 14:20:11 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * process.c (save_redirect_fd): consider EBADF that the fd is not used.
+ [ruby-dev:39938]
+
+Thu Dec 31 06:03:48 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/socket/raddrinfo.c (addrinfo_type): typed.
+
+ * ext/socket/extconf.rb: fix for wide-getaddrinfo option.
+
+ * ext/socket/addrinfo.c: rename {addr,name}info functions to ensure
+ those are used on darwin.
+
+Thu Dec 31 03:27:53 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * thread_win32.c (native_thread_destroy): decreased the probability of
+ using the interrupt event in the thread termination.
+ see [ruby-core:27199].
+
+Thu Dec 31 02:35:57 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * thread_win32.c (w32_error): should report the function.
+
+Thu Dec 31 01:58:47 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb: fix for extstatic.
+
+Wed Dec 30 19:43:00 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * include/ruby/ruby.h (RREGEXP_SRC_END): added.
+
+Wed Dec 30 19:40:00 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * include/ruby/defines.h (INFINITY): this is float.
+
+ * include/ruby/defines.h (NAN): ditto.
+
+ * numeric.c (rb_infinity): change content as float.
+
+ * numeric.c (rb_nan): ditto.
+
+Wed Dec 30 17:59:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gem_prelude.rb (push_all_highest_version_gems_on_load_path):
+ simplified.
+
+ * lib/rubygems/command_manager.rb (Gem#load_and_instantiate):
+ rescue only NameError from const_get.
+
+ * lib/rubygems/source_index.rb (Gem#load_specification): don't use
+ RUBY_VERSION to branch.
+
+ * lib/rubygems/validator.rb (Gem::TestRunner, Gem#alien): ditto.
+
+ * lib/rubygems.rb: Kernel#gem is already defined, and workaround
+ for home directory and custom_require are no longer needed.
+
+Tue Dec 29 16:03:33 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * numeric.c (Init_Numeric): Add Float::INFINITY and Float::NAN.
+ [ruby-dev:1657] [ruby-dev:4760] [ruby-list:7023]
+ [ruby-list:46690]
+ [ruby-core:26632] [ruby-talk:41352] [ruby-talk:203333]
+
+ * include/ruby/defines.h (INFINITY): defined.
+
+ * include/ruby/defines.h (NAN): defined.
+
+ * include/ruby/util.h (ruby_div0): removed.
+
+ * numeric.c (fix_pow): use INFINITY and NAN
+ instead of ruby_div0(1.0).
+
+ * marshal.c (r_object0): ditto.
+
+ * bignum.c (big_fdiv): ditto.
+
+Tue Dec 29 10:36:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/rexml/parsers/baseparser.rb (REXML::Parsers::BaseParser::STANDALONE):
+ any number spaces can be placed between equal-sign and the value.
+ patch from Ed Howland in [ruby-core:27345].
+
+Mon Dec 28 22:33:58 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (CreateChild): force to inherit standard I/O handles.
+ this change fixes [ruby-core:27273], but other side effects might
+ exist.
+
+Mon Dec 28 22:00:10 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
+
+ * test/ruby/test_marshal.rb: added tests for taintness/untrustness
+ propagation.
+
+Mon Dec 28 18:13:26 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * sample/occur2.rb: reimplemented in modern style. [ruby-dev:39927].
+
+Mon Dec 28 17:19:37 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * tool/install-sh: correction by Hiro Asari.
+ https://gist.github.com/264558/58ad1cae45cde49600bbb39286af2aae23e639d5
+
+Mon Dec 28 13:18:52 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * tool/install-sh: wrote the intention. [ruby-dev:39928]
+
+Sun Dec 27 10:45:00 2009 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * ext/win32ole/win32ole.c (foleparam_initialize): add foleparam_initialize
+ to check argument of WIN32OLE_PARAM.new
+
+ * test/win32ole/test_win32ole_param.rb (test_s_new): add some assertion
+ to test WIN32OLE_PARAM.new
+
+Sun Dec 27 09:41:54 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * tool/rbinstall.rb (install?(:local, :comm, :bin, :'bin-comm')):
+ Makes it vim friendly. __END__ in a heredoc is confusing with
+ the script end for vim.
+
+Sun Dec 27 09:13:55 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * sample/occur2.rb: have been broken. fixed for Ruby 1.9 feature.
+
+Thu Dec 24 16:32:30 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/uri/generic.rb (eql?): Check the class of the compared object.
+ Based on a patch by Peter McLain [ruby-core:27019]
+
+Thu Dec 24 15:20:03 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * regexec.c (match_at): follow enclen's change.
+
+Thu Dec 24 12:08:00 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/delegate.rb (marshal_dump/load): dump & load instance variables
+ by default [ruby-core:24211]
+
+Thu Dec 24 10:31:50 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/object.c (rb_obj_cmp): Default <=> operator returns 0 if
+ objects are == [ruby-core:24063]
+
+Wed Dec 23 09:12:31 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/cgi/test_cgi_multipart.rb (CGIMultipartTest#_prepare):
+ always must be binary mode. c.f. Bug#2341
+
+Thu Dec 10 09:20:58 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * encoding.c (Init_Encoding): undef Encoding.new because
+ a class which is rb_undef_alloc-func-ed can't call new method.
+ [ruby-dev:39862]
+
+ * vm.c (Init_VM): undef RubyVM.new and RubyVM::Env.new.
+
+Mon Dec 21 17:51:44 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * regcomp.c (optimize_node_left): include equal on the condition of for-loop.
+ This bug also affects original Oniguruma. [ruby-core:27247]
+
+Mon Dec 21 10:03:33 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * regcomp.c (print_enc_string): follow enclen's change.
+
+ * regcomp.c (onig_print_compiled_byte_code): ditto.
+
+ * regcomp.c (onig_print_compiled_byte_code): change prototype.
+
+ * regint.c (onig_print_compiled_byte_code): comment out.
+
+Mon Dec 21 08:04:34 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * object.c: BasicObject#initialize accepts any number of arguments
+ [ruby-core:27080]
+
+Mon Dec 21 02:45:46 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm_eval.c (rb_iterate): remove SEGV (retry).
+
+Sun Dec 20 23:18:23 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm_eval.c (rb_iterate): remove SEGV (use the original patch).
+ [ruby-dev:39874]
+
+Sun Dec 20 21:26:05 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm_eval.c (rb_iterate): pass current block when the argument bl_proc
+ is NULL. This behavior can be used to make enumerator faster
+ [ruby-dev:39874]
+
+ * enumerator.c (enumerator_each): pass current block directly instead
+ of trampoline block (enumerator_each_i).
+
+ * io.c (argf_each_line, argf_each_byte, argf_each_char): ditto.
+
+Sat Dec 19 14:59:30 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * gem_prelude.rb (Kernel#gem): should make gem private. a patch
+ from Sho Hashimoto in [ruby-dev:39838].
+
+Sat Dec 19 14:57:17 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * lib/webrick/config.rb (WEBrick::Config): typo fixed. a patch
+ from Sho Hashimoto in [ruby-dev:39835].
+
+Sat Dec 19 11:06:48 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/matrix.rb (each2,collect2,map2): Fix enumerator
+ [ruby-core:27225]
+
+Sat Dec 19 09:58:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_eval.c (check_funcall): reset method_missing_reason before
+ trying the call. based on a patch from Yehuda Katz in
+ [ruby-core:27219].
+
+Sat Dec 19 09:29:22 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/set.rb: Add checks that passed argument is Enumerable.
+ [ruby-core:23844]
+
+Wed Dec 16 20:28:46 2009 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/ruby/envutil.rb: fix a typo in assert message.
+
+Wed Dec 16 16:57:59 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/un.rb (httpd): try to convert port number to integer.
+
+Wed Dec 16 11:18:30 2009 WATANABE Hirofumi <eban@ruby-lang.org>
+
+ * configure.in(MINIRUBY): use "$BASERUBY" as a default ruby executable
+ name.
+
+Wed Dec 16 00:53:14 2009 Tanaka Akira <akr@fsij.org>
+
+ * lib/find.rb (Find.find): rescue more exceptions which is possible to
+ occur by other process change the directory tree.
+
+Tue Dec 15 09:06:33 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/find.rb (Find.find): get rid of race condition.
+
+Mon Dec 14 22:33:21 2009 Tanaka Akira <akr@fsij.org>
+
+ * lib/find.rb (Find.find): rescue only ENOENT and EACCES for lstat.
+
+Mon Dec 14 21:49:30 2009 Tanaka Akira <akr@fsij.org>
+
+ * lib/find.rb (Find.find): narrow rescue region.
+
+Mon Dec 14 09:20:54 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/find.rb (Find.find): removed already unnecessary code.
+
+Sun Dec 13 23:48:25 2009 Tanaka Akira <akr@fsij.org>
+
+ * lib/find.rb (Find.find): sort directory entries. [ruby-dev:39847]
+
+Sun Dec 13 20:55:30 2009 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/envutil.rb (invoke_ruby): call to_str for stdin_data to
+ reject non-string.
+
+Sun Dec 13 20:26:57 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ruby.c (rb_parser_dump_tree): add prototype.
+
+Thu Dec 10 20:55:55 2009 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * transcode_data.h, transcode.c, tool/transcode-tblgen.rb: Added
+ support for new transcoding instruction FUNsio (with Tatsuya Mizuno)
+
+ * enc/trans/gb18030.trans: Significantly reduced GB18030 conversion
+ table footprint using FUNsio and differences (with Tatsuya Mizuno)
+
+ * test/ruby/test_transcode.rb: Minor name fix (from Tatsuya Mizuno)
+
+Thu Dec 10 17:22:36 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_eval.c (yield_under): yields self the same as 1.8.
+
+Thu Dec 10 15:49:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread_pthread.c (native_mutex_reinitialize_atfork): release and
+ re-acquire the lock at re-initialization.
+
+Thu Dec 10 12:56:02 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * encoding.c (enc_replicate): add Encoding#replicate(name).
+
+ * encoding.c (enc_replicate_with_index): renamed from old
+ enc_replicate.
+
+ * encoding.c (rb_enc_from_encoding_index): split from
+ rb_enc_from_encoding.
+
+Thu Dec 10 09:15:00 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * string.c (rb_str_inspect): CHAR_ESC_LEN should be 13.
+
+Thu Dec 10 01:12:55 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (dyna_pop_gen): pop dvars. [ruby-dev:39861]
+
+Thu Dec 10 00:46:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * node.c (dump_node): fixed for long members.
+
+Wed Dec 9 22:57:04 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * node.c: node management added. Currently, only pretty-dumper is
+ implemented. [ruby-dev:39853]
+
+ * ruby.c: --dump=parsetree and --dump=parsetree_with_comment options
+ added. This is just for debug or research purpose. Note that the
+ compatibility of these options are not supported at all.
+
+Wed Dec 9 09:50:35 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_str_justify): fixed the case a fill size is a
+ multiple of the length of the padding. [ruby-dev:39856]
+
+Tue Dec 8 23:41:34 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/configure.bat: now recognize --with-*-{dir,include,lib} options
+ and pass them to mkmf.
+
+ * win32/configure.bat: general conversion from ``/'' to ``\'' of
+ configure_args is not necessary any longer.
+
+ * win32/setup.mak: BASERUBY is used as command, so always need to
+ convert ``/'' to ``\'' within it.
+
+Tue Dec 8 23:39:52 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * numeric.c (flo_eq): suppress a warning on VC++ for x64.
+
+Tue Dec 8 16:19:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/rubygems: update to 1.3.5.
+
+ * lib/rubygems/defaults.rb (Gem::default_dir): removed a clause
+ doing nothing.
+
+Tue Dec 8 03:50:24 2009 Tanaka Akira <akr@fsij.org>
+
+ * file.c (rb_f_test): use string form in unknown command error
+ message.
+
+Mon Dec 7 14:11:08 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * marshal.c (w_object): reverted r26007. [ruby-dev:39845]
+
+ * test/test_delegate.rb (test_marshal): moved from test_marshal.rb.
+
+Mon Dec 7 13:05:59 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * string.c (rb_str_justify): CVE-2009-4124.
+ Fixes a bug reported by
+ Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
+ Patch by nobu.
+
+Sun Dec 6 23:50:46 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * strftime.c: %l should be 1..12 instead of 0..12 [ruby-core:27072]
+
+Sun Dec 6 23:16:35 2009 Tanaka Akira <akr@fsij.org>
+
+ * lib/find.rb (Find.find): reduce stat system call.
+
+Sun Dec 6 16:02:15 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/httpservlet/filehandler.rb: escape filename of index.
+ [ruby-dev:37768]
+
+Sun Dec 6 00:35:16 2009 Alexander Zavorine <alexandre.zavorine@nokia.com>
+
+ * symbian/setup (config.h): EXECUTABLE_EXTS moved from
+ dln.c:dln_find_1().
+
+Sat Dec 5 15:35:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * marshal.c (w_object): dump instance variables when using
+ marshal_dump. [ruby-core:24211]
+
+ * variable.c (rb_ivar_count): added.
+
+Sat Dec 5 13:19:29 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in: default ac_cv_prog_CC to CC.
+
+Sat Dec 5 10:18:26 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/irb/extend-command.rb (def_extend_command): fixed argument
+ number for negative arity.
+
+Fri Dec 4 16:50:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (k_def): adjust the location of method definition to the
+ line of def. [Bug #2427]
+
+Fri Dec 4 19:05:28 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * insns.def (defined): should respect #respond_to_missing? as
+ #respond_to? does.
+
+Fri Dec 4 15:50:18 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_eval.c (yield_under): does not yield self, and passes blockptr
+ instead of &block to vm_cref_push(). [ruby-dev:39833]
+
+Fri Dec 4 15:15:43 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * time.c (num_exact): should not accept strings as operands, even
+ though they respond to #to_r. ideally, strict rational
+ conversion should be done by a method like #to_rational, not #to_r.
+ [ruby-core:23729]
+
+Fri Dec 4 13:10:23 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
+
+ * ext/stringio/stringio.c (ungetc): RDoc updated. trunk allows
+ pushing back behind the beginning of the pseudo stream.
+
+Fri Dec 4 03:10:38 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * compile.c (compile_cpath, iseq_compile_each): reverted
+ constant/class variable lookup in instance_eval etc. to the
+ behavior of 1.8.
+
+ * eval.c (rb_mod_nesting): ditto.
+
+ * insns.def (putspecialobject, defineclass): ditto.
+
+ * node.h (NODE_FL_CREF_PUSHED_BY_EVAL): ditto.
+
+ * vm_core.h (VM_SPECIAL_OBJECT_CONST_BASE): ditto.
+
+ * vm_eval.c (yield_under, eval_under): ditto.
+
+ * vm_insnhelper.c (vm_cref_push, vm_get_const_base,
+ vm_get_ev_const, vm_get_cvar_base): ditto.
+
+Thu Dec 3 20:27:27 2009 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * enc/trans/gb18030-tbl.rb: Fix omission of C1 region in code table
+ (from Tatsuya Mizuno)
+
+ * test/ruby/test_transcode.rb: Added test for converting full range of
+ Unicode codepoints from/to GB18030 (from Tatsuya Mizuno)
+
+Wed Dec 2 23:51:28 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
+
+ * ext/openssl/ossl_ssl.c: initialize @hostname of SSLSocket to avoid
+ warning at SSLSocket#connect.
+
+Tue Dec 1 18:01:43 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
+
+ * test/digest/test_digest_extend.rb: added tests for digest framework.
+
+Tue Dec 1 12:01:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (dyna_push_gen, dyna_pop_gen): no needs to save both of
+ args and vars. [ruby-core:26961]
+
+ * parse.y (dyna_push_gen): use rb_node_newnode() for ripper.
+ [ruby-core:26961]
+
+ * parse.y (dyna_push_gen, dyna_pop_gen): adjust local vtable level
+ for the case of syntax errors in method name or argument inside
+ do block. [ruby-core:26961]
+
+Mon Nov 30 16:57:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb (command_output): $makeflags are already quoted.
+
+Mon Nov 30 16:54:22 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in, win32/Makefile.sub (EXECUTABLE_EXTS): moved from
+ dln.c:dln_find_1().
+
+ * lib/mkmf.rb (def find_executable0): use EXECUTABLE_EXTS, not
+ only EXEEXT. [ruby-core:26821]
+
+Mon Nov 30 11:00:12 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (parser_yylex): suppress an extra error message after
+ numeric literal without digits. based on a patch from ujihisa .
+ in [ruby-dev:39811]. [ruby-dev:39798]
+
+Sun Nov 29 16:56:24 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_eval.c (check_funcall_failed): pass ID. [ruby-core:26934]
+
+Sun Nov 29 06:37:53 2009 Aaron Patterson <tenderlove@ruby-lang.org>
+
+ * lib/rexml/formatters/default.rb (write_attribute): fix an
+ exception when printing a document when duplicate namespaced
+ attributes exist. Thanks, Alexey Froloff [ruby-core:26837]
+
+Sat Nov 28 09:05:53 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * vm_eval.c (check_funcall_failed): should rescue user raised
+ NoMethodError. rescue all NoMethodError if receiver does not
+ respond to the method name. [ruby-dev:39796]
+
+Thu Nov 26 21:14:30 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * test/ruby/test_complex.rb (@unify): fix the detection if math
+ loaded. This makes test_complex.rb work fine with the previous
+ commit.
+
+ * test/ruby/test_rational.rb (@unify): ditto.
+
+Thu Nov 26 21:13:36 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * test/test_mathn.rb (TestMathn): new test case.
+ test for r25067.
+
+Thu Nov 26 21:11:23 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * test/openssl/test_config.rb (OpenSSL::TestConfig): new test case.
+ test for r25017.
+
+Thu Nov 26 21:08:54 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * test/ruby/test_range.rb (TestRange#test_comparison_when_recursive):
+ test for r25010.
+
+ * test/ruby/test_struct.rb (TestStruct#test_comparison_when_recursive):
+ ditto.
+
+Thu Nov 26 20:18:02 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * gem_prelude.rb (Gem.set_home): must dup before force_encoding
+ and must force_encoding before gsub.
+ cf. Yen Sign problem of SJIS [ruby-core:26910]
+
+Thu Nov 26 17:54:37 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/{configure.bat, setup.mak, Makefile.sub}: add new configure
+ option ``--with-ntver''.
+
+Thu Nov 26 11:42:22 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/mkmf/base.rb: use $INCFLAGS to add -I option. [Bug#2387]
+
+Thu Nov 26 07:17:58 2009 wanabe <s.wanabe@gmail.com>
+
+ * marshal.c (mark_dump_arg): mark str. see also [ruby-dev:39735]
+
+Thu Nov 26 00:05:58 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
+
+ * test/digest/test_digest_extend.rb: Added tests for current digest
+ framework.
+
+Wed Nov 25 20:46:37 2009 Tanaka Akira <akr@fsij.org>
+
+ * vm_eval.c (rb_search_method_entry): refine error message.
+
+Wed Nov 25 19:29:05 2009 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/digest/digest.c (rb_digest_instance_method_unimpl): Do not
+ call rb_inspect() on an object that does not implement necessary
+ methods; reported by NaHi.
+
+Wed Nov 25 19:30:30 2009 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * transcode.c: Added a check for an internal error
+ (with Tatsuya Mizuno)
+
+Tue Nov 24 22:57:46 2009 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/envutil.rb (EnvUtil.invoke_ruby): raise Timeout::Error
+ instead of flunk. reported by Yusuke Endoh.
+
+Tue Nov 24 22:31:44 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * vm.c (ruby_vm_destruct, thread_memsize): fix argument type to make
+ RUBY_MARK_FREE_DEBUG available.
+
+Tue Nov 24 21:25:21 2009 Tanaka Akira <akr@fsij.org>
+
+ * error.c: include errno.h at beginning.
+
+Tue Nov 24 20:11:37 2009 Tanaka Akira <akr@fsij.org>
+
+ * strftime.c: %Y format a year with 4 digits at least.
+
+ * lib/time.rb: format a year with 4 digits at least.
+
+Tue Nov 24 20:05:27 2009 Tanaka Akira <akr@fsij.org>
+
+ * defs/known_errors.def: more errors.
+
+Tue Nov 24 20:01:49 2009 Tanaka Akira <akr@fsij.org>
+
+ * include/ruby/ruby.h (rb_bug_errno): declared.
+
+ * include/ruby/intern.h (rb_strerrno): declaration removed.
+
+ * error.c (rb_strerrno): make it static. return NULL for unknown
+ errors.
+ (rb_bug_errno): defined.
+
+ * thread_pthread.c: use rb_bug_errno.
+
+ * signal.c (ruby_signal): use rb_bug_errno.
+
+Tue Nov 24 10:17:38 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * file.c (file_path_convert): fix fs_encoding is not assign.
+
+Tue Nov 24 10:00:00 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * error.c (rb_strerrno): constified.
+
+Tue Nov 24 09:49:31 2009 Tanaka Akira <akr@fsij.org>
+
+ * error.c (rb_strerrno): return "UNKNOWNERROR" for non-zero unknown
+ error.
+
+Tue Nov 24 09:18:33 2009 Tanaka Akira <akr@fsij.org>
+
+ * include/ruby/intern.h (rb_strerrno): declared.
+
+ * template/known_errors.inc.tmpl: generate defined_error() and
+ undefined_error() instead of set_syserr.
+
+ * error.c (Init_syserr): define defined_error() and undefined_error()
+ to follow the above change.
+ (rb_strerrno): defined.
+
+ * thread_pthread.c: show error message and errno macro name with
+ rb_bug.
+
+Mon Nov 23 16:06:53 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread_pthread.c (RUBY_STACK_MIN, RUBY_STACK_SPACE): delay for
+ platforms where PTHREAD_STACK_MIN is not compile time constant.
+ [ruby-dev:39751]
+
+Mon Nov 23 11:26:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * dln.c (dln_find_1): removed duplication.
+
+Mon Nov 23 04:12:00 2009 Tanaka Akira <akr@fsij.org>
+
+ * enc/trans/newline.trans (fun_so_universal_newline): generate \n
+ after \r\n detection instead of just after \r.
+ [ruby-list:45988] [ruby-core:25881] [ruby-core:26788]
+
+Sat Nov 21 18:48:35 2009 Tanaka Akira <akr@fsij.org>
+
+ * vm_eval.c (rb_search_method_entry): show flags and klass value in
+ not implemented error message.
+
+Sat Nov 21 16:38:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * marshal.c (marshal_dump): use normal object as the buffer so
+ that no hidden object is exposed to ruby-level. [ruby-dev:39744]
+
+Sat Nov 21 15:58:43 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (read_all): fix: false negative invalid byte sequence
+ on reading from pipes. [ruby-dev:39743]
+ fix: assign the variable 'pos' as relative value from recent pos.
+
+Sat Nov 21 14:44:16 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * file.c (file_path_convert): delay getting UTF8-MAC encoding
+ while really needed. [ruby-core:26807]
Sat Nov 21 01:03:39 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
@@ -11,6 +2064,10 @@ Sat Nov 21 01:03:39 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* file.c (Init_File): initialize key for separator only once.
+Fri Nov 20 21:16:54 2009 Tanaka Akira <akr@fsij.org>
+
+ * vm_eval.c (rb_search_method_entry): avoid trigraph.
+
Fri Nov 20 08:15:45 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (rb_vm_start): handshake.
@@ -27,6 +2084,133 @@ Fri Nov 20 04:38:44 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread.c (rb_queue_shift_wait): fixed the case of no-timeout.
+Thu Nov 19 23:17:06 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/ftp.rb (putbinaryfile): use APPE for resume.
+ Thanks, Tomoyuki Chikanaga.
+
+Thu Nov 19 22:50:05 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/imap.rb (flag_list): untaint strings to intern in the safe
+ level 1.
+
+ * lib/net/imap.rb (max_flag_count=): new methods to set the max
+ number of flags interned to symbols.
+
+Thu Nov 19 20:43:39 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/socket/getnameinfo.c: need to include extconf.h for HAVE_* macros.
+ reported by Kenta Murata <mrkn AT mrkn.jp> via IRC.
+
+Thu Nov 19 17:00:59 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/Makefile.sub: nmake execute the file named echo if it exists
+ in the PATH. reported by Kenta Murata <mrkn AT mrkn.jp> via IRC.
+
+Thu Nov 19 02:50:47 2009 Tanaka Akira <akr@fsij.org>
+
+ * vm_eval.c (rb_search_method_entry): show the type of the hidden
+ object.
+ (rb_type_str): new function for above.
+
+Thu Nov 19 00:47:09 2009 Tanaka Akira <akr@fsij.org>
+
+ * io.c (MORE_CHAR_SUSPENDED): renamed from MORE_CHAR_CBUF_FULL.
+
+Wed Nov 18 22:00:13 2009 Tanaka Akira <akr@fsij.org>
+
+ * io.c (fill_cbuf): extracted from more_char.
+ (io_shift_cbuf): fix memmove condition.
+ (read_all): use fill_cbuf directly to avoid ECONV_AFTER_OUTPUT.
+ [ruby-dev:39708]
+
+Wed Nov 18 18:25:09 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread.c (rb_thread_atfork_internal): reinitialize global lock
+ at fork to get rid of deadlock. based on the patch from Hongli
+ Lai in [ruby-core:26783]. [ruby-core:23572]
+
+Wed Nov 18 17:48:22 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread.c (terminate_atfork_i): all mutex locks by other threads
+ have been abandoned at fork.
+
+Wed Nov 18 15:27:20 2009 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * file.c (file_path_convert): delay getting filesystem encoding
+ while really needed.
+
+Wed Nov 18 12:33:42 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * encoding.c (enc_set_default_encoding): reset filesystem
+ encoding because on resetting default_external because
+ Unix's filesystem encoding depends on default_external.
+
+ * encoding.c (enc_set_filesystem_encoding): added.
+
+ * ruby.c (process_options): don't call rb_filesystem_encoding
+ because filesystem encoding is reset when default_external
+ is reset.
+
+Wed Nov 18 11:57:32 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
+
+ * math.c (math_gamma): fix incorrect comparison expression.
+ see also [ruby-dev:39709] [Bug #2381]
+
+Wed Nov 18 11:37:05 2009 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (rb_scan_open_args): move path encoding conversion
+ for filesystem encoding of Mac OS X.
+
+ * file.c (file_path_convert): added for convert encoding
+ of file path.
+
+ * file.c (rb_get_path_check): add file_path_convert.
+
+Wed Nov 18 10:17:09 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (str_utf8_nth): no count_utf8_lead_bytes_with_word
+ optimization for short string. [ruby-core:26787]
+
+ * string.c (str_utf8_offset): str_utf8_nth never return NULL.
+
+Wed Nov 18 10:12:34 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_method.c (rb_undef): should raise TypeError if klass is nil.
+ 1.instance_eval { undef to_s } causes SEGV before this fix.
+
+ * test/ruby/test_undef.rb: new tests for undef.
+
+Wed Nov 18 08:41:42 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (str_utf8_nth): fixed overrun. [ruby-core:26787]
+
+Wed Nov 18 07:51:01 2009 Tanaka Akira <akr@fsij.org>
+
+ * io.c (parse_mode_enc): fix invalid access.
+
+Tue Nov 17 23:50:06 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_method.c (rb_alias): should raise TypeError if klass is nil.
+ 1.instance_eval { alias to_string to_s } causes SEGV before this
+ fix.
+
+ * test/ruby/test_alias.rb (test_special_const_alias): ditto.
+
+Tue Nov 17 17:53:53 2009 Martin Duerst <duerst@it.aoyama.ac.jp>
+
+ * enc/big5.c, enc/trans/big5.trans, enc/trans/big5-uao-tbl.rb,
+ test/ruby/test-transcode.rb: Added Encoding 'Big5-UAO' and transcoding
+ for it (from Tatsuya Mizuno) (see Bug #1784)
+
+Tue Nov 17 16:26:24 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * insns.def (opt_case_dispatch): runtime value cannot be used as
+ an element initializer.
+
+ * vm_insnhelper.c (opt_case_dispatch_i): gets rid of type-punning
+ calls.
+
Tue Nov 17 12:00:56 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_core.h (rb_vm_t): manage references from other VMs.
@@ -36,9 +2220,11 @@ Tue Nov 17 12:00:56 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (ruby_vm_free, vm_init2, vm_create, InitVM_VM): ditto.
* vm.c (rb_vm_send): reject terminated VM.
+
Mon Nov 16 22:24:57 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* regint.h (USE_PARSE_TREE_NODE_RECYCLE): disabled.
+
Mon Nov 16 19:18:37 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* dir.c (ruby_dirfd): need O_DIRECTORY and O_LARGEFILE.
@@ -50,6 +2236,35 @@ Mon Nov 16 18:55:30 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (get_stack): fixed stack start address on the
platforms using pthread_attr_t.
+Mon Nov 16 15:51:53 2009 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_call_method): protected singleton methods of
+ an object should not be able to called from other instances of the
+ class of the object. [ruby-core:26761]
+
+ * vm_eval.c (rb_method_call_status): ditto.
+
+ * test/ruby/test_module.rb (test_protected_singleton_method): ditto.
+
+Mon Nov 16 14:03:53 2009 wanabe <s.wanabe@gmail.com>
+
+ * io.c (read_all): shift read buffer if exception occurred.
+ pointed out in [ruby-dev:39702].
+
+Mon Nov 16 07:59:38 2009 wanabe <s.wanabe@gmail.com>
+
+ * io.c (read_all): don't call io_shift_cbuf until buffering enough or
+ econv_finished. [ruby-dev:39696]
+
+ * io.c (more_char): don't call clear_readconv to read buffer after
+ econv_finished.
+
+ * io.c (appendline, rb_io_each_codepoint): clear readconv when done.
+
+Mon Nov 16 01:58:08 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * include/ruby/ruby.h (rb_classext_t): annotate @internal.
+
Mon Nov 16 01:36:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread.c (rb_queue_shift_wait): added.
@@ -60,6 +2275,14 @@ Mon Nov 16 01:36:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_core.h (rb_vm_t): moved message queue from rb_thread_t.
+Mon Nov 16 01:35:34 2009 Tanaka Akira <akr@fsij.org>
+
+ * encoding.c (rb_filesystem_encindex): use default external encoding
+ instead of locale encoding in Unix.
+
+ * ruby.c (process_options): delay filesystem encoding
+ initialization until default external encoding initialization.
+
Mon Nov 16 01:14:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (rb_vm_current): new method RubyVM.current.
@@ -92,10 +2315,40 @@ Mon Nov 16 01:04:25 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (RUBY_H_INCLUDES): include private_object.h.
+Mon Nov 16 00:06:26 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * thread.c (thread_cleanup_func): delete locking_mutex when thread
+ object become dummy because of fork. [ruby-core:26744]
+ [ruby-core:26745]
+
+ * bootstraptest/test_thread.rb: add a test for above.
+
Sun Nov 15 07:01:13 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* marshal.c (marshal_dump): needs to set compat_allocator_tbl.
+Sat Nov 14 21:54:46 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * class.c (rb_mod_init_copy): fix memory leak of Class#dup.
+ [ruby-dev:39687]
+
+Sat Nov 14 17:09:39 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (--with-opt-dir): ignore and suppress a warning.
+ [ruby-dev:39684]
+
+Sat Nov 14 16:43:24 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * hash.c (ruby_setenv): get rid of crash in Solaris 8 and 10.
+ [ruby-core:26668]
+
+Sat Nov 14 09:16:54 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): Fix comparisons
+ [ruby-core:26646]
+
+ * test/bigdecimal/test_bigdecimal.rb (class): Fix and improve tests.
+
Sat Nov 14 08:48:38 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* mvm.c (ruby_vm_alone, ruby_vm_main_p): new functions.
@@ -106,11 +2359,25 @@ Sat Nov 14 08:48:38 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (rb_vm_initialize): add last NULL.
+Sat Nov 14 04:07:06 2009 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
+
+ * ext/tk/lib/tk/variable.rb (TkVariable::coerce): fix bug on a
+ numeric value.
+
Sat Nov 14 03:49:07 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (native_thread_init_stack): fixed stack star
address.
+Sat Nov 14 03:35:29 2009 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
+
+ * ext/tk/lib/tk/variable.rb: TkVariable#*(other) and /(other) have a
+ bug on handling of the "other" value.
+
+Fri Nov 13 21:18:15 2009 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * ext/zlib/zlib.c (rb_zlib_adler32): fix typo.
+
Fri Nov 13 19:56:16 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* mvm.c (vm_join): does nothing when vm has died.
@@ -144,6 +2411,21 @@ Fri Nov 13 10:14:11 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (Init_sym): use separate object space.
+Fri Nov 13 00:46:24 2009 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+
+ * lib/cgi/util.rb (CGI::pretty): fix the overflow bug
+ if stripped string.[ruby-dev:37975]
+
+Thu Nov 12 23:08:11 2009 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+
+ * lib/cgi/core.rb (read_from_cmdline): this code is better.
+ [ruby-core:25991]
+
+Thu Nov 12 22:55:42 2009 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
+
+ * lib/net/telnet.rb: don't use simple delegate.
+ because SimpleDelegate behavior changed.
+
Thu Nov 12 16:35:42 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* eval.c (ruby_vm_run): cleanup needed.
@@ -218,7 +2500,7 @@ Wed Nov 11 02:14:48 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
Tue Nov 10 08:23:21 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (rb_f_exec, rb_f_system, rb_f_spawn): mentioned abou
+ * process.c (rb_f_exec, rb_f_system, rb_f_spawn): mentioned about
the shell to be used when the command line is single string.
See [ruby-core:26652]
@@ -457,7 +2739,7 @@ Fri Oct 30 22:09:47 2009 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* lib/net/http.rb (Net::HTTPResponse#each_response_header):
accept multiline message header of HTTP response. see #1796.
- cf. RFC 2616 '4.2 Message Header'.
+ cf. RFC 2616 '4.2 Message Header'.
* test/net/http/test_httpresponse.rb: added.
@@ -558,7 +2840,7 @@ Thu Oct 29 13:53:18 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
* io.c (pop_last_hash): return early when the last argument is nil.
* io.c (rb_io_puts): treat T_STRING specially for small
- optimization.
+ optimization.
* vm_eval.c (raise_method_missing): skip method call if possible
using rb_method_basic_definition_p().
@@ -833,7 +3115,7 @@ Fri Oct 23 07:28:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
Thu Oct 22 21:10:39 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* class.c (rb_obj_basic_to_s_p): typo. Please become familiar with
- the ANSI style.
+ the ANSI style.
Thu Oct 22 20:20:27 2009 Tanaka Akira <akr@fsij.org>
@@ -872,7 +3154,7 @@ Wed Oct 21 08:17:17 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
Wed Oct 21 03:54:41 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * lib/matrix.rb:
+ * lib/matrix.rb:
Creator functions now strict with their arguments
Support for empty matrices (see new method Matrix.empty)
Matrix#trace raises an ErrDimensionMismatch if the matrix is not square
@@ -1413,7 +3695,7 @@ Tue Oct 6 06:26:00 2009 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tkextlib/vu/dial.rb: fix logical bug.
- * ext/tk/lib/tk/canvas.rb, ext/tk/lib/tkextlib/blt/component.rb:
+ * ext/tk/lib/tk/canvas.rb, ext/tk/lib/tkextlib/blt/component.rb:
lack of support for methodcall_optkeys.
Mon Oct 5 17:19:33 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
@@ -1752,7 +4034,7 @@ Mon Sep 28 12:13:15 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
method_missing with same symbol should be equal.
[ruby-core:25755]
- * proc.c (mnew): should always return method object.
+ * proc.c (mnew): should always return method object.
Mon Sep 28 11:38:07 2009 NAKAMURA Usaku <usa@ruby-lang.org>
@@ -2243,18 +4525,18 @@ Wed Sep 16 06:30:07 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* thread.c (rb_exec_recursive_outer, rb_exec_recursive): Added method
to short-circuit to the outermost level in case of recursion
-
+
* test/ruby/test_thread.rb (test_recursive_outer): Test for above
-
+
* hash.c (rb_hash_hash): Return a sensible hash for in case of
recursion [ruby-core:24648]
-
+
* range.c (rb_range_hash): ditto
-
+
* struct.c (rb_struct_hash): ditto
-
+
* array.c (rb_array_hash): ditto
-
+
* test/ruby/test_array.rb (test_hash2): test for above
Wed Sep 16 06:17:33 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
@@ -2398,7 +4680,7 @@ Sun Sep 13 20:18:49 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sun Sep 13 19:39:59 2009 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * ext/win32ole/win32ole.c: some refactoring.
+ * ext/win32ole/win32ole.c: some refactoring.
Sun Sep 13 19:38:34 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
@@ -2439,7 +4721,7 @@ Sun Sep 13 09:34:10 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
Sun Sep 13 08:30:30 2009 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * ext/win32ole/win32ole.c: fix WIN32OLE_TYPELIB.new when the 1st
+ * ext/win32ole/win32ole.c: fix WIN32OLE_TYPELIB.new when the 1st
argument is the non-registered file.
Sun Sep 13 02:08:43 2009 Koichi Sasada <ko1@atdot.net>
@@ -2755,7 +5037,7 @@ Sun Sep 6 17:31:28 2009 Koichi Sasada <ko1@atdot.net>
Sun Sep 6 16:13:06 2009 Koichi Sasada <ko1@atdot.net>
- * insns.def (setinstancevariable), vm_insnhelper.c (vm_setivar):
+ * insns.def (setinstancevariable), vm_insnhelper.c (vm_setivar):
fix to use inline cache (trivial optimization).
Sun Sep 6 10:34:19 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
@@ -2862,11 +5144,11 @@ Mon Aug 31 14:17:09 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp>
(rb_singleton_class): refactored.
(rb_define_singleton_method): it needs a metaclass only
but not its metametaclass.
-
+
* object.c: booting class hierarchy was moved to class.c
for keeping dependency between compilation units least.
- (Init_Object): extracting the booting into
- Init_class_hierarchy.
+ (Init_Object): extracting the booting into
+ Init_class_hierarchy.
(boot_defclass): moved to class.c.
Sun Aug 30 23:44:09 2009 Tanaka Akira <akr@fsij.org>
@@ -2907,7 +5189,7 @@ Sun Aug 30 03:59:43 2009 Tanaka Akira <akr@fsij.org>
* timev.h (TIME_SCALE): defined as 1000000000.
(struct vtm): subsec is replaced by subsecx.
subsec * TIME_SCALE == subsecx.
-
+
* time.c: avoid rational in most cases.
(struct time_object): timev is replaced by timexv.
timev * TIME_SCALE == timexv.
@@ -3147,7 +5429,7 @@ Sun Aug 23 15:12:22 2009 Tanaka Akira <akr@fsij.org>
* bootstraptest/runner.rb (Dir.mktmpdir): updated to latest.
(in_temporary_working_directory): temporary directory name changed.
-
+
Sun Aug 23 00:56:13 2009 Tanaka Akira <akr@fsij.org>
* thread.c (rb_thread_schedule): don't recur infinitely.
@@ -49931,7 +52213,7 @@ Sun Jul 9 18:06:47 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (create_makefile): prevent substitution of macro
definition. fixed: http://www.yotabanana.com/lab/20060624.html#p02
-Sun Jul 9 07:58:48 2006 Ryan Davis <ryand@zenspider.com>
+Sun Jul 9 07:58:48 2006 Ryan Davis <ryand-ruby@zenspider.com>
* lib/rdoc/parsers/parse_f95.rb: massive overhaul from Yasuhiro
Morikawa including new file suffixes, function support, public
@@ -65339,7 +67621,7 @@ Wed Mar 10 16:00:14 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* struct.c (rb_struct_s_def): Struct::new executes block with
generated struct class. [ruby-talk:02606]
-Wed Mar 10 15:58:43 2004 Ryan Davis <ryand@zenspider.com>
+Wed Mar 10 15:58:43 2004 Ryan Davis <ryand-ruby@zenspider.com>
* eval.c (eval): Only print backtrace if generating the backtrace
doesn't generate an exception. [ruby-core:02621]
diff --git a/Makefile.in b/Makefile.in
index 798fa76608..7b1ac4a3b9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -252,18 +252,17 @@ distclean-rdoc:
@$(RMALL) $(RDOCOUT:/=\)
clean-ext distclean-ext realclean-ext::
- @set dummy ${EXTS}; shift; \
- if test "$$#" = 0; then \
- set dummy `find ext -name Makefile | sed 's:^ext/::;s:/Makefile$$::' | sort`; \
- shift; \
- fi; \
+ @cd ext; set dummy `echo "${EXTS}" | tr , ' '`; shift; \
+ test "$$#" = 0 && set .; \
+ set dummy `for dir; do \
+ find $$dir -name Makefile | sed 's:^\./::;s:/Makefile$$:~:' | sort | sed 's:~$$::'; \
+ done`; shift; \
for dir; do \
- [ -f "ext/$$dir/Makefile" ] || continue; \
echo $(@:-ext=)ing "$$dir"; \
- (cd "ext/$$dir" && exec $(MAKE) $(MFLAGS) $(@:-ext=)) && \
+ (cd "$$dir" && exec $(MAKE) $(MFLAGS) $(@:-ext=)) && \
case "$@" in \
*distclean-ext*|*realclean-ext*) \
- $(RMDIRS) "ext/$$dir";; \
+ $(RMDIRS) "$$dir";; \
esac; \
done
diff --git a/NEWS b/NEWS
index 3adf36ec6e..3ac37a4392 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+# -*- rd -*-
= NEWS
This document is a list of user visible feature changes made between
@@ -15,11 +16,21 @@ with all sufficient information, see the ChangeLog file.
* Array
* new method:
* Array#sort_by!
+ * Array#rotate!
+ * Array#rotate
* Dir
* new method:
* Dir.home
+ * Encoding
+ * new encodings:
+ * Big5
+ * Big5-UAO
+
+ * new method:
+ * ascii_compatible?
+
* Enumerable
* New methods:
* Enumerable#join
@@ -45,6 +56,17 @@ with all sufficient information, see the ChangeLog file.
* ENV
* Uses locale's encoding
+ * ENV.[]= raises Errno::{EINVAL,ENOMEM} etc. on failure.
+
+ * Float
+ * new constants:
+ * Float::INFINITY
+ * Float::NAN
+
+ * File
+ * new methods:
+ * File.realpath
+ * File.realdirpath
* IO
* new method:
@@ -95,6 +117,12 @@ with all sufficient information, see the ChangeLog file.
* respond_to? can be used to detect methods not implemented.
For example, Process.respond_to?(:fork) returns false on Windows.
+* digest
+ * new methods:
+ * Digest::Class.base64digest
+ * Digest::Instance#base64digest
+ * Digest::Instance#base64digest!
+
* rss
* 0.2.4 -> 0.2.7.
@@ -133,6 +161,9 @@ with all sufficient information, see the ChangeLog file.
* do not raise ShiftingError if an aged file already exists.
(no ShiftingError will be raised from 1.2.7, just warn() instead)
+* net/http
+ * merged net/https.
+
* open3
* new methods:
* Open3.popen2
@@ -165,6 +196,7 @@ with all sufficient information, see the ChangeLog file.
Addrinfo#to_s returns the old binary sockaddr string.
* BasicSocket#getsockopt returns Socket::Option object instead of a binary string.
Socket::Option#to_s returns the old binary string.
+ * Socket.do_not_reverse_lookup is turned on by default now.
* new class:
* Addrinfo
@@ -252,11 +284,15 @@ with all sufficient information, see the ChangeLog file.
* new methods:
* Zlib::GzipFile#path
+* rbconfig
+ * new methods:
+ * RbConfig.ruby
+
=== Language changes
* Regexp properties (\p{}) names now ignore underscores, spaces, and case, so
\p{ol chiki} is the same as \p{Ol_Chiki}
-* Regexps now support Unicode 5.1 (new characters and scripts)
+* Regexps now support Unicode 5.2 (new characters and scripts)
* \d, \s, and \w are now ASCII only; use POSIX bracket classes and \p{} for
Unicode semantics
* $: no longer includes the current directory, use require_relative
diff --git a/README.EXT b/README.EXT
index e29b3ae89d..30269eb74f 100644
--- a/README.EXT
+++ b/README.EXT
@@ -94,8 +94,10 @@ respectively. They are singletons for the data type.
The equivalent C constants are: Qnil, Qfalse, Qtrue.
Note that Qfalse is false in C also (i.e. 0), but not Qnil.
-The T_FIXNUM data is a 31bit length fixed integer (63bit length on
-some machines), which can be converted to a C integer by using the
+The T_FIXNUM data is a 31bit or 63bit length fixed integer.
+This size is depend on the size of long: if long is 32bit then
+T_FIXNUM is 31bit, if long is 64bit then T_FIXNUM is 63bit.
+T_FIXNUM can be converted to a C integer by using the
FIX2INT() macro or FIX2LONG(). Though you have to check that the
data is really FIXNUM before using them, they are faster. FIX2LONG()
never raises exceptions, but FIX2INT() raises RangeError if the
diff --git a/array.c b/array.c
index 5711d05508..a358a9f554 100644
--- a/array.c
+++ b/array.c
@@ -698,6 +698,8 @@ ary_take_first_or_last(int argc, VALUE *argv, VALUE ary, enum ary_take_pos_flags
return ary_make_partial(ary, rb_cArray, offset, n);
}
+static VALUE rb_ary_push_1(VALUE ary, VALUE item);
+
/*
* call-seq:
* array << obj -> array
@@ -714,9 +716,15 @@ ary_take_first_or_last(int argc, VALUE *argv, VALUE ary, enum ary_take_pos_flags
VALUE
rb_ary_push(VALUE ary, VALUE item)
{
+ rb_ary_modify(ary);
+ return rb_ary_push_1(ary, item);
+}
+
+static VALUE
+rb_ary_push_1(VALUE ary, VALUE item)
+{
long idx = RARRAY_LEN(ary);
- rb_ary_modify(ary);
if (idx >= ARY_CAPA(ary)) {
ary_double_capa(ary, idx);
}
@@ -741,9 +749,9 @@ rb_ary_push(VALUE ary, VALUE item)
static VALUE
rb_ary_push_m(int argc, VALUE *argv, VALUE ary)
{
- rb_ary_modify_check(ary);
+ rb_ary_modify(ary);
while (argc--) {
- rb_ary_push(ary, *argv++);
+ rb_ary_push_1(ary, *argv++);
}
return ary;
}
@@ -890,8 +898,8 @@ rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary)
{
long len;
- if (argc == 0) return ary;
rb_ary_modify(ary);
+ if (argc == 0) return ary;
if (ARY_CAPA(ary) <= (len = RARRAY_LEN(ary)) + argc) {
ary_double_capa(ary, len + argc);
}
@@ -1319,6 +1327,7 @@ rb_ary_aset(int argc, VALUE *argv, VALUE ary)
long offset, beg, len;
if (argc == 3) {
+ rb_ary_modify_check(ary);
beg = NUM2LONG(argv[0]);
len = NUM2LONG(argv[1]);
rb_ary_splice(ary, beg, len, argv[2]);
@@ -1327,6 +1336,7 @@ rb_ary_aset(int argc, VALUE *argv, VALUE ary)
if (argc != 2) {
rb_raise(rb_eArgError, "wrong number of arguments (%d for 2)", argc);
}
+ rb_ary_modify_check(ary);
if (FIXNUM_P(argv[0])) {
offset = FIX2LONG(argv[0]);
goto fixnum;
@@ -1360,10 +1370,11 @@ rb_ary_insert(int argc, VALUE *argv, VALUE ary)
{
long pos;
- if (argc == 1) return ary;
if (argc < 1) {
rb_raise(rb_eArgError, "wrong number of arguments (at least 1)");
}
+ rb_ary_modify_check(ary);
+ if (argc == 1) return ary;
pos = NUM2LONG(argv[0]);
if (pos == -1) {
pos = RARRAY_LEN(ary);
@@ -1493,16 +1504,22 @@ rb_ary_empty_p(VALUE ary)
return Qfalse;
}
-VALUE
-rb_ary_dup(VALUE ary)
+static VALUE
+rb_ary_dup_setup(VALUE ary)
{
VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
int is_embed = ARY_EMBED_P(dup);
DUPSETUP(dup, ary);
if (is_embed) FL_SET_EMBED(dup);
- MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
ARY_SET_LEN(dup, RARRAY_LEN(ary));
+ return dup;
+}
+VALUE
+rb_ary_dup(VALUE ary)
+{
+ VALUE dup = rb_ary_dup_setup(ary);
+ MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
return dup;
}
@@ -1733,22 +1750,27 @@ rb_ary_to_ary_m(VALUE ary)
return ary;
}
+static void
+ary_reverse(p1, p2)
+ VALUE *p1, *p2;
+{
+ while (p1 < p2) {
+ VALUE tmp = *p1;
+ *p1++ = *p2;
+ *p2-- = tmp;
+ }
+}
+
VALUE
rb_ary_reverse(VALUE ary)
{
VALUE *p1, *p2;
- VALUE tmp;
rb_ary_modify(ary);
if (RARRAY_LEN(ary) > 1) {
p1 = RARRAY_PTR(ary);
p2 = p1 + RARRAY_LEN(ary) - 1; /* points last item */
-
- while (p1 < p2) {
- tmp = *p1;
- *p1++ = *p2;
- *p2-- = tmp;
- }
+ ary_reverse(p1, p2);
}
return ary;
}
@@ -1783,7 +1805,111 @@ rb_ary_reverse_bang(VALUE ary)
static VALUE
rb_ary_reverse_m(VALUE ary)
{
- return rb_ary_reverse(rb_ary_dup(ary));
+ VALUE dup = rb_ary_dup_setup(ary);
+ long len = RARRAY_LEN(ary);
+
+ if (len > 0) {
+ VALUE *p1 = RARRAY_PTR(ary);
+ VALUE *p2 = RARRAY_PTR(dup) + len - 1;
+ do *p2-- = *p1++; while (--len > 0);
+ }
+ return dup;
+}
+
+static inline long
+rotate_count(long cnt, long len)
+{
+ return (cnt < 0) ? (len - (~cnt % len) - 1) : (cnt % len);
+}
+
+VALUE
+rb_ary_rotate(VALUE ary, long cnt)
+{
+ rb_ary_modify(ary);
+
+ if (cnt != 0) {
+ VALUE *ptr = RARRAY_PTR(ary);
+ long len = RARRAY_LEN(ary);
+
+ if (len > 0 && (cnt = rotate_count(cnt, len)) > 0) {
+ --len;
+ if (cnt < len) ary_reverse(ptr + cnt, ptr + len);
+ if (--cnt > 0) ary_reverse(ptr, ptr + cnt);
+ if (len > 0) ary_reverse(ptr, ptr + len);
+ return ary;
+ }
+ }
+
+ return Qnil;
+}
+
+/*
+ * call-seq:
+ * array.rotate!([cnt = 1]) -> array
+ *
+ * Rotates _self_ in place so that the element at +cnt+ comes first,
+ * and returns _self_. If +cnt+ is negative then it rotates in
+ * counter direction.
+ *
+ * a = [ "a", "b", "c", "d" ]
+ * a.rotate! #=> ["b", "c", "d", "a"]
+ * a #=> ["b", "c", "d", "a"]
+ * a.rotate!(2) #=> ["d", "a", "b", "c"]
+ * a.rotate!(-3) #=> ["a", "b", "c", "d"]
+ */
+
+static VALUE
+rb_ary_rotate_bang(int argc, VALUE *argv, VALUE ary)
+{
+ long n = 1;
+
+ switch (argc) {
+ case 1: n = NUM2LONG(argv[0]);
+ case 0: break;
+ default: rb_scan_args(argc, argv, "01", NULL);
+ }
+ rb_ary_rotate(ary, n);
+ return ary;
+}
+
+/*
+ * call-seq:
+ * array.rotate([n = 1]) -> an_array
+ *
+ * Returns new array by rotating _self_, whose first element is the
+ * element at +cnt+ in _self_. If +cnt+ is negative then it rotates
+ * in counter direction.
+ *
+ * a = [ "a", "b", "c", "d" ]
+ * a.rotate #=> ["b", "c", "d", "a"]
+ * a #=> ["a", "b", "c", "d"]
+ * a.rotate(2) #=> ["c", "d", "a", "b"]
+ * a.rotate(-3) #=> ["b", "c", "d", "a"]
+ */
+
+static VALUE
+rb_ary_rotate_m(int argc, VALUE *argv, VALUE ary)
+{
+ VALUE rotated, *ptr, *ptr2;
+ long len, cnt = 1;
+
+ switch (argc) {
+ case 1: cnt = NUM2LONG(argv[0]);
+ case 0: break;
+ default: rb_scan_args(argc, argv, "01", NULL);
+ }
+
+ len = RARRAY_LEN(ary);
+ rotated = rb_ary_dup_setup(ary);
+ if (len > 0) {
+ cnt = rotate_count(cnt, len);
+ ptr = RARRAY_PTR(ary);
+ ptr2 = RARRAY_PTR(rotated);
+ len -= cnt;
+ MEMCPY(ptr2, ptr + cnt, VALUE, len);
+ MEMCPY(ptr2 + len, ptr, VALUE, cnt);
+ }
+ return rotated;
}
struct ary_sort_data {
@@ -2123,10 +2249,12 @@ rb_ary_select(VALUE ary)
* array.delete(obj) -> obj or nil
* array.delete(obj) { block } -> obj or nil
*
- * Deletes items from <i>self</i> that are equal to <i>obj</i>. If
+ * Deletes items from <i>self</i> that are equal to <i>obj</i>.
+ * If any items are found, returns <i>obj</i>. If
* the item is not found, returns <code>nil</code>. If the optional
* code block is given, returns the result of <i>block</i> if the item
- * is not found.
+ * is not found. (To remove <code>nil</code> elements and
+ * get an informative return value, use #compact!)
*
* a = [ "a", "b", "b", "b", "c" ]
* a.delete("b") #=> "b"
@@ -2481,8 +2609,8 @@ rb_ary_transpose(VALUE ary)
VALUE
rb_ary_replace(VALUE copy, VALUE orig)
{
- orig = to_ary(orig);
rb_ary_modify_check(copy);
+ orig = to_ary(orig);
if (copy == orig) return copy;
if (RARRAY_LEN(orig) <= RARRAY_EMBED_LEN_MAX) {
@@ -2675,6 +2803,7 @@ rb_ary_plus(VALUE x, VALUE y)
VALUE
rb_ary_concat(VALUE x, VALUE y)
{
+ rb_ary_modify_check(x);
y = to_ary(y);
if (RARRAY_LEN(y) > 0) {
rb_ary_splice(x, RARRAY_LEN(x), 0, y);
@@ -3182,6 +3311,7 @@ rb_ary_uniq_bang(VALUE ary)
VALUE hash, v;
long i, j;
+ rb_ary_modify_check(ary);
if (rb_block_given_p()) {
hash = ary_make_hash_by(ary);
if (RARRAY_LEN(ary) == (i = RHASH_SIZE(hash))) {
@@ -3252,7 +3382,8 @@ rb_ary_uniq(VALUE ary)
* array.compact! -> array or nil
*
* Removes +nil+ elements from array.
- * Returns +nil+ if no changes were made.
+ * Returns +nil+ if no changes were made, otherwise return
+ * </i>array</i>.
*
* [ "a", nil, "b", nil, "c" ].compact! #=> [ "a", "b", "c" ]
* [ "a", "b", "c" ].compact! #=> nil
@@ -3428,6 +3559,7 @@ rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary)
VALUE result, lv;
rb_scan_args(argc, argv, "01", &lv);
+ rb_ary_modify_check(ary);
if (!NIL_P(lv)) level = NUM2INT(lv);
if (level == 0) return Qnil;
@@ -4099,6 +4231,8 @@ InitVM_Array(void)
rb_define_method(rb_cArray, "join", rb_ary_join_m, -1);
rb_define_method(rb_cArray, "reverse", rb_ary_reverse_m, 0);
rb_define_method(rb_cArray, "reverse!", rb_ary_reverse_bang, 0);
+ rb_define_method(rb_cArray, "rotate", rb_ary_rotate_m, -1);
+ rb_define_method(rb_cArray, "rotate!", rb_ary_rotate_bang, -1);
rb_define_method(rb_cArray, "sort", rb_ary_sort, 0);
rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0);
rb_define_method(rb_cArray, "sort_by!", rb_ary_sort_by_bang, 0);
diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub
index 834e8a5870..130b0f243d 100644
--- a/bcc32/Makefile.sub
+++ b/bcc32/Makefile.sub
@@ -196,6 +196,10 @@ ASMEXT = asm
INSTALLED_LIST= .installed.list
+MKMAIN_CMD = mkmain.bat
+
+SRC_FILE = $(<:\=/)
+
WINMAINOBJ = winmain.$(OBJEXT)
ARCHMINIOBJS = dmydln.$(OBJEXT)
@@ -353,15 +357,8 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
\#define DEFAULT_KCODE KCODE_NONE
\#define LOAD_RELATIVE 1
\#define DLEXT ".so"
-\#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR).$(TEENY)"
-\#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
-\#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR).$(TEENY)"
-\#define RUBY_VENDOR_LIB "/lib/ruby/vendor_ruby"
-\#define RUBY_VENDOR_LIB2 "/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR).$(TEENY)"
+\#define RUBY_LIB_PREFIX "/lib/ruby"
\#define RUBY_PLATFORM "$(ARCH)-$(OS)"
-\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)"
-\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)"
-\#define RUBY_VENDOR_ARCHLIB "/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR).$(TEENY)/$(ARCH)-$(OS)"
|
@exit > $(@:/=\)
diff --git a/benchmark/report.rb b/benchmark/report.rb
index e931966cca..7aa852fc85 100644
--- a/benchmark/report.rb
+++ b/benchmark/report.rb
@@ -24,9 +24,7 @@ def exec_command type, file, w
end
def benchmark cmd
- rubybin = ENV['RUBY'] || File.join(
- RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+ rubybin = ENV['RUBY'] || RbConfig.ruby
IO.popen(rubybin, 'r+'){|io|
io.write cmd
diff --git a/benchmark/runc.rb b/benchmark/runc.rb
index ec1d36a61b..97c5cef045 100644
--- a/benchmark/runc.rb
+++ b/benchmark/runc.rb
@@ -5,9 +5,7 @@
require 'benchmark'
require 'rbconfig'
-$rubybin = ENV['RUBY'] || File.join(
- RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+$rubybin = ENV['RUBY'] || RbConfig.ruby
def runfile file
puts file
diff --git a/bignum.c b/bignum.c
index 3acd360bc5..d251358fe9 100644
--- a/bignum.c
+++ b/bignum.c
@@ -436,6 +436,8 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
VALUE z;
BDIGIT *zds;
+#undef ISDIGIT
+#define ISDIGIT(c) ('0' <= (c) && (c) <= '9')
#define conv_digit(c) \
(!ISASCII(c) ? -1 : \
ISDIGIT(c) ? ((c) - '0') : \
@@ -1329,6 +1331,111 @@ rb_big_cmp(VALUE x, VALUE y)
(RBIGNUM_SIGN(x) ? INT2FIX(-1) : INT2FIX(1));
}
+static VALUE
+big_op(VALUE x, VALUE y, int op)
+{
+ VALUE rel;
+ int n;
+
+ switch (TYPE(y)) {
+ case T_FIXNUM:
+ case T_BIGNUM:
+ rel = rb_big_cmp(x, y);
+ break;
+
+ case T_FLOAT:
+ {
+ double a = RFLOAT_VALUE(y);
+
+ if (isinf(a)) {
+ if (a > 0.0) return INT2FIX(-1);
+ else return INT2FIX(1);
+ }
+ rel = rb_dbl_cmp(rb_big2dbl(x), a);
+ break;
+ }
+
+ default:
+ {
+ ID id = 0;
+ switch (op) {
+ case 0: id = '>'; break;
+ case 1: id = rb_intern(">="); break;
+ case 2: id = '<'; break;
+ case 3: id = rb_intern("<="); break;
+ }
+ return rb_num_coerce_relop(x, y, id);
+ }
+ }
+
+ if (NIL_P(rel)) return Qfalse;
+ n = FIX2INT(rel);
+
+ switch (op) {
+ case 0: return n > 0 ? Qtrue : Qfalse;
+ case 1: return n >= 0 ? Qtrue : Qfalse;
+ case 2: return n < 0 ? Qtrue : Qfalse;
+ case 3: return n <= 0 ? Qtrue : Qfalse;
+ }
+ return Qundef;
+}
+
+/*
+ * call-seq:
+ * big > real -> true or false
+ *
+ * Returns <code>true</code> if the value of <code>big</code> is
+ * greater than that of <code>real</code>.
+ */
+
+static VALUE
+big_gt(VALUE x, VALUE y)
+{
+ return big_op(x, y, 0);
+}
+
+/*
+ * call-seq:
+ * big >= real -> true or false
+ *
+ * Returns <code>true</code> if the value of <code>big</code> is
+ * greater than or equal to that of <code>real</code>.
+ */
+
+static VALUE
+big_ge(VALUE x, VALUE y)
+{
+ return big_op(x, y, 1);
+}
+
+/*
+ * call-seq:
+ * big < real -> true or false
+ *
+ * Returns <code>true</code> if the value of <code>big</code> is
+ * less than that of <code>real</code>.
+ */
+
+static VALUE
+big_lt(VALUE x, VALUE y)
+{
+ return big_op(x, y, 2);
+}
+
+/*
+ * call-seq:
+ * big <= real -> true or false
+ *
+ * Returns <code>true</code> if the value of <code>big</code> is
+ * less than or equal to that of <code>real</code>.
+ */
+
+static VALUE
+big_le(VALUE x, VALUE y)
+{
+ return big_op(x, y, 3);
+}
+
/*
* call-seq:
* big == obj => true or false
@@ -1518,8 +1625,6 @@ bigsub_int(VALUE x, long y0)
#if SIZEOF_BDIGITS == SIZEOF_LONG
num = (BDIGIT_DBL_SIGNED)xds[0] - y;
if (xn == 1 && num < 0) {
- for (i=0; i<xn; i++) {
- }
RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x));
zds[0] = (BDIGIT)-num;
return bignorm(z);
@@ -1906,8 +2011,8 @@ bigmul1_karatsuba(VALUE x, VALUE y)
if (!BIGZEROP(xl) && !BIGZEROP(yl)) {
/* t2 <- xl * yl */
- t2 = bigmul0(xl, yl);
- t2n = big_real_len(t2);
+ t2 = bigmul0(xl, yl);
+ t2n = big_real_len(t2);
/* copy t2 into low bytes of the result (z0) */
MEMCPY(zds, BDIGITS(t2), BDIGIT, t2n);
@@ -2015,7 +2120,7 @@ dump_bignum(VALUE x)
long i;
printf("0x0");
for (i = RBIGNUM_LEN(x); i--; ) {
- printf("_%08x", BDIGITS(x)[i]);
+ printf("_%08x", BDIGITS(x)[i]);
}
puts("");
}
@@ -2043,7 +2148,7 @@ bigmul0(VALUE x, VALUE y)
normal:
if (x == y) return bigsqr_fast(x);
if (xn == 1 && yn == 1) return bigmul1_single(x, y);
- return bigmul1_normal(x, y);
+ return bigmul1_normal(x, y);
}
/* normal multiplication when x or y is a sparse bignum */
@@ -2490,7 +2595,7 @@ big_fdiv(VALUE x, VALUE y)
#if SIZEOF_LONG > SIZEOF_INT
{
/* Visual C++ can't be here */
- if (l > INT_MAX) return DBL2NUM(ruby_div0(1.0));
+ if (l > INT_MAX) return DBL2NUM(INFINITY);
if (l < INT_MIN) return DBL2NUM(0.0);
}
#endif
@@ -3296,6 +3401,10 @@ InitVM_Bignum(void)
rb_define_method(rb_cBignum, "<=>", rb_big_cmp, 1);
rb_define_method(rb_cBignum, "==", rb_big_eq, 1);
+ rb_define_method(rb_cBignum, ">", big_gt, 1);
+ rb_define_method(rb_cBignum, ">=", big_ge, 1);
+ rb_define_method(rb_cBignum, "<", big_lt, 1);
+ rb_define_method(rb_cBignum, "<=", big_le, 1);
rb_define_method(rb_cBignum, "===", rb_big_eq, 1);
rb_define_method(rb_cBignum, "eql?", rb_big_eql, 1);
rb_define_method(rb_cBignum, "hash", rb_big_hash, 0);
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index df444f3181..b48329665a 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -72,7 +72,7 @@ def main
@ruby.gsub!(/(\s+-r\s*)(\.\.?\/\S+)/){$1+File.expand_path($2)}
true
when /\A--sets=(.*)/
- tests = Dir.glob("#{File.dirname($0)}/test_{#{$1}}*.rb")
+ tests = Dir.glob("#{File.dirname($0)}/test_{#{$1}}*.rb").sort
puts tests.map {|path| File.basename(path) }.inspect
true
when /\A--dir=(.*)/
@@ -106,7 +106,7 @@ End
exit false
end
tests ||= ARGV
- tests = Dir.glob("#{File.dirname($0)}/test_*.rb") if tests.empty?
+ tests = Dir.glob("#{File.dirname($0)}/test_*.rb").sort if tests.empty?
pathes = tests.map {|path| File.expand_path(path) }
unless quiet
diff --git a/bootstraptest/test_eval.rb b/bootstraptest/test_eval.rb
index f63d995ffb..c5ab95302b 100644
--- a/bootstraptest/test_eval.rb
+++ b/bootstraptest/test_eval.rb
@@ -116,7 +116,7 @@ assert_equal %q{1}, %q{
Const
}
}
-assert_equal %q{C}, %q{
+assert_equal %q{top}, %q{
Const = :top
class C
Const = :C
diff --git a/bootstraptest/test_flow.rb b/bootstraptest/test_flow.rb
index 46ca1a0c6a..84ef216421 100644
--- a/bootstraptest/test_flow.rb
+++ b/bootstraptest/test_flow.rb
@@ -502,3 +502,24 @@ assert_equal %Q{ENSURE\n}, %q{
test
}, '[ruby-dev:37967]'
+[['[ruby-core:28129]', %q{
+ class Bug2728
+ include Enumerable
+ define_method(:dynamic_method) do
+ "dynamically defined method"
+ end
+ def each
+ begin
+ yield :foo
+ ensure
+ dynamic_method
+ end
+ end
+ end
+ e = Bug2728.new
+}]].each do |bug, src|
+ assert_equal "foo", src + %q{e.detect {true}}, bug
+ assert_equal "true", src + %q{e.any? {true}}, bug
+ assert_equal "false", src + %q{e.all? {false}}, bug
+ assert_equal "true", src + %q{e.include?(:foo)}, bug
+end
diff --git a/bootstraptest/test_io.rb b/bootstraptest/test_io.rb
index 2294654211..24a5b3c680 100644
--- a/bootstraptest/test_io.rb
+++ b/bootstraptest/test_io.rb
@@ -14,6 +14,7 @@ assert_finish 10, %q{
require "timeout"
timeout(3) do
r, w = IO.pipe
+ w.nonblock?
w.nonblock = true
w.write_nonblock("a" * 100000)
w.nonblock = false
@@ -26,7 +27,7 @@ assert_finish 10, %q{
t1.join
t2.join
end
- rescue LoadError, TimeoutError
+ rescue LoadError, TimeoutError, NotImplementedError
end
}, '[ruby-dev:32566]'
diff --git a/bootstraptest/test_jump.rb b/bootstraptest/test_jump.rb
index 77467337c2..bfb380e45b 100644
--- a/bootstraptest/test_jump.rb
+++ b/bootstraptest/test_jump.rb
@@ -259,3 +259,15 @@ assert_normal_exit %q{
end
end
}
+
+assert_normal_exit %q{
+ -> do
+ 1.times do
+ begin
+ raise
+ rescue
+ return
+ end
+ end
+ end.call
+}
diff --git a/bootstraptest/test_syntax.rb b/bootstraptest/test_syntax.rb
index 6843b23285..619a4cbdb1 100644
--- a/bootstraptest/test_syntax.rb
+++ b/bootstraptest/test_syntax.rb
@@ -836,3 +836,51 @@ assert_equal 'ok', %q{
assert_equal 'ok', %q{
"o" "#{}k"
}, '[ruby-dev:38980]'
+
+bug2415 = '[ruby-core:26961]'
+assert_normal_exit %q{
+ 0.times do
+ 0.times do
+ def x(a=1, b, *rest); nil end
+ end
+ end
+}, bug2415
+
+assert_normal_exit %q{
+ 0.times do
+ 0.times do
+ def x@; nil end
+ end
+ end
+}, bug2415
+
+assert_normal_exit %q{
+ 0.times do
+ 0.times do
+ def x(a = 0.times do
+ def y(a=1, b, *rest); nil; end
+ end)
+ nil
+ end
+ end
+ end
+}, bug2415
+
+assert_normal_exit %q{
+ 0.times do
+ 0.times do
+ def x(a = 0.times do
+ def x@; nil; end
+ end)
+ nil
+ end
+ end
+ end
+}, bug2415
+
+assert_normal_exit %q{
+ a {
+ b {|c.d| }
+ e
+ }
+}, '[ruby-dev:39861]'
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb
index 0e7d03d436..a7478fcd2c 100644
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -385,3 +385,61 @@ assert_equal 'ok', %q{
end
:ok
}
+
+assert_equal 'ok', %{
+ open("zzz.rb", "w") do |f|
+ f.puts <<-END
+ begin
+ m = Mutex.new
+ Thread.new { m.lock; sleep 1 }
+ sleep 0.3
+ parent = Thread.current
+ Thread.new do
+ sleep 0.3
+ begin
+ fork { GC.start }
+ rescue Exception
+ parent.raise $!
+ end
+ end
+ m.lock
+ pid, status = Process.wait2
+ $result = status.success? ? :ok : :ng
+ rescue NotImplementedError
+ $result = :ok
+ end
+ END
+ end
+ require "./zzz.rb"
+ $result
+}
+
+assert_finish 3, %q{
+ require 'thread'
+
+ lock = Mutex.new
+ cond = ConditionVariable.new
+ t = Thread.new do
+ lock.synchronize do
+ cond.wait(lock)
+ end
+ end
+
+ begin
+ pid = fork do
+ # Child
+ STDOUT.write "This is the child process.\n"
+ STDOUT.write "Child process exiting.\n"
+ end
+ Process.waitpid(pid)
+ rescue NotImplementedError
+ end
+}, '[ruby-core:23572]'
+
+assert_equal 'ok', %q{
+ begin
+ Process.waitpid2(fork {sleep 1})[1].success? ? 'ok' : 'ng'
+ rescue NotImplementedError
+ 'ok'
+ end
+}
diff --git a/class.c b/class.c
index 20834efafe..361d37b174 100644
--- a/class.c
+++ b/class.c
@@ -150,6 +150,9 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
if (RCLASS_IV_TBL(orig)) {
ID id;
+ if (RCLASS_IV_TBL(clone)) {
+ st_free_table(RCLASS_IV_TBL(clone));
+ }
RCLASS_IV_TBL(clone) = st_copy(RCLASS_IV_TBL(orig));
CONST_ID(id, "__classpath__");
st_delete(RCLASS_IV_TBL(clone), (st_data_t*)&id, 0);
@@ -158,6 +161,11 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
}
if (RCLASS_M_TBL(orig)) {
struct clone_method_data data;
+
+ if (RCLASS_M_TBL(clone)) {
+ extern void rb_free_m_table(st_table *tbl);
+ rb_free_m_table(RCLASS_M_TBL(clone));
+ }
data.tbl = RCLASS_M_TBL(clone) = st_init_numtable();
data.klass = clone;
st_foreach(RCLASS_M_TBL(orig), clone_method,
@@ -171,7 +179,10 @@ rb_mod_init_copy(VALUE clone, VALUE orig)
VALUE
rb_class_init_copy(VALUE clone, VALUE orig)
{
- if (RCLASS_SUPER(clone) != 0) {
+ if (orig == rb_cBasicObject) {
+ rb_raise(rb_eTypeError, "can't copy the root class");
+ }
+ if (RCLASS_SUPER(clone) != 0 || clone == rb_cBasicObject) {
rb_raise(rb_eTypeError, "already initialized class");
}
if (FL_TEST(orig, FL_SINGLETON)) {
@@ -434,7 +445,7 @@ rb_define_class(const char *name, VALUE super)
rb_raise(rb_eTypeError, "%s is not a class", name);
}
if (rb_class_real(RCLASS_SUPER(klass)) != super) {
- rb_name_error(id, "%s is already defined", name);
+ rb_raise(rb_eTypeError, "superclass mismatch for class %s", name);
}
return klass;
}
diff --git a/common.mk b/common.mk
index 75108885d7..b3ee071903 100644
--- a/common.mk
+++ b/common.mk
@@ -25,7 +25,7 @@ NORMALMAINOBJ = main.$(OBJEXT)
MAINOBJ = $(NORMALMAINOBJ)
EXTOBJS =
DLDOBJS = $(DMYEXT)
-MINIOBJS = $(ARCHMINIOBJS) dmyencoding.$(OBJEXT) miniprelude.$(OBJEXT)
+MINIOBJS = $(ARCHMINIOBJS) dmyencoding.$(OBJEXT) dmyversion.$(OBJEXT) miniprelude.$(OBJEXT)
ENC_MK = enc.mk
COMMONOBJS = array.$(OBJEXT) \
@@ -47,6 +47,7 @@ COMMONOBJS = array.$(OBJEXT) \
io.$(OBJEXT) \
marshal.$(OBJEXT) \
math.$(OBJEXT) \
+ node.$(OBJEXT) \
numeric.$(OBJEXT) \
object.$(OBJEXT) \
pack.$(OBJEXT) \
@@ -74,7 +75,6 @@ COMMONOBJS = array.$(OBJEXT) \
transcode.$(OBJEXT) \
util.$(OBJEXT) \
variable.$(OBJEXT) \
- version.$(OBJEXT) \
compile.$(OBJEXT) \
debug.$(OBJEXT) \
iseq.$(OBJEXT) \
@@ -89,6 +89,7 @@ COMMONOBJS = array.$(OBJEXT) \
EXPORTOBJS = dln.$(OBJEXT) \
encoding.$(OBJEXT) \
+ version.$(OBJEXT) \
$(COMMONOBJS)
OBJS = $(EXPORTOBJS) prelude.$(OBJEXT)
@@ -123,9 +124,9 @@ TESTRUN_SCRIPT = $(srcdir)/test.rb
BOOTSTRAPRUBY = $(BASERUBY)
-COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) -I. -rrbconfig $(srcdir)/tool/compile_prelude.rb
+COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb
-all: encs exts main docs
+all: main docs
main: encs exts
@$(RUNCMD) $(MKMAIN_CMD) $(MAKE)
@@ -178,7 +179,7 @@ ruby.imp: $(EXPORTOBJS)
install: install-$(INSTALLDOC)
docs: $(DOCTARGETS)
-install-all: doc pre-install-all do-install-all post-install-all
+install-all: docs pre-install-all do-install-all post-install-all
pre-install-all:: pre-install-local pre-install-ext pre-install-doc
do-install-all: $(PROGRAM)
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all --rdoc-output="$(RDOCOUT)"
@@ -349,7 +350,7 @@ do-install-doc: $(PROGRAM)
post-install-doc::
@$(NULLCMD)
-rdoc: $(PROGRAM) PHONY
+rdoc: main PHONY
@echo Generating RDoc documentation
$(XRUBY) "$(srcdir)/bin/rdoc" --all --ri --op "$(RDOCOUT)" "$(srcdir)"
nodoc: PHONY
@@ -560,6 +561,8 @@ main.$(OBJEXT): {$(VPATH)}main.c $(RUBY_H_INCLUDES) {$(VPATH)}debug.h \
marshal.$(OBJEXT): {$(VPATH)}marshal.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \
$(ENCODING_H_INCLUDES) {$(VPATH)}util.h
math.$(OBJEXT): {$(VPATH)}math.c $(RUBY_H_INCLUDES)
+node.$(OBJEXT): {$(VPATH)}node.c $(RUBY_H_INCLUDES) \
+ $(VM_CORE_H_INCLUDES)
numeric.$(OBJEXT): {$(VPATH)}numeric.c $(RUBY_H_INCLUDES) \
{$(VPATH)}util.h $(ENCODING_H_INCLUDES)
object.$(OBJEXT): {$(VPATH)}object.c $(RUBY_H_INCLUDES) {$(VPATH)}util.h
@@ -630,10 +633,12 @@ variable.$(OBJEXT): {$(VPATH)}variable.c $(RUBY_H_INCLUDES) \
{$(VPATH)}oniguruma.h {$(VPATH)}vm.h {$(VPATH)}vm_core.h
version.$(OBJEXT): {$(VPATH)}version.c $(RUBY_H_INCLUDES) \
{$(VPATH)}version.h $(srcdir)/revision.h {$(VPATH)}config.h
+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)}debug.h
+ {$(VPATH)}insns_info.inc {$(VPATH)}optinsn.inc {$(VPATH)}debug.h \
+ {$(VPATH)}optunifs.inc {$(VPATH)}opt_sc.inc
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)}debug.h
@@ -815,13 +820,16 @@ help: PHONY
@echo " Makefile of Ruby"
@echo ""
@echo "targets:"
- @echo " all (default): builds ruby"
+ @echo " all (default): builds all of below"
@echo " miniruby: builds only miniruby"
+ @echo " encs: builds encodings"
+ @echo " exts: builds extensions"
+ @echo " main: builds encodings, extensions and ruby"
+ @echo " docs: builds documents"
@echo " run: runs test.rb by miniruby"
@echo " runruby: runs test.rb by ruby you just built"
@echo " gdb: runs test.rb by miniruby under gdb"
@echo " gdb-ruby: runs test.rb by ruby under gdb"
- @echo " all: compile ruby and extensions"
@echo " check: equals make test test-all"
@echo " test: ruby core tests"
@echo " test-all: all ruby tests"
diff --git a/compile.c b/compile.c
index 5581ea8439..975167c3ec 100644
--- a/compile.c
+++ b/compile.c
@@ -1936,7 +1936,8 @@ iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
#if OPT_INSTRUCTIONS_UNIFICATION
LINK_ELEMENT *list;
INSN *iobj, *niobj;
- int id, j, k;
+ int id, k;
+ intptr_t j;
list = FIRST_ELEMENT(anchor);
while (list) {
@@ -1945,7 +1946,7 @@ iseq_insns_unification(rb_iseq_t *iseq, LINK_ANCHOR *anchor)
id = iobj->insn_id;
if (unified_insns_data[id] != 0) {
const int *const *entry = unified_insns_data[id];
- for (j = 1; j < (int)entry[0]; j++) {
+ for (j = 1; j < (intptr_t)entry[0]; j++) {
const int *unified = entry[j];
LINK_ELEMENT *li = list->next;
for (k = 2; k < unified[1]; k++) {
@@ -2549,7 +2550,8 @@ compile_cpath(LINK_ANCHOR *ret, rb_iseq_t *iseq, NODE *cpath)
}
else {
/* class at cbase Foo */
- ADD_INSN1(ret, nd_line(cpath), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
+ ADD_INSN1(ret, nd_line(cpath), putspecialobject,
+ INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE));
return Qtrue;
}
}
@@ -3710,7 +3712,8 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
if (node->nd_vid) {
- ADD_INSN1(ret, nd_line(node), putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_CBASE));
+ ADD_INSN1(ret, nd_line(node), putspecialobject,
+ INT2FIX(VM_SPECIAL_OBJECT_CONST_BASE));
ADD_INSN1(ret, nd_line(node), setconstant, ID2SYM(node->nd_vid));
}
else {
diff --git a/configure.in b/configure.in
index 395c176510..9cfe675a0b 100644
--- a/configure.in
+++ b/configure.in
@@ -9,23 +9,12 @@ 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_DEFUN([when], dnl [(] makes parentheses balanced.
-dnl note that spaces after comma need to be quoted.
-[[$*]][)])
-
dnl environment section {
AC_ARG_WITH(baseruby,
AS_HELP_STRING([--with-baseruby=RUBY], [use RUBY as baseruby; RUBY is the pathname of ruby]),
[
- case "$withval" in
- when(*ruby*)
- BASERUBY=$withval
- ;;
- when(*)
- AC_MSG_ERROR(need ruby)
- ;;
- esac
+ AS_CASE(["$withval"],[*ruby*],[BASERUBY=$withval],[AC_MSG_ERROR(need ruby)])
],
[
BASERUBY="ruby"
@@ -35,8 +24,8 @@ test "`RUBYOPT=- $BASERUBY -e 'p 42' 2>/dev/null`" = 42 ||
AC_SUBST(BASERUBY)
AC_DEFUN([RUBY_MINGW32],
-[case "$host_os" in
-when(cygwin*)
+[AS_CASE(["$host_os"],
+[cygwin*], [
AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32,
[AC_TRY_CPP([
#ifndef __MINGW32__
@@ -45,8 +34,7 @@ AC_CACHE_CHECK(for mingw32 environment, rb_cv_mingw32,
], rb_cv_mingw32=yes,rb_cv_mingw32=no)
rm -f conftest*])
test "$rb_cv_mingw32" = yes && target_os="mingw32"
- ;;
-esac])
+ ])])
AC_DEFUN([RUBY_CPPOUTFILE],
[AC_CACHE_CHECK(whether ${CPP} accepts -o, rb_cv_cppoutfile,
@@ -95,23 +83,17 @@ dnl checks for alternative programs
AC_ARG_WITH(gcc,
AS_HELP_STRING([--without-gcc], [never use gcc]),
[
- case $withval in
- when(no)
- : ${CC=cc}
- ;;
- when(yes)
- : ${CC=gcc}
- ;;
- when(*)
- CC=$withval
- ;;
- esac])
+ AS_CASE([$withval],
+ [no], [: ${CC=cc}],
+ [yes], [: ${CC=gcc}],
+ [CC=$withval])])
dnl If the user switches compilers, we can't believe the cache
if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
then
AC_MSG_ERROR(cached CC is different -- throw away $cache_file
(it is also a good idea to do 'make clean' before compiling))
fi
+test -z "$CC" || ac_cv_prog_CC="$CC"
if test "$program_prefix" = NONE; then
program_prefix=
@@ -126,24 +108,22 @@ target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'`
ac_install_sh='' # unusable for extension libraries.
AC_DEFUN([RUBY_APPEND_OPTION],
- [case " [$]{$1-} " in # RUBY_APPEND_OPTION($1, $2)
- when(*' $2 '*);; when(' ') $1="$2";; when(*) $1="[$]$1 $2";;
- esac])
+ [# RUBY_APPEND_OPTION($1, $2)
+ AS_CASE([" [$]{$1-} "],
+ [*' $2 '*], [], [' '], [ $1="$2"], [ $1="[$]$1 $2"])])
AC_DEFUN([RUBY_APPEND_OPTIONS],
[{ for rb_opt in $2; do # RUBY_APPEND_OPTIONS($1, $2)
- case " [$]{$1-} " in
- when(*" [$]{rb_opt} "*);; when(' ') $1="[$]{rb_opt}";; when(*) $1="[$]$1 [$]{rb_opt}";;
- esac
+ AS_CASE([" [$]{$1-} "],
+ [*" [$]{rb_opt} "*], [], [' '], [ $1="[$]{rb_opt}"], [ $1="[$]$1 [$]{rb_opt}"])
done; }])
AC_DEFUN([RUBY_PREPEND_OPTION],
- [case " [$]{$1-} " in # RUBY_PREPEND_OPTION($1, $2)
- when(*' $2 '*);; when(' ') $1="$2";; when(*) $1="$2 [$]$1";;
- esac])
+ [# RUBY_PREPEND_OPTION($1, $2)
+ AS_CASE([" [$]{$1-} "],
+ [*' $2 '*], [], [' '], [ $1="$2"], [ $1="$2 [$]$1"])])
AC_DEFUN([RUBY_PREPEND_OPTIONS],
[{ unset rb_opts; for rb_opt in $2; do # RUBY_PREPEND_OPTIONS($1, $2)
- case " [$]{rb_opts} [$]{$1-} " in
- when(*" [$]{rb_opt} "*);; when(' ') $1="[$]{rb_opt}";; when(*) rb_opts="[$]{rb_opts}[$]{rb_opt} ";;
- esac
+ AS_CASE([" [$]{rb_opts} [$]{$1-} "],
+ [*" [$]{rb_opt} "*], [], [' '], [ $1="[$]{rb_opt}"], [ rb_opts="[$]{rb_opts}[$]{rb_opt} "])
done
$1="[$]{rb_opts}[$]$1"; }])
@@ -166,10 +146,7 @@ if test ${target_archs+set}; then
# /usr/lib/arch_tool -archify_list $TARGET_ARCHS
for archs in $target_archs
do
- case ",$universal_binary," in
- when(*",$archs,"*)
- ;;
- when(*)
+ AS_CASE([",$universal_binary,"],[*",$archs,"*], [],[
cpu=`$SHELL "$ac_aux_dir/config.sub" "${archs}-${target_os}" 2>&1` || {
AC_MSG_RESULT([failed])
AC_MSG_ERROR([$cpu])
@@ -178,15 +155,13 @@ if test ${target_archs+set}; then
universal_binary="${universal_binary+$universal_binary,}$cpu"
universal_archnames="${universal_archnames} ${archs}=${cpu}"
ARCH_FLAG="${ARCH_FLAG+$ARCH_FLAG }-arch $archs"
- ;;
- esac
+ ])
done
target_archs="$universal_binary"
unset universal_binary
- case "$target_archs" in
- when(*,*) universal_binary=yes;;
- when(*) unset universal_archnames;;
- esac
+ AS_CASE(["$target_archs"],
+ [*,*], [universal_binary=yes],
+ [unset universal_archnames])
AC_MSG_RESULT([$target_archs])
target=`echo $target | sed "s/^$target_cpu-/-/"`
@@ -199,14 +174,14 @@ if test ${target_archs+set}; then
else
target_cpu=${target_archs}
fi
- case "$target" in when(-*) target="$target_cpu${target}";; esac
- case "$target_alias" in when(-*) target_alias="$target_cpu${target_alias}";; esac
+ AS_CASE(["$target"], [-*], [ target="$target_cpu${target}"])
+ AS_CASE(["$target_alias"], [-*], [ target_alias="$target_cpu${target_alias}"])
CFLAGS="$CFLAGS ${ARCH_FLAG}"
LDFLAGS="${LDFLAGS+$LDFLAGS }${ARCH_FLAG}"
else
if test x"$target_alias" = x; then
- case "$target_os" in
- when(darwin*)
+ AS_CASE(["$target_os"],
+ [darwin*], [
AC_MSG_CHECKING([for real target cpu])
target=`echo $target | sed "s/^$target_cpu-/-/"`
target_cpu=`$CC -E - 2>/dev/null <<EOF |
@@ -226,8 +201,7 @@ EOF
sed -n 's/^"processor-name=\(.*\)"/\1/p'`
target="$target_cpu${target}"
AC_MSG_RESULT([$target_cpu])
- ;;
- esac
+ ])
fi
target_archs="$target_cpu"
fi
@@ -269,10 +243,7 @@ AC_SUBST(GCC)
if test "$GCC" = yes; then
linker_flag=-Wl,
: ${optflags=-O3}
- case "$target_os" in
- when(linux*|darwin*)
- : ${debugflags=-ggdb};;
- esac
+ AS_CASE(["$target_os"], [linux*|darwin*], [: ${debugflags=-ggdb}])
else
linker_flag=
fi
@@ -299,50 +270,38 @@ AC_CHECK_TOOL(AS, as)
ASFLAGS=$ASFLAGS
AC_SUBST(ASFLAGS)
-case "$target_os" in
-when(cygwin*|mingw*|darwin*)
- ac_cv_prog_ac_ct_OBJCOPY=":";;
-esac
+AS_CASE(["$target_os"],[cygwin*|mingw*|darwin*], [ac_cv_prog_ac_ct_OBJCOPY=":"])
# BSD's ports and MacPorts prefix GNU binutils with 'g'
AC_CHECK_TOOLS(OBJDUMP, [objdump gobjdump])
AC_CHECK_TOOLS(OBJCOPY, [objcopy gobjcopy])
-case "$target_os" in
-when(cygwin*|mingw*)
+AS_CASE(["$target_os"],
+[cygwin*|mingw*], [
AC_CHECK_TOOL(NM, nm)
AC_CHECK_TOOL(WINDRES, windres)
AC_CHECK_TOOL(DLLWRAP, dllwrap)
target=`echo $target | sed "s/^$target_cpu-/-/"`
target_alias=`echo $target_alias | sed "s/^$target_cpu-/-/"`
target_cpu=`echo $target_cpu | sed s/i.86/i386/`
- case "$target" in when(-*) target="$target_cpu${target}";; esac
- case "$target_alias" in when(-*) target_alias="$target_cpu${target_alias}";; esac
- case "$target_os" in
- when(mingw*)
+ AS_CASE(["$target"], [-*], [ target="$target_cpu${target}"])
+ AS_CASE(["$target_alias"], [-*], [ target_alias="$target_cpu${target_alias}"])
+ AS_CASE(["$target_os"],
+ [mingw*], [
test "$rb_cv_msvcrt" = "" && unset rb_cv_msvcrt
AC_CACHE_CHECK(for mingw32 runtime DLL, rb_cv_msvcrt, [
- AC_TRY_LINK([#include <stdio.h>],
+ AC_TRY_LINK([@%:@include <stdio.h>],
[FILE* volatile f = stdin; return 0;],
[rb_cv_msvcrt=`$OBJDUMP -p conftest$ac_exeext |
tr A-Z a-z |
sed -n '/^[[ ]]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'`],
[rb_cv_msvcrt=msvcrt])
test "$rb_cv_msvcrt" = "" && rb_cv_msvcrt=msvcrt])
- esac
+ ])
: ${enable_shared=yes}
- ;;
-when(aix*)
- AC_CHECK_TOOL(NM, nm, /usr/ccs/bin/nm, /usr/ccs/bin:$PATH)
- ;;
-when(hiuxmpp*)
- # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
- AC_DEFINE(__HIUX_MPP__)
- ;;
-*)
- AC_CHECK_TOOL(NM, nm)
- ;;
-esac
+ ],
+[aix*], [AC_CHECK_TOOL(NM, nm, /usr/ccs/bin/nm, /usr/ccs/bin:$PATH)],
+[hiuxmpp*], [AC_DEFINE(__HIUX_MPP__)]) # by TOYODA Eizi <toyoda@npd.kishou.go.jp>
AC_PROG_LN_S
AC_PROG_MAKE_SET
@@ -414,12 +373,8 @@ if test "$GCC:${warnflags+set}:no" = yes::no; then
-Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long; do
RUBY_TRY_CFLAGS($wflag, [warnflags="${warnflags+$warnflags }$wflag"])
done
- case " $warnflags " in
- when(*" -Wno-missing-field-initializers "*)
- wflag=-Wextra;;
- when(*)
- wflag=-Wall;;
- esac
+ AS_CASE([" $warnflags "],[*" -Wno-missing-field-initializers "*], [wflag=-Wextra],
+ [wflag=-Wall])
RUBY_TRY_CFLAGS($wflag, [warnflags="$wflag${warnflags+ $warnflags}"])
fi
@@ -434,12 +389,7 @@ mv confdefs.h largefile.h
mv confdefs1.h confdefs.h
cat largefile.h >> confdefs.h
-case "$target_os" in
-when(mingw*)
- ac_cv_type_off_t=yes
- ac_cv_sizeof_off_t=8
- ;;
-esac
+AS_CASE(["$target_os"],[mingw*], [ac_cv_type_off_t=yes;ac_cv_sizeof_off_t=8])
AC_CHECK_TYPES([long long, off_t])
@@ -490,8 +440,10 @@ static ac__type_sizeof_ *rbcv_ptr;
done
}])
m4_ifval([$2][$3], [case "${AS_TR_SH(ac_cv_sizeof_$1)}" in
- when([SIZEOF_*]);;
- when(*)])
+ #(
+ [SIZEOF_*]);;
+ #(
+ *)])
test "$universal_binary" = yes && cross_compiling=yes
AC_COMPUTE_INT([t], AS_TR_CPP(SIZEOF_$1), [AC_INCLUDES_DEFAULT([$4])]
[${cond+$cond
@@ -511,19 +463,18 @@ ${cond+@%:@endif}
{
unset cond
for t in ${AS_TR_SH(ac_cv_sizeof_$1)-}; do
- case "$t" in
- when([[0-9]*|SIZEOF_*])
+ AS_CASE(["$t"],
+ [[[0-9]*|SIZEOF_*]], [
${cond+echo "@%:@else"}
echo "[@%:@define ]AS_TR_CPP(SIZEOF_$1) [$t]"
break
- ;;
- when([*])
+ ],
+ [
s=`expr $t : ['.*[^0-9]\([0-9][0-9]*\)$']`
echo "@%:@${cond+el}if defined(__${t}__) || defined(__${t}) || defined(_${t}) || defined($t)"
echo "@%:@define AS_TR_CPP(SIZEOF_$1) [$[s / rb_cv_char_bit]]"
cond=1
- ;;
- esac
+ ])
done
${cond+echo "@%:@endif"}
} >> confdefs.h
@@ -548,15 +499,14 @@ AC_DEFUN([RUBY_REPLACE_TYPE], [dnl
AC_CHECK_TYPE([$1], [n=[$1]], [n=[$2]], [$4])
AC_CACHE_CHECK([for convertible type of [$1]], rb_cv_[$1]_convertible, [
u= t=
- case "$n " in
- when(*" signed "*) ;;
- when(*" unsigned "*)
- u=U;;
- when(*)
+ AS_CASE(["$n "],
+ [*" signed "*], [ ],
+ [*" unsigned "*], [
+ u=U],
+ [
AC_COMPILE_IFELSE(
[AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT([$4])], [($n)-1 > 0])],
- [u=U]);;
- esac
+ [u=U])])
if test x"$t" = x; then
for t in "long long" long int short; do
test -n "$u" && t="unsigned $t"
@@ -572,14 +522,13 @@ AC_DEFUN([RUBY_REPLACE_TYPE], [dnl
[n="$t"; break])
done
fi
- case " $n " in
- when(*" long long "*)
- t=LL;;
- when(*" long "*)
- t=LONG;;
- when(*)
- t=INT;;
- esac
+ AS_CASE([" $n "],
+ [*" long long "*], [
+ t=LL],
+ [*" long "*], [
+ t=LONG],
+ [
+ t=INT])
rb_cv_[$1]_convertible=${u}${t}])
test "${AS_TR_SH(ac_cv_type_[$1])}" = "yes" && n="$1"
AC_DEFINE_UNQUOTED(rb_[$1], $n)
@@ -773,13 +722,10 @@ AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default
AC_ARG_ENABLE(win95,
AS_HELP_STRING([--enable-win95], [enable Windows 95 series support]),
- [case "$enableval" in
- when(yes|no) enable_win95=$enableval;;
- when(*) unset enable_win95;;
- esac])
+ [AS_CASE(["$enableval"],[yes|no],[enable_win95=$enableval],[unset enable_win95])])
-case "$target_os" in
-when(freebsd*)
+AS_CASE(["$target_os"],
+[freebsd*], [
AC_CACHE_CHECK([whether pthread should be enabled by default],
rb_cv_enable_pthread_default,
[AC_TRY_CPP([
@@ -791,36 +737,29 @@ when(freebsd*)
rb_cv_enable_pthread_default=yes,
rb_cv_enable_pthread_default=no)])
enable_pthread=$rb_cv_enable_pthread_default
- ;;
-when(mingw*)
+ ],
+[mingw*], [
enable_pthread=no
- ;;
-when(*)
+ ],
+[
enable_pthread=yes
- ;;
-esac
+ ])
AC_ARG_ENABLE(pthread,
AS_HELP_STRING([--enable-pthread], [obsolete, and ignored]))
dnl Checks for libraries.
-case "$target_os" in
-when(*bsd*|dragonfly*)
- ;;
-when(*)
- ac_cv_func_daemon=no
- ;;
-esac
-
-case "$target_os" in
-when(solaris*)
+AS_CASE(["$target_os"],[*bsd*|dragonfly*],[],[ac_cv_func_daemon=no])
+
+AS_CASE(["$target_os"],
+[solaris*], [
AC_DEFINE(SIZEOF_STRUCT_DIRENT_TOO_SMALL, 1)
LIBS="-lm $LIBS"
- ;;
-when(nextstep*) ;;
-when(openstep*) ;;
-when(rhapsody*) ;;
-when(darwin*) RUBY_PREPEND_OPTION(LIBS, -lobjc)
+ ],
+[nextstep*], [ ],
+[openstep*], [ ],
+[rhapsody*], [ ],
+[darwin*], [ RUBY_PREPEND_OPTION(LIBS, -lobjc)
RUBY_APPEND_OPTIONS(CPPFLAGS, -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE)
AC_MSG_CHECKING(whether Mac OS X 10.5 or later)
AC_TRY_CPP([#include <AvailabilityMacros.h>
@@ -871,10 +810,10 @@ main()
if test "$rb_cv_broken_crypt" = yes; then
AC_DEFINE(BROKEN_CRYPT, 1)
fi
- ;;
-when(hpux*) LIBS="-lm $LIBS"
- ac_cv_c_inline=no;;
-when(human*) ac_cv_func_getpgrp_void=yes
+ ],
+[hpux*], [ LIBS="-lm $LIBS"
+ ac_cv_c_inline=no],
+[human*], [ ac_cv_func_getpgrp_void=yes
ac_cv_func_setitimer=no
AC_CHECK_LIB(signal, _harderr)
AC_CHECK_LIB(hmem, hmemset)
@@ -912,21 +851,20 @@ main()
if test "$rb_cv_missing_fconvert" = yes; then
AC_DEFINE(MISSING_FCONVERT)
fi
- ;;
-when(beos*|haiku*)
+ ],
+[beos*|haiku*], [
ac_cv_func_link=no
ac_cv_func_sched_yield=no
ac_cv_func_pthread_attr_setinheritsched=no
- case "$target_os" in
- when(beos*) ac_cv_header_net_socket_h=yes;;
- when(haiku*) ac_cv_func_shutdown=no;;
- esac
+ 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
- ;;
-when(cygwin*) ac_cv_header_langinfo_h=yes
+ ],
+[cygwin*], [ ac_cv_header_langinfo_h=yes
AC_LIBOBJ([langinfo])
- ;;
-when(mingw*) LIBS="-lshell32 -lws2_32 $LIBS"
+ ],
+[mingw*], [ LIBS="-lshell32 -lws2_32 $LIBS"
ac_cv_header_a_out_h=no
ac_cv_header_pwd_h=no
ac_cv_header_utime_h=no
@@ -960,10 +898,10 @@ when(mingw*) LIBS="-lshell32 -lws2_32 $LIBS"
ac_cv_func_flock=yes
AC_LIBOBJ([langinfo])
: ${enable_win95=maybe}
- ;;
-when(os2-emx*) LIBS="-lm $LIBS"
- ac_cv_lib_dir_opendir=no;;
-when(msdosdjgpp*)
+ ],
+[os2-emx*], [ LIBS="-lm $LIBS"
+ ac_cv_lib_dir_opendir=no],
+[msdosdjgpp*], [
LIBS="-lm $LIBS"
ac_cv_func_getpgrp_void=yes
ac_cv_func_setitimer=no
@@ -971,21 +909,20 @@ when(msdosdjgpp*)
ac_cv_func_fork=no
ac_cv_func_setrlimit=no
ac_cv_header_sys_socket_h=no
- ;;
-when(bsdi*) LIBS="-lm $LIBS"
+ ],
+[bsdi*], [ LIBS="-lm $LIBS"
AC_DEFINE(BROKEN_SETREUID, 1)
AC_DEFINE(BROKEN_SETREGID, 1)
- ac_cv_sizeof_rlim_t=8;;
-when(freebsd*) LIBS="-lm $LIBS"
- ;;
-when(dragonfly*) LIBS="-lm $LIBS"
- ;;
-when(bow) ac_cv_func_setitimer=no
- ;;
-when(superux*) ac_cv_func_setitimer=no
- ;;
-when(*) LIBS="-lm $LIBS";;
-esac
+ ac_cv_sizeof_rlim_t=8],
+[freebsd*], [ LIBS="-lm $LIBS"
+ ],
+[dragonfly*], [ LIBS="-lm $LIBS"
+ ],
+[bow], [ ac_cv_func_setitimer=no
+ ],
+[superux*], [ ac_cv_func_setitimer=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
@@ -999,12 +936,13 @@ if test "${enable_win95}" = yes; then
LIBS="-lunicows $LIBS"
fi
-case "$target_cpu" in
-when(alpha*) case "$target_os"::"$GCC" in
- when(*::yes) CFLAGS="-mieee $CFLAGS" ;; # gcc
- when(osf*) CFLAGS="-ieee $CFLAGS" ;; # ccc
- esac ;;
-esac
+AS_CASE(["$target_cpu"],
+[alpha*], [AS_CASE(["$target_os"::"$GCC"],
+ [*::yes], # gcc
+ [CFLAGS="-mieee $CFLAGS"],
+ [osf*], # ccc
+ [CFLAGS="-ieee $CFLAGS"],
+ )])
ac_cv_header_net_socket_h=${ac_cv_header_net_socket_h=no}
if test "$ac_cv_header_net_socket_h" = yes; then
@@ -1066,6 +1004,13 @@ AC_CHECK_TYPES([struct timespec], [], [], [@%:@ifdef HAVE_TIME_H
@%:@include <time.h>
@%:@endif])
+AC_CHECK_TYPES([struct timezone], [], [], [@%:@ifdef HAVE_TIME_H
+@%:@ include <time.h>
+@%:@endif
+@%:@ifdef HAVE_SYS_TIME_H
+@%:@ include <sys/time.h>
+@%:@endif])
+
AC_CHECK_TYPE(fd_mask, [AC_DEFINE(HAVE_RB_FD_INIT, 1)])
dnl RUBY_DEFINT TYPENAME, SIZE, [SIGNED-OR-UNSIGNED], [INCLUDES = DEFAULT-INCLUDES]
@@ -1074,15 +1019,14 @@ AC_CACHE_CHECK([for $1], [rb_cv_type_$1],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])
typedef $1 t; int s = sizeof(t) == 42;])],
[rb_cv_type_$1=yes],
- [case m4_bmatch([$2], [^[1-9][0-9]*$], $2, [$ac_cv_sizeof_]AS_TR_SH($2)) in
- when("1") rb_cv_type_$1="m4_if([$3], [], [signed ], [$3 ])char";;
- when("$ac_cv_sizeof_short") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])short";;
- when("$ac_cv_sizeof_int") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])int";;
- when("$ac_cv_sizeof_long") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long";;
- when("$ac_cv_sizeof_long_long") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])long long";;
- when("$ac_cv_sizeof___int64") rb_cv_type_$1="m4_if([$3], [], [], [$3 ])__int64";;
- when(*) rb_cv_type_$1=no;;
- esac])])
+ [AS_CASE([m4_bmatch([$2], [^[1-9][0-9]*$], $2, [$ac_cv_sizeof_]AS_TR_SH($2))],
+ ["1"], [ rb_cv_type_$1="m4_if([$3], [], [signed ], [$3 ])char"],
+ ["$ac_cv_sizeof_short"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])short"],
+ ["$ac_cv_sizeof_int"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])int"],
+ ["$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"],
+ [ rb_cv_type_$1=no])])])
if test "${rb_cv_type_$1}" != no; then
AC_DEFINE([HAVE_]AS_TR_CPP($1), 1)
if test "${rb_cv_type_$1}" = yes; then
@@ -1124,23 +1068,22 @@ fi
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
-case "${target_cpu}-${target_os}:${target_archs}" in
-when(powerpc-darwin*)
+AS_CASE(["${target_cpu}-${target_os}:${target_archs}"],
+[powerpc-darwin*], [
AC_LIBSOURCES(alloca.c)
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}])
AC_DEFINE(C_ALLOCA)
AC_DEFINE_UNQUOTED(alloca, alloca)
- ;;
-when(universal-darwin*:*ppc*)
+ ],
+[universal-darwin*:*ppc*], [
AC_LIBSOURCES(alloca.c)
AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.${ac_objext}])
RUBY_DEFINE_IF([defined __powerpc__], C_ALLOCA, 1)
RUBY_DEFINE_IF([defined __powerpc__], alloca, alloca)
- ;;
-when(*)
+ ],
+[
AC_FUNC_ALLOCA
- ;;
-esac
+ ])
AC_FUNC_MEMCMP
# http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html
@@ -1159,9 +1102,7 @@ main()
rb_cv_broken_glibc_ia64_erfc=no,
rb_cv_broken_glibc_ia64_erfc=yes,
rb_cv_broken_glibc_ia64_erfc=no)])
-case $rb_cv_broken_glibc_ia64_erfc in
- when(yes) ac_cv_func_erf=no;;
-esac
+AS_CASE([$rb_cv_broken_glibc_ia64_erfc],[yes],[ac_cv_func_erf=no])
AC_REPLACE_FUNCS(dup2 memmove strerror\
strchr strstr crypt flock vsnprintf\
@@ -1180,6 +1121,16 @@ AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall chroot getcwd eacce
mktime timegm gmtime_r clock_gettime gettimeofday\
pread sendfile shutdown sigaltstack)
+AC_CACHE_CHECK(for unsetenv returns a value, rb_cv_unsetenv_return_value,
+ [AC_TRY_COMPILE([
+#include <stdlib.h>
+], [int v = unsetenv("foo");],
+ rb_cv_unsetenv_return_value=yes,
+ rb_cv_unsetenv_return_value=no)])
+if test "$rb_cv_unsetenv_return_value" = no; then
+ AC_DEFINE(VOID_UNSETENV)
+fi
+
AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
[AC_TRY_LINK([@%:@include <setjmp.h>
jmp_buf jb; void t(v) int v; {__builtin_longjmp(jb, v);}],
@@ -1194,14 +1145,13 @@ AC_MSG_CHECKING(for setjmp type)
AC_ARG_WITH(setjmp-type,
AS_HELP_STRING([--with-setjmp-type], [select setjmp type]),
[
- case $withval in
- when(__builtin_setjmp) setjmp_prefix=__builtin_;;
- when(_setjmp) setjmp_prefix=_;;
- when(sigsetjmp) setjmp_prefix=sig;;
- when(setjmp) setjmp_prefix=;;
- when('') unset setjmp_prefix;;
- when(*) AC_MSG_ERROR(invalid setjmp type: $withval);;
- esac], [unset setjmp_prefix])
+ AS_CASE([$withval],
+ [__builtin_setjmp], [ setjmp_prefix=__builtin_],
+ [_setjmp], [ setjmp_prefix=_],
+ [sigsetjmp], [ setjmp_prefix=sig],
+ [setjmp], [ setjmp_prefix=],
+ [''], [ 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 = no; then
AC_MSG_ERROR(${setjmp_prefix}setjmp is not available)
@@ -1211,12 +1161,7 @@ elif test "$ac_cv_func___builtin_setjmp" = yes; then
elif test "$ac_cv_func__setjmp" = yes; then
setjmp_prefix=_
elif test "$ac_cv_func_sigsetjmp" = yes; then
- case $target_os in
- when(solaris*|cygwin*)
- setjmp_prefix=;;
- when(*)
- setjmp_prefix=sig;;
- esac
+ AS_CASE([$target_os],[solaris*|cygwin*],[setjmp_prefix=],[setjmp_prefix=sig])
else
setjmp_prefix=
fi
@@ -1488,10 +1433,10 @@ fi
AC_DEFUN(RUBY_STACK_GROW_DIRECTION, [
AC_CACHE_CHECK(stack growing direction on $1, rb_cv_stack_grow_dir_$1, [
-case "$1" in
-when(m68*|x86*|i?86|ia64|ppc*|sparc*|alpha*) $2=-1;;
-when(hppa*) $2=+1;;
-when(*)
+AS_CASE(["$1"],
+[m68*|x86*|i?86|ia64|ppc*|sparc*|alpha*], [ $2=-1],
+[hppa*], [ $2=+1],
+[
AC_TRY_RUN([
/* recurse to get rid of inlining */
static int
@@ -1510,8 +1455,7 @@ int main()
return stack_growup_p(&x, 10);
}
], $2=-1, $2=+1, $2=0)
- ;;
-esac
+ ])
eval rb_cv_stack_grow_dir_$1=\$$2])
eval $2=\$rb_cv_stack_grow_dir_$1])
if test "${universal_binary-no}" = yes ; then
@@ -1555,22 +1499,19 @@ if test x"$enable_pthread" = xyes; then
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
AC_DEFINE(HAVE_LIBPTHREAD)
- case $pthread_lib in
- when(c)
- ;;
- when(root)
- ;;
- when(c_r)
- MAINLIBS="-pthread $MAINLIBS"
- ;;
- when(*)
- LIBS="-l$pthread_lib $LIBS"
- ;;
- esac
+ AC_CHECK_HEADERS(pthread_np.h)
+ AS_CASE([$pthread_lib],
+ [c], [],
+ [root], [],
+ [c_r], [MAINLIBS="-pthread $MAINLIBS"],
+ [LIBS="-l$pthread_lib $LIBS"])
else
AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled")
fi
- AC_CHECK_FUNCS(nanosleep sched_yield pthread_attr_setinheritsched)
+ AC_CHECK_FUNCS(nanosleep sched_yield pthread_attr_setinheritsched \
+ pthread_getattr_np pthread_attr_get_np pthread_attr_getstack\
+ pthread_get_stackaddr_np pthread_get_stacksize_np \
+ thr_stksegment pthread_stackseg_np)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_getstack)
AC_CHECK_FUNCS(pthread_attr_get_np)
AC_CHECK_FUNCS(pthread_get_stackaddr_np pthread_get_stacksize_np)
@@ -1683,24 +1624,19 @@ dnl wheather use dln_a_out or not
AC_ARG_WITH(dln-a-out,
AS_HELP_STRING([--with-dln-a-out], [use dln_a_out if possible]),
[
- case $withval in
- when(yes)
+ AS_CASE([$withval],
+ [yes], [
if test "$enable_shared" = yes; then
AC_MSG_ERROR(dln_a_out can not make shared library)
fi
- with_dln_a_out=yes;;
- when(*)
- with_dln_a_out=no;;
- esac], [with_dln_a_out=no])
+ with_dln_a_out=yes],
+ [
+ with_dln_a_out=no])], [with_dln_a_out=no])
AC_CACHE_CHECK(whether ELF binaries are produced, rb_cv_binary_elf,
[AC_TRY_LINK([],[], [
-case "`head -1 conftest$EXEEXT | cat -e`" in
-when('^?ELF'*)
- rb_cv_binary_elf=yes;;
-when(*)
- rb_cv_binary_elf=no;;
-esac],
+AS_CASE(["`head -1 conftest$EXEEXT | cat -e`"],
+['^?ELF'*], [rb_cv_binary_elf=yes], [rb_cv_binary_elf=no])],
rb_cv_binary_elf=no)])
if test "$rb_cv_binary_elf" = yes; then
@@ -1710,14 +1646,13 @@ if test "$rb_cv_binary_elf" = yes; then
fi
fi
-case "$target_os" in
-when(linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu)
+AS_CASE(["$target_os"],
+[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu], [
if test "$rb_cv_binary_elf" = no; then
with_dln_a_out=yes
else
LDFLAGS="$LDFLAGS -rdynamic"
- fi;;
-esac
+ fi])
LIBEXT=a
AC_SUBST(DLDFLAGS)dnl
@@ -1738,8 +1673,8 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=unknown
AC_MSG_CHECKING(whether OS depend dynamic link works)
if test "$GCC" = yes; then
- case "$target_os" in
- when(nextstep*|openstep*|rhapsody*|darwin*)
+ AS_CASE(["$target_os"],
+ [nextstep*|openstep*|rhapsody*|darwin*], [
# The -fno-common is needed if we wish to embed the Ruby interpreter
# into a plugin module of some project (as opposed to embedding it
# within the project's application). The -I/usr/local/include is
@@ -1747,19 +1682,17 @@ if test "$with_dln_a_out" != yes; then
# fails to consult /usr/local/include by default. This causes
# mkmf.rb's have_header() to fail if the desired resource happens to be
# installed in the /usr/local tree.
- RUBY_APPEND_OPTION(CCDLFLAGS, -fno-common);;
- when(human*|bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*) ;;
- when(*)
- RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC);;
- esac
+ RUBY_APPEND_OPTION(CCDLFLAGS, -fno-common)],
+ [human*|bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*], [ ],
+ [
+ RUBY_APPEND_OPTION(CCDLFLAGS, -fPIC)])
else
- case "$target_os" in
- when(hpux*) CCDLFLAGS="$CCDLFLAGS +Z";;
- when(solaris*|irix*) CCDLFLAGS="$CCDLFLAGS -KPIC" ;;
- when(sunos*) CCDLFLAGS="$CCDLFLAGS -PIC" ;;
- when(esix*|uxpds*) CCDLFLAGS="$CCDLFLAGS -KPIC" ;;
- when(*) : ${CCDLFLAGS=""} ;;
- esac
+ AS_CASE(["$target_os"],
+ [hpux*], [CCDLFLAGS="$CCDLFLAGS +Z"],
+ [solaris*|irix*], [CCDLFLAGS="$CCDLFLAGS -KPIC"],
+ [sunos*], [CCDLFLAGS="$CCDLFLAGS -PIC"],
+ [esix*|uxpds*], [CCDLFLAGS="$CCDLFLAGS -KPIC"],
+ [: ${CCDLFLAGS=""}])
fi
@@ -1770,16 +1703,16 @@ if test "$with_dln_a_out" != yes; then
RPATHFLAG=" ${linker_flag}-R%1\$-s"
fi
- case "$target_os" in
- when(hpux*) DLDFLAGS="$DLDFLAGS -E"
+ AS_CASE(["$target_os"],
+ [hpux*], [ DLDFLAGS="$DLDFLAGS -E"
: ${LDSHARED='ld -b'}
XLDFLAGS="$XLDFLAGS -Wl,-E"
: ${LIBPATHENV=SHLIB_PATH}
if test "$rb_cv_prog_gnu_ld" = no; then
RPATHFLAG=' +b %1$-s'
fi
- rb_cv_dlopen=yes;;
- when(solaris*) if test "$GCC" = yes; then
+ rb_cv_dlopen=yes],
+ [solaris*], [ if test "$GCC" = yes; then
: ${LDSHARED='$(CC) -shared'}
if test "$rb_cv_prog_gnu_ld" = yes; then
LDFLAGS="$LDFLAGS -Wl,-E"
@@ -1787,34 +1720,33 @@ if test "$with_dln_a_out" != yes; then
else
: ${LDSHARED='ld -G'}
fi
- rb_cv_dlopen=yes;;
- when(sunos*) : ${LDSHARED='ld -assert nodefinitions'}
- rb_cv_dlopen=yes;;
- when(irix*) : ${LDSHARED='ld -shared'}
- rb_cv_dlopen=yes;;
- when(sysv4*) : ${LDSHARED='ld -G'}
- rb_cv_dlopen=yes;;
- when(nto-qnx*) : ${LDSHARED="qcc -shared"}
- rb_cv_dlopen=yes ;;
- when(esix*|uxpds*) : ${LDSHARED="ld -G"}
- rb_cv_dlopen=yes ;;
- when(osf*) : ${LDSHARED="ld -shared -expect_unresolved \"*\""}
- rb_cv_dlopen=yes ;;
- when(bsdi3*) case "$CC" in
- when(*shlicc*) : ${LDSHARED="$CC -r"}
- rb_cv_dlopen=yes ;;
- esac ;;
- when(linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu)
+ rb_cv_dlopen=yes],
+ [sunos*], [ : ${LDSHARED='ld -assert nodefinitions'}
+ rb_cv_dlopen=yes],
+ [irix*], [ : ${LDSHARED='ld -shared'}
+ rb_cv_dlopen=yes],
+ [sysv4*], [ : ${LDSHARED='ld -G'}
+ rb_cv_dlopen=yes],
+ [nto-qnx*], [ : ${LDSHARED="qcc -shared"}
+ rb_cv_dlopen=yes],
+ [esix*|uxpds*], [ : ${LDSHARED="ld -G"}
+ rb_cv_dlopen=yes],
+ [osf*], [ : ${LDSHARED="ld -shared -expect_unresolved \"*\""}
+ rb_cv_dlopen=yes],
+ [bsdi3*], [ AS_CASE(["$CC"],
+ [*shlicc*], [ : ${LDSHARED="$CC -r"}
+ rb_cv_dlopen=yes])],
+ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu], [
: ${LDSHARED='${CC} -shared'}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
fi
- rb_cv_dlopen=yes ;;
- when(interix*) : ${LDSHARED="$CC -shared"}
+ rb_cv_dlopen=yes],
+ [interix*], [ : ${LDSHARED="$CC -shared"}
XLDFLAGS="$XLDFLAGS -Wl,-E"
LIBPATHFLAG=" -L%1\$-s"
- rb_cv_dlopen=yes ;;
- when(freebsd*|dragonfly*)
+ rb_cv_dlopen=yes],
+ [freebsd*|dragonfly*], [
: ${LDSHARED="$CC -shared"}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -rdynamic"
@@ -1822,22 +1754,22 @@ if test "$with_dln_a_out" != yes; then
else
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED="ld -Bshareable"
fi
- rb_cv_dlopen=yes ;;
- when(openbsd*) : ${LDSHARED="\$(CC) -shared ${CCDLFLAGS}"}
+ rb_cv_dlopen=yes],
+ [openbsd*], [ : ${LDSHARED="\$(CC) -shared ${CCDLFLAGS}"}
if test "$rb_cv_binary_elf" = yes; then
LDFLAGS="$LDFLAGS -Wl,-E"
fi
- rb_cv_dlopen=yes ;;
- when(nextstep*) : ${LDSHARED='cc -r -nostdlib'}
+ rb_cv_dlopen=yes],
+ [nextstep*], [ : ${LDSHARED='cc -r -nostdlib'}
LDFLAGS="$LDFLAGS -u libsys_s"
- rb_cv_dlopen=yes ;;
- when(openstep*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'}
+ rb_cv_dlopen=yes],
+ [openstep*], [ : ${LDSHARED='cc -dynamic -bundle -undefined suppress'}
: ${LDFLAGS=""}
- rb_cv_dlopen=yes ;;
- when(rhapsody*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'}
+ rb_cv_dlopen=yes],
+ [rhapsody*], [ : ${LDSHARED='cc -dynamic -bundle -undefined suppress'}
: ${LDFLAGS=""}
- rb_cv_dlopen=yes ;;
- when(darwin*) : ${LDSHARED='$(CC) -dynamic -bundle'}
+ rb_cv_dlopen=yes],
+ [darwin*], [ : ${LDSHARED='$(CC) -dynamic -bundle'}
: ${DLDFLAGS="${linker_flag}-undefined${linker_flag:+,}dynamic_lookup ${linker_flag}-multiply_defined${linker_flag:+,}suppress ${linker_flag}-flat_namespace"}
: ${LDFLAGS=""}
: ${LIBPATHENV=DYLD_LIBRARY_PATH}
@@ -1849,8 +1781,8 @@ if test "$with_dln_a_out" != yes; then
echo " $LDFLAGS " | grep -q ' -L */usr/local/lib/* ' ||
LDFLAGS="${LDFLAGS:+$LDFLAGS }-L/usr/local/lib"
fi
- rb_cv_dlopen=yes ;;
- when(aix*) if test "$GCC" = yes; then
+ rb_cv_dlopen=yes],
+ [aix*], [ if test "$GCC" = yes; then
: ${LDSHARED='$(CC) -shared'}
else
: ${LDSHARED='$(CC)'}
@@ -1862,78 +1794,69 @@ if test "$with_dln_a_out" != yes; then
TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)'
TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LOCAL_LIBS) $(LIBS)'
: ${LIBPATHENV=SHLIB_PATH}
- rb_cv_dlopen=yes ;;
- when(human*) : ${DLDFLAGS=''}
+ rb_cv_dlopen=yes],
+ [human*], [ : ${DLDFLAGS=''}
: ${LDSHARED=''}
: ${LDFLAGS=''}
: ${LINK_SO='ar cru $@ $(OBJS)'}
- rb_cv_dlopen=yes ;;
- when(beos*) case "$target_cpu" in
- when(powerpc*)
+ rb_cv_dlopen=yes],
+ [beos*], [ AS_CASE(["$target_cpu"],
+ [powerpc*], [
: ${LDSHARED="ld -xms"}
DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
LDFLAGS="$LDFLAGS -L/boot/home/config/lib -lbe -lroot"
- ;;
- when(i586*)
+ ],
+ [i586*], [
: ${LDSHARED="ld -shared"}
DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib \$(topdir)/_APP_ -lbe -lroot"
LDFLAGS="$LDFLAGS -L/boot/develop/lib/x86 -L/boot/home/config/lib -lbe -lroot"
- ;;
- esac
+ ])
: ${LIBPATHENV=LIBRARY_PATH}
- rb_cv_dlopen=yes ;;
- when(haiku*) case "$target_cpu" in
- when(powerpc*)
+ rb_cv_dlopen=yes],
+ [haiku*], [ AS_CASE(["$target_cpu"],
+ [powerpc*], [
: ${LDSHARED="ld -xms"}
DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
- ;;
- when(i586*)
+ ],
+ [i586*], [
: ${LDSHARED="ld -shared"}
DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot"
- ;;
- esac
+ ])
: ${LIBPATHENV=LIBRARY_PATH}
- rb_cv_dlopen=yes ;;
- when(nto-qnx*) DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
+ rb_cv_dlopen=yes ],
+ [nto-qnx*], [ DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
: ${LDSHARED='ld -Bshareable -x'}
LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
- rb_cv_dlopen=yes;;
- when(cygwin*|mingw*)
+ rb_cv_dlopen=yes],
+ [cygwin*|mingw*], [
: ${LDSHARED="${CC} -shared "'$(if $(filter-out -g -g0,$(debugflags)),,-s)'}
XLDFLAGS="$XLDFLAGS -Wl,--stack,0x00200000,--enable-auto-import"
DLDFLAGS="${DLDFLAGS} -Wl,--enable-auto-image-base,--enable-auto-import"
: ${LIBPATHENV=""}
- rb_cv_dlopen=yes ;;
- when(hiuxmpp) : ${LDSHARED='ld -r'} ;;
- when(atheos*) : ${LDSHARED="$CC -shared"}
- rb_cv_dlopen=yes ;;
- when(os2-emx*) LDFLAGS="$LDFLAGS -Zomf"
- ;;
- when(*) : ${LDSHARED='ld'} ;;
- esac
+ rb_cv_dlopen=yes],
+ [hiuxmpp], [ : ${LDSHARED='ld -r'}],
+ [atheos*], [ : ${LDSHARED="$CC -shared"}
+ rb_cv_dlopen=yes],
+ [os2-emx*], [ LDFLAGS="$LDFLAGS -Zomf"
+ ],
+ [ : ${LDSHARED='ld'}])
AC_MSG_RESULT($rb_cv_dlopen)
fi
if test "${LDSHAREDXX}" = ""; then
- case "${LDSHARED}" in
- when(*'$(CC)'*)
+ AS_CASE(["${LDSHARED}"],
+ [*'$(CC)'*], [
LDSHAREDXX=`echo "${LDSHARED}" | sed 's/\$(CC)/$(CXX)/'`
- ;;
- when(*'${CC}'*)
+ ],
+ [*'${CC}'*], [
LDSHAREDXX=`echo "${LDSHARED}" | sed 's/\${CC}/${CXX}/'`
- ;;
- when(*$CC*)
+ ],
+ [*$CC*], [
LDSHAREDXX=`echo "${LDSHARED}" | sed "s|$CC|$CXX|"`
- ;;
- when(ld" "*)
- ;;
- esac
-fi
-case ${RPATHFLAG} in
-when(*'%1$'*)
- : ${LIBPATHFLAG=' -L%1$-s'};;
-when(*)
- : ${LIBPATHFLAG=' -L%s'};;
-esac
+ ],
+ [ld" "*], [
+ ])
+fi
+AS_CASE([${RPATHFLAG}],[*'%1$'*],[: ${LIBPATHFLAG=' -L%1$-s'}],[: ${LIBPATHFLAG=' -L%s'}])
AC_SUBST(LINK_SO)
AC_SUBST(LIBPATHFLAG)
@@ -1969,21 +1892,20 @@ if test "$dln_a_out_works" = yes; then
DLEXT=so
CCDLFLAGS=
else
- case "$target_os" in
- when(hpux*)
- DLEXT=sl;;
- when(nextstep*|openstep*|rhapsody*|darwin*)
+ AS_CASE(["$target_os"],
+ [hpux*], [
+ DLEXT=sl],
+ [nextstep*|openstep*|rhapsody*|darwin*], [
RUBY_APPEND_OPTION(XLDFLAGS, [-Wl,-u,_objc_msgSend])
- DLEXT=bundle;;
- when(os2-emx*)
+ DLEXT=bundle],
+ [os2-emx*], [
LOAD_RELATIVE=1
- DLEXT=dll;;
- when(cygwin*|mingw*|*djgpp*)
+ DLEXT=dll],
+ [cygwin*|mingw*|*djgpp*], [
LOAD_RELATIVE=1
- DLEXT=so;;
- when(*)
- DLEXT=so;;
- esac
+ DLEXT=so],
+ [
+ DLEXT=so])
fi
if test "$rb_cv_dlopen:$load_relative" = yes:yes; then
AC_CHECK_FUNCS(dladdr)
@@ -2009,39 +1931,32 @@ else
STRIP=strip
fi
-case "$target_os" in
- when(linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
- STRIP='strip -S -x';;
- when(nextstep* | openstep* | rhapsody* | darwin*)
- STRIP='strip -A -n';;
-esac
+AS_CASE(["$target_os"],
+ [linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu], [
+ STRIP='strip -S -x'],
+ [nextstep* | openstep* | rhapsody* | darwin*], [
+ STRIP='strip -A -n'])
EXTSTATIC=
AC_SUBST(EXTSTATIC)dnl
AC_ARG_WITH(static-linked-ext,
AS_HELP_STRING([--with-static-linked-ext], [link external modules statically]),
- [case $withval in
- when(yes)
- STATIC=
- EXTSTATIC=static;;
- when(*) ;;
- esac])
-
-case "$target_os" in
- when(human*)
+ [AS_CASE([$withval],[yes],[STATIC=;EXTSTATIC=static])])
+
+AS_CASE(["$target_os"],
+ [human*], [
setup=Setup.x68
- ;;
+ ],
dnl OS/2 environment w/ Autoconf 2.1x for EMX
- when(os2-emx)
+ [os2-emx], [
setup=Setup.emx
- ;;
- when(*djgpp*)
+ ],
+ [*djgpp*], [
setup=Setup.dj
- ;;
- when(*)
+ ],
+ [
setup=Setup
- ;;
-esac
+ ])
AC_SUBST(setup)
@@ -2050,7 +1965,7 @@ if test "$prefix" = NONE; then
fi
if test x"$cross_compiling" = xyes; then
- test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` "-r'$(arch)-fake'
+ test x"$MINIRUBY" = x && MINIRUBY="${RUBY-$BASERUBY} -I`pwd` "-r'$(arch)-fake'
PREP='$(arch)-fake.rb'
RUNRUBY='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
XRUBY='$(MINIRUBY)'
@@ -2077,14 +1992,13 @@ LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static'
LIBRUBYARG='$(LIBRUBYARG_STATIC)'
SOLIBS=
-case "$target_os" in
- when(cygwin*|mingw*|beos*|haiku*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*)
+AS_CASE(["$target_os"],
+ [cygwin*|mingw*|beos*|haiku*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*], [
: ${DLDLIBS=""}
- ;;
- when(*)
+ ],
+ [
DLDLIBS="$DLDLIBS -lc"
- ;;
-esac
+ ])
AC_ARG_WITH(soname,
AS_HELP_STRING([--with-soname=SONAME], [base name of shared library]),
@@ -2108,23 +2022,23 @@ if test "$enable_shared" = 'yes'; then
if test "$rb_cv_binary_elf" = yes; then
SOLIBS='$(LIBS)'
fi
- case "$target_os" in
- when(sunos4*)
+ AS_CASE(["$target_os"],
+ [sunos4*], [
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
- ;;
- when(linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu)
+ ],
+ [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu], [
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'
- ;;
- when(freebsd*|dragonfly*)
+ ],
+ [freebsd*|dragonfly*], [
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
if test "$rb_cv_binary_elf" != "yes" ; then
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
LIBRUBY_ALIASES=''
fi
- ;;
- when(netbsd*)
+ ],
+ [netbsd*], [
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
@@ -2133,12 +2047,12 @@ if test "$enable_shared" = 'yes'; then
else # a.out platforms
LIBRUBY_ALIASES=""
fi
- ;;
- when(openbsd*)
+ ],
+ [openbsd*], [
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}`
- ;;
- when(solaris*)
+ ],
+ [solaris*], [
SOLIBS='$(LIBS)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)'
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY) lib$(RUBY_SO_NAME).so'
@@ -2146,25 +2060,24 @@ if test "$enable_shared" = 'yes'; then
LIBRUBY_DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(@F)'
fi
XLDFLAGS="$XLDFLAGS "'-R${libdir}'
- ;;
- when(hpux*)
+ ],
+ [hpux*], [
XLDFLAGS="$XLDFLAGS "'-Wl,+s,+b,$(libdir)'
LIBRUBY_SO='lib$(RUBY_SO_NAME).sl.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).sl.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).sl'
- ;;
- when(aix*)
+ ],
+ [aix*], [
LIBRUBY_DLDFLAGS="${linker_flag}-bnoentry $XLDFLAGS"
LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}'
SOLIBS='-lm -lc'
- ;;
- when(beos*)
- case "$target_cpu" in
- when(powerpc*)
+ ],
+ [beos*], [
+ AS_CASE(["$target_cpu"],
+ [powerpc*], [
LIBRUBY_DLDFLAGS='-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
- ;;
- esac
- ;;
- when(darwin*)
+ ])
+ ],
+ [darwin*], [
RUBY_SO_NAME="$RUBY_SO_NAME"'.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_LDSHARED='$(CC) -dynamiclib'
if test "$load_relative" = yes; then
@@ -2180,13 +2093,10 @@ if test "$enable_shared" = 'yes'; then
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'
- ;;
- when(interix*)
+ ],
+ [interix*], [
LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
- ;;
- when(*)
- ;;
- esac
+ ])
fi
if test "$enable_rpath" = yes; then
LIBRUBY_RPATHFLAGS="${linker_flag}-R ${linker_flag}\$(libdir) -L\$(libdir)"
@@ -2197,6 +2107,13 @@ fi
LDFLAGS="-L. $LDFLAGS"
AC_SUBST(ARCHFILE)
+if test "$EXEEXT" = .exe; then
+ EXECUTABLE_EXTS='".exe",".com",".cmd",".bat"'
+ AC_DEFINE_UNQUOTED(EXECUTABLE_EXTS, $EXECUTABLE_EXTS)
+ EXECUTABLE_EXTS=`echo $EXECUTABLE_EXTS | tr -d '"' | tr , ' '`
+ AC_SUBST(EXECUTABLE_EXTS)
+fi
+
dnl }
dnl build section {
@@ -2212,92 +2129,85 @@ else
fi
AC_SUBST(RDOCTARGET)
-case "$RDOCTARGET:$CAPITARGET" in
- when(nodoc:nodoc) INSTALLDOC=nodoc;;
- when(*) INSTALLDOC=all;;
-esac
+AS_CASE(["$RDOCTARGET:$CAPITARGET"],[nodoc:nodoc],[INSTALLDOC=nodoc],[INSTALLDOC=all])
AC_SUBST(INSTALLDOC)
if test "$rb_with_pthread" = "yes"; then
THREAD_MODEL=pthread
fi
MINIDLNOBJ=dmydln.o
-case "$target_os" in
- when(linux*)
- ;;
- when(netbsd*)
+AS_CASE(["$target_os"],
+ [linux*], [
+ ],
+ [netbsd*], [
RUBY_APPEND_OPTION(CFLAGS, -pipe)
- ;;
- when(nextstep*|openstep*)
+ ],
+ [nextstep*|openstep*], [
RUBY_APPEND_OPTION(CPPFLAGS, -I/usr/local/include)
- ;;
- when(rhapsody*)
+ ],
+ [rhapsody*], [
RUBY_APPEND_OPTIONS(CFLAGS, -pipe -no-precomp)
- ;;
- when(darwin*)
+ ],
+ [darwin*], [
RUBY_APPEND_OPTION(CFLAGS, -pipe)
- ;;
- when(human*)
+ ],
+ [human*], [
AC_LIBOBJ([x68.o])
CFLAGS="$CFLAGS -fansi-only"
XCFLAGS="$XCFLAGS -cc1-stack=262144 -cpp-stack=2694144"
EXEEXT=.x
OBJEXT=o
- ;;
- when(os2-emx)
+ ],
+ [os2-emx], [
AC_LIBOBJ([os2])
CFLAGS="$CFLAGS -DOS2"
LIBRUBY_A=`echo $LIBRUBY_A | sed 's/^lib//'`
LIBRUBY_SO=`echo $LIBRUBY_SO | sed 's/^lib//'`
LIBRUBY_ALIASES=`for i in $LIBRUBY_ALIASES; do echo "$i"; done | sed 's/^lib//'`
- ;;
- when(osf*)
+ ],
+ [osf*], [
if test "$GCC" != "yes" ; then
# compile something small: taint.c is fine for this.
# the main point is the '-v' flag of 'cc'.
- case "`cc -v -I. -c main.c -o /tmp/main.o 2>&1`" in
- when(*/gemc_cc*) # we have the new DEC GEM CC
+ AS_CASE(["`cc -v -I. -c main.c -o /tmp/main.o 2>&1`"],
+ [*/gemc_cc*], [ # we have the new DEC GEM CC
CFLAGS="$CFLAGS -oldc"
- ;;
- when(*) # we have the old MIPS CC
- ;;
- esac
+ ],
+ [ # we have the old MIPS CC
+ ])
# cleanup
rm -f /tmp/main.o
CFLAGS="$CFLAGS -std"
fi
- ;;
- when(beos*)
- case "$target_cpu" in
- when(powerpc*)
- CFLAGS="$CFLAGS -relax_pointers"
- ;;
- esac
+ ],
+ [beos*], [
+ AS_CASE(["$target_cpu"],[powerpc*], [CFLAGS="$CFLAGS -relax_pointers"])
CPPFLAGS="$CPPFLAGS -I/boot/home/config/include"
- ;;
- when(cygwin*|mingw*)
+ ],
+ [cygwin*|mingw*], [
RUBY_SO_NAME="${RUBY_SO_NAME}${MAJOR}${MINOR}${TEENY}"
LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
- case "$target_os" in
- when(cygwin*)
+ AS_CASE(["$target_os"],
+ [cygwin*], [
if test x"$enable_shared" = xyes; then
LIBRUBY_SO='cyg$(RUBY_SO_NAME)'.dll
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
fi
- ;;
- when(mingw*)
+ ],
+ [mingw*], [
RUBY_SO_NAME="${rb_cv_msvcrt}-${RUBY_SO_NAME}"
if test x"$enable_shared" = xyes; then
LIBRUBY_SO='$(RUBY_SO_NAME)'.dll
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'
fi
+ EXPORT_PREFIX=' '
+ DLDFLAGS="${DLDFLAGS}"' $(DEFFILE)'
AC_LIBOBJ([win32])
COMMON_LIBS=m
# COMMON_MACROS="WIN32_LEAN_AND_MEAN="
COMMON_HEADERS="winsock2.h windows.h"
THREAD_MODEL=win32
- ;;
- esac
+ ])
LIBRUBY_ALIASES=''
FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in
SOLIBS='$(LIBS)'
@@ -2308,59 +2218,39 @@ case "$target_os" in
LIBRUBY='lib$(RUBY_SO_NAME).a'
LIBRUBYARG='-l$(RUBY_SO_NAME)'
fi
- ;;
- when(hpux*)
- case "$YACC" in
- when(*yacc*)
+ ],
+ [hpux*], [
+ AS_CASE(["$YACC"],[*yacc*], [
XCFLAGS="$XCFLAGS -DYYMAXDEPTH=300"
YACC="$YACC -Nl40000 -Nm40000"
- ;;
- esac
- ;;
- when(*msdosdjgpp*)
+ ])],
+ [*msdosdjgpp*], [
FIRSTMAKEFILE=GNUmakefile:djgpp/GNUmakefile.in
- ;;
- when(*)
- ;;
-esac
+ ])
MINIOBJS="$MINIDLNOBJ"
-case "$THREAD_MODEL" in
-when(pthread)
- AC_CHECK_HEADERS(pthread.h)
- ;;
-when(win32)
- ;;
-when("")
- AC_MSG_ERROR(thread model is missing)
- ;;
-when(*)
- AC_MSG_ERROR(unknown thread model $THREAD_MODEL)
- ;;
-esac
-
-case "$FIRSTMAKEFILE" in
-when(*GNUmakefile:*)
- gnumake=yes
- ;;
-when(*)
+AS_CASE(["$THREAD_MODEL"],
+[pthread], [AC_CHECK_HEADERS(pthread.h)],
+[win32], [],
+[""], [AC_MSG_ERROR(thread model is missing)],
+ [AC_MSG_ERROR(unknown thread model $THREAD_MODEL)])
+
+AS_CASE(["$FIRSTMAKEFILE"], [*GNUmakefile:*], [gnumake=yes], [
AC_MSG_CHECKING([for if ${MAKE-make} is GNU make])
mkdir conftest.dir
echo "all:; @echo yes" > conftest.dir/GNUmakefile
echo "all:; @echo no" > conftest.dir/Makefile
gnumake=`(cd conftest.dir; ${MAKE-make})`
rm -fr conftest.dir
- case "$gnumake" in
- when(*yes*)
+ AS_CASE(["$gnumake"],
+ [*yes*], [
echo "include Makefile" > GNUmakefile
echo "-include uncommon.mk" >> GNUmakefile
- gnumake=yes;;
- when(*)
- gnumake=no;;
- esac
+ gnumake=yes],
+ [
+ gnumake=no])
AC_MSG_RESULT($gnumake)
- ;;
-esac
+])
if test "${universal_binary-no}" = yes ; then
AC_MSG_CHECKING([for architecture macros])
@@ -2455,12 +2345,11 @@ test "$program_suffix" != NONE &&
ri_suffix=$program_suffix
RUBY_INSTALL_NAME="${ri_prefix}"'$(RUBY_BASE_NAME)'"${ri_suffix}"
-case "$target_os" in
- when(cygwin*|mingw*)
+AS_CASE(["$target_os"],
+ [cygwin*|mingw*], [
RUBYW_INSTALL_NAME="${ri_prefix}"'$(RUBYW_BASE_NAME)'"${ri_suffix}"
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
- ;;
-esac
+ ])
rubylibprefix='${libdir}/${RUBY_BASE_NAME}'
AC_ARG_WITH(rubylibprefix,
@@ -2484,14 +2373,9 @@ AC_ARG_WITH(ruby-version,
[ruby_version=full])
unset RUBY_LIB_VERSION
unset RUBY_LIB_VERSION_STYLE
-case "$ruby_version" in
- when(full)
- RUBY_LIB_VERSION_STYLE='3 /* full */'
- ;;
- when(minor)
- RUBY_LIB_VERSION_STYLE='2 /* minor */'
- ;;
-esac
+AS_CASE(["$ruby_version"],
+ [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'],
+ [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */'])
if test ${RUBY_LIB_VERSION_STYLE+set}; then
{
echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE"
@@ -2536,25 +2420,20 @@ else
fi
pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)'
-RUBY_LIB_PATH='RUBY_LIB_PREFIX"/"RUBY_LIB_VERSION'
-case "$RUBY_SITE_LIB_PATH" in
- when("$RUBY_LIB_PREFIX/"*)
+AS_CASE(["$RUBY_SITE_LIB_PATH"],
+ ["$RUBY_LIB_PREFIX/"*], [
RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"'
- ;;
- when(*)
+ ],
+ [
RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\""
- ;;
-esac
-RUBY_SITE_LIB_PATH2='RUBY_SITE_LIB"/"RUBY_LIB_VERSION'
-case "$RUBY_VENDOR_LIB_PATH" in
- when("$RUBY_LIB_PREFIX/"*)
+ ])
+AS_CASE(["$RUBY_VENDOR_LIB_PATH"],
+ ["$RUBY_LIB_PREFIX/"*], [
RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"'
- ;;
- when(*)
+ ],
+ [
RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\""
- ;;
-esac
-RUBY_VENDOR_LIB_PATH2='RUBY_VENDOR_LIB"/"RUBY_LIB_VERSION'
+ ])
if test ${RUBY_LIB_VERSION_STYLE+set}; then
AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE)
@@ -2562,11 +2441,8 @@ else
AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION])
fi
AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, "${RUBY_LIB_PREFIX}")
-AC_DEFINE_UNQUOTED(RUBY_LIB, ${RUBY_LIB_PATH})
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH})
-AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, ${RUBY_SITE_LIB_PATH2})
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH})
-AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, ${RUBY_VENDOR_LIB_PATH2})
AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
@@ -2598,24 +2474,15 @@ if test "${universal_binary-no}" = yes ; then
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_THIN_ARCHLIB, RUBY_LIB"/"RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS)
- AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, RUBY_SITE_LIB2"/"RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS)
- AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB, RUBY_VENDOR_LIB2"/"RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS)
else
arch="${target_cpu}-${target_os}"
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "${arch}")
fi
unset sitearch
-case "$target_os" in
- when(mingw*) sitearch="$target_cpu-$rb_cv_msvcrt";;
-esac
+AS_CASE(["$target_os"],[mingw*],[sitearch="$target_cpu-$rb_cv_msvcrt"])
test ${sitearch+set} && AC_DEFINE_UNQUOTED(RUBY_SITEARCH, "${sitearch}")
-AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, RUBY_LIB"/"RUBY_ARCH)
-AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, RUBY_SITE_LIB2"/"RUBY_SITEARCH)
-AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, RUBY_VENDOR_LIB2"/"RUBY_SITEARCH)
-
AC_ARG_WITH(search-path,
AS_HELP_STRING([--with-search-path=DIR], [specify the additional search path]),
[search_path=$withval])
@@ -2642,17 +2509,15 @@ AC_SUBST(rubyhdrdir)dnl
AC_SUBST(sitehdrdir)dnl
AC_SUBST(vendorhdrdir)dnl
+AC_ARG_WITH(opt-dir,
+ AS_HELP_STRING([--with-opt-dir=DIR], [add optional headers and libraries DIR]))
+
AC_ARG_WITH(mantype,
AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]),
[
- case "$withval" in
- when(man|doc)
- MANTYPE=$withval
- ;;
- when(*)
- AC_MSG_ERROR(invalid man type: $withval)
- ;;
- esac
+ AS_CASE(["$withval"],
+ [man|doc], [MANTYPE=$withval],
+ [AC_MSG_ERROR(invalid man type: $withval)])
])
if test -z "$MANTYPE"; then
AC_PATH_PROGS(NROFF, nroff awf, /bin/false, "/usr/bin:/usr/ucb")
diff --git a/cont.c b/cont.c
index 81d3f9c0bc..48ce5bc860 100644
--- a/cont.c
+++ b/cont.c
@@ -385,7 +385,7 @@ cont_restore_1(rb_context_t *cont)
th->state = sth->state;
th->status = sth->status;
th->tag = sth->tag;
- th->trap_tag = sth->trap_tag;
+ th->protect_tag = sth->protect_tag;
th->errinfo = sth->errinfo;
th->first_proc = sth->first_proc;
@@ -618,8 +618,8 @@ rb_cont_call(int argc, VALUE *argv, VALUE contval)
if (cont->saved_thread.self != th->self) {
rb_raise(rb_eRuntimeError, "continuation called across threads");
}
- if (cont->saved_thread.trap_tag != th->trap_tag) {
- rb_raise(rb_eRuntimeError, "continuation called across trap");
+ if (cont->saved_thread.protect_tag != th->protect_tag) {
+ rb_raise(rb_eRuntimeError, "continuation called across stack rewinding barrier");
}
if (cont->saved_thread.fiber) {
rb_fiber_t *fcont;
@@ -937,8 +937,8 @@ fiber_switch(VALUE fibval, int argc, VALUE *argv, int is_resume)
if (cont->saved_thread.self != th->self) {
rb_raise(rb_eFiberError, "fiber called across threads");
}
- else if (cont->saved_thread.trap_tag != th->trap_tag) {
- rb_raise(rb_eFiberError, "fiber called across trap");
+ else if (cont->saved_thread.protect_tag != th->protect_tag) {
+ rb_raise(rb_eFiberError, "fiber called across stack rewinding barrier");
}
else if (fib->status == TERMINATED) {
value = rb_exc_new2(rb_eFiberError, "dead fiber called");
diff --git a/defs/known_errors.def b/defs/known_errors.def
index 9f09aa9c22..3cebe90a8e 100644
--- a/defs/known_errors.def
+++ b/defs/known_errors.def
@@ -120,3 +120,26 @@ ENAVAIL
EISNAM
EREMOTEIO
EDQUOT
+ECANCELED
+EKEYEXPIRED
+EKEYREJECTED
+EKEYREVOKED
+EMEDIUMTYPE
+ENOKEY
+ENOMEDIUM
+ENOTRECOVERABLE
+EOWNERDEAD
+ERFKILL
+EAUTH
+EBADRPC
+EDOOFUS
+EFTYPE
+ENEEDAUTH
+ENOATTR
+ENOTSUP
+EPROCLIM
+EPROCUNAVAIL
+EPROGMISMATCH
+EPROGUNAVAIL
+ERPCMISMATCH
+EIPSEC
diff --git a/dir.c b/dir.c
index 54fe1300f7..19a781b30b 100644
--- a/dir.c
+++ b/dir.c
@@ -942,6 +942,21 @@ dir_s_chdir(int argc, VALUE *argv, VALUE obj)
return INT2FIX(0);
}
+VALUE
+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());
+
+ xfree(path);
+ return cwd;
+}
+
/*
* call-seq:
* Dir.getwd => string
@@ -956,16 +971,7 @@ dir_s_chdir(int argc, VALUE *argv, VALUE obj)
static VALUE
dir_s_getwd(VALUE dir)
{
- char *path;
- VALUE cwd;
-
- rb_secure(4);
- path = my_getcwd();
- cwd = rb_tainted_str_new2(path);
- rb_enc_associate(cwd, rb_filesystem_encoding());
-
- xfree(path);
- return cwd;
+ return rb_dir_getwd();
}
static void
@@ -1899,6 +1905,9 @@ dir_glob(int argc, VALUE *argv, const struct dir_data *base)
* 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. Dir["c:\\foo*"] will not work
+ * use Dir["c:/foo*"] instead
*
* Dir["config.?"] #=> ["config.h"]
* Dir.glob("config.?") #=> ["config.h"]
diff --git a/dln.c b/dln.c
index 1d198369f1..1b99252922 100644
--- a/dln.c
+++ b/dln.c
@@ -84,7 +84,7 @@ char *getenv();
# endif
#endif
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__HAIKU__)
# include <image.h>
#endif
@@ -1433,7 +1433,7 @@ dln_load(const char *file)
#endif /* rld or dyld */
#endif
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__HAIKU__)
# define DLN_DEFINED
{
status_t err_stat; /* BeOS error status code */
@@ -1479,7 +1479,7 @@ dln_load(const char *file)
(*init_fct)();
return (void*)img_id;
}
-#endif /* __BEOS__*/
+#endif /* __BEOS__ || __HAIKU__ */
#ifndef DLN_DEFINED
dln_notimplement();
@@ -1554,13 +1554,17 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
size_t i, fspace;
#ifdef DOSISH
static const char extension[][5] = {
- ".exe", ".com", ".cmd", ".bat",
+ EXECUTABLE_EXTS,
};
size_t j;
int is_abs = 0, has_path = 0;
const char *ext = 0;
- const char *p = fname;
#endif
+ const char *p = fname;
+
+ static const char pathname_too_long[] = "openpath: pathname too long (ignored)\n\
+\tDirectory \"%.*s\"\n\tFile \"%s\"\n";
+#define PATHNAME_TOO_LONG() fprintf(stderr, pathname_too_long, (int)(bp - fbuf), fbuf, fname)
#define RETURN_IF(expr) if (expr) return (char *)fname;
@@ -1618,10 +1622,11 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
memcpy(fbuf, fname, i + 1);
goto needs_extension;
}
+ p = fname;
#endif
- RETURN_IF(fname[0] == '/');
- RETURN_IF(strncmp("./", fname, 2) == 0 || strncmp("../", fname, 3) == 0);
+ if (*p == '.' && *++p == '.') ++p;
+ RETURN_IF(*p == '/');
RETURN_IF(exe_flag && strchr(fname, '/'));
#undef RETURN_IF
@@ -1683,10 +1688,7 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
i = strlen(fname);
if (fspace < i) {
toolong:
- fprintf(stderr, "openpath: pathname too long (ignored)\n");
- *bp = '\0';
- fprintf(stderr, "\tDirectory \"%s\"\n", fbuf);
- fprintf(stderr, "\tFile \"%s\"\n", fname);
+ PATHNAME_TOO_LONG();
goto next;
}
fspace -= i;
@@ -1697,9 +1699,7 @@ dln_find_1(const char *fname, const char *path, char *fbuf, size_t size,
needs_extension:
for (j = 0; j < sizeof(extension) / sizeof(extension[0]); j++) {
if (fspace < strlen(extension[j])) {
- fprintf(stderr, "openpath: pathname too long (ignored)\n");
- fprintf(stderr, "\tDirectory \"%.*s\"\n", (int) (bp - fbuf), fbuf);
- fprintf(stderr, "\tFile \"%s%s\"\n", fname, extension[j]);
+ PATHNAME_TOO_LONG();
continue;
}
strlcpy(bp + i, extension[j], fspace);
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/rubygems/ChangeLog b/doc/rubygems/ChangeLog
new file mode 100644
index 0000000000..b5ef160dcf
--- /dev/null
+++ b/doc/rubygems/ChangeLog
@@ -0,0 +1,5529 @@
+Tue Dec 8 16:19:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/rubygems: update to 1.3.5.
+
+# -*- coding: utf-8 -*-
+
+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.
+
+2009-06-12 Ryan Davis <ryand@zenspider.com>
+
+ * Rakefile: Switched to Hoe.
+
+2009-06-10 Phil Hagelberg <technomancy@gmail.com>
+
+ * lib/rubygems/source_index.rb: Fix use of prerelease gems.
+
+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..86ea9398f2
--- /dev/null
+++ b/doc/rubygems/History.txt
@@ -0,0 +1,799 @@
+=== 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..0e42112760
--- /dev/null
+++ b/doc/rubygems/README
@@ -0,0 +1,40 @@
+= RubyGems
+
+* http://rubygems.rubyforge.org/
+* http://rubyforge.org/projects/rubygems
+* http://rubygems.org/
+
+== 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 install --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/enc/big5.c b/enc/big5.c
index 4a7a91a231..c4a088d531 100644
--- a/enc/big5.c
+++ b/enc/big5.c
@@ -67,6 +67,26 @@ static const int EncLen_BIG5_HKSCS[] = {
/* F */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
};
+static const int EncLen_BIG5_UAO[] = {
+ /* LEN 0 1 2 3 4 5 6 7 8 9 A B C D E F */
+ /* 0 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ /* 1 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ /* 2 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ /* 3 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ /* 4 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ /* 5 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ /* 6 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ /* 7 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ /* 8 */ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* 9 */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* A */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* B */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* C */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* D */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* E */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ /* F */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
+};
+
typedef enum { FAILURE = -2, ACCEPT = -1, S0 = 0, S1 } state_t;
#define A ACCEPT
#define F FAILURE
@@ -156,6 +176,12 @@ big5_hkscs_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUS
return big5_mbc_enc_len0(p, e, 2, EncLen_BIG5_HKSCS);
}
+static int
+big5_uao_mbc_enc_len(const UChar* p, const UChar* e, OnigEncoding enc ARG_UNUSED)
+{
+ return big5_mbc_enc_len0(p, e, 2, EncLen_BIG5_UAO);
+}
+
static OnigCodePoint
big5_mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
{
@@ -211,6 +237,8 @@ static const char BIG5_CAN_BE_TRAIL_TABLE[256] = {
};
#define BIG5_HKSCS_P(enc) ((enc)->precise_mbc_enc_len == big5_hkscs_mbc_enc_len)
+#define BIG5_UAO_P(enc) ((enc)->precise_mbc_enc_len == big5_uao_mbc_enc_len)
+
#define BIG5_ISMB_FIRST(byte) ( \
BIG5_HKSCS_P(enc) ? EncLen_BIG5_HKSCS[byte] > 1 : \
EncLen_BIG5[byte] > 1 \
@@ -300,3 +328,26 @@ OnigEncodingDefine(big5_hkscs, BIG5_HKSCS) = {
big5_is_allowed_reverse_match
};
ENC_ALIAS("CP951", "Big5-HKSCS")
+
+/*
+ * Name: Big5-UAO [NOT registered by IANA!]
+ * Source: http://moztw.org/docs/big5/table/big5_2003-b2u.txt
+ */
+OnigEncodingDefine(big5_uao, BIG5_UAO) = {
+ big5_uao_mbc_enc_len,
+ "Big5-UAO", /* name */
+ 2, /* max enc length */
+ 1, /* min enc length */
+ onigenc_is_mbc_newline_0x0a,
+ big5_mbc_to_code,
+ onigenc_mb2_code_to_mbclen,
+ big5_code_to_mbc,
+ big5_mbc_case_fold,
+ onigenc_ascii_apply_all_case_fold,
+ onigenc_ascii_get_case_fold_codes_by_str,
+ onigenc_minimum_property_name_to_ctype,
+ big5_is_code_ctype,
+ onigenc_not_support_get_ctype_code_range,
+ big5_left_adjust_char_head,
+ big5_is_allowed_reverse_match
+};
diff --git a/enc/trans/big5-uao-tbl.rb b/enc/trans/big5-uao-tbl.rb
new file mode 100644
index 0000000000..295fbfdda5
--- /dev/null
+++ b/enc/trans/big5-uao-tbl.rb
@@ -0,0 +1,19784 @@
+BIG5_UAO_TO_UCS_TBL = [
+ ["8140",0x4E17],
+ ["8141",0x4E22],
+ ["8142",0x4E2C],
+ ["8143",0x4E55],
+ ["8144",0x4E62],
+ ["8145",0x4E8A],
+ ["8146",0x4EB0],
+ ["8147",0x4EEB],
+ ["8148",0x4EED],
+ ["8149",0x4EFC],
+ ["814A",0x4F1C],
+ ["814B",0x4F8A],
+ ["814C",0x4FFF],
+ ["814D",0x5042],
+ ["814E",0x5050],
+ ["814F",0x5078],
+ ["8150",0x50D8],
+ ["8151",0x50DE],
+ ["8152",0x50F4],
+ ["8153",0x5116],
+ ["8154",0x514A],
+ ["8155",0x5151],
+ ["8156",0x5164],
+ ["8157",0x516A],
+ ["8158",0x5185],
+ ["8159",0x5190],
+ ["815A",0x519D],
+ ["815B",0x51A6],
+ ["815C",0x51A8],
+ ["815D",0x51A9],
+ ["815E",0x51C7],
+ ["815F",0x51D6],
+ ["8160",0x51DB],
+ ["8161",0x51EC],
+ ["8162",0x51FC],
+ ["8163",0x520B],
+ ["8164",0x5214],
+ ["8165",0x5215],
+ ["8166",0x5220],
+ ["8167",0x522B],
+ ["8168",0x5239],
+ ["8169",0x524F],
+ ["816A",0x5271],
+ ["816B",0x5290],
+ ["816C",0x5292],
+ ["816D",0x5294],
+ ["816E",0x529C],
+ ["816F",0x52AF],
+ ["8170",0x52B5],
+ ["8171",0x52D0],
+ ["8172",0x5300],
+ ["8173",0x5307],
+ ["8174",0x5324],
+ ["8175",0x5346],
+ ["8176",0x535F],
+ ["8177",0x5393],
+ ["8178",0x53B0],
+ ["8179",0x53DD],
+ ["817A",0x5423],
+ ["817B",0x5450],
+ ["817C",0x5451],
+ ["817D",0x548A],
+ ["817E",0x549D],
+ ["81A1",0x54A3],
+ ["81A2",0x54B4],
+ ["81A3",0x54D0],
+ ["81A4",0x5523],
+ ["81A5",0x553F],
+ ["81A6",0x554C],
+ ["81A7",0x5553],
+ ["81A8",0x555D],
+ ["81A9",0x556C],
+ ["81AA",0x559E],
+ ["81AB",0x55A9],
+ ["81AC",0x55EC],
+ ["81AD",0x55F5],
+ ["81AE",0x5623],
+ ["81AF",0x5650],
+ ["81B0",0x567C],
+ ["81B1",0x568A],
+ ["81B2",0x5694],
+ ["81B3",0x56A0],
+ ["81B4",0x56AF],
+ ["81B5",0x56D8],
+ ["81B6",0x5700],
+ ["81B7",0x5759],
+ ["81B8",0x5765],
+ ["81B9",0x577F],
+ ["81BA",0x5785],
+ ["81BB",0x5789],
+ ["81BC",0x57A1],
+ ["81BD",0x57AC],
+ ["81BE",0x57B4],
+ ["81BF",0x57C0],
+ ["81C0",0x57C8],
+ ["81C1",0x57D3],
+ ["81C2",0x57EF],
+ ["81C3",0x5844],
+ ["81C4",0x586C],
+ ["81C5",0x5892],
+ ["81C6",0x589A],
+ ["81C7",0x58B2],
+ ["81C8",0x58B8],
+ ["81C9",0x58E5],
+ ["81CA",0x58FB],
+ ["81CB",0x5902],
+ ["81CC",0x590B],
+ ["81CD",0x5910],
+ ["81CE",0x5918],
+ ["81CF",0x591B],
+ ["81D0",0x748C],
+ ["81D1",0x748D],
+ ["81D2",0x7499],
+ ["81D3",0x749B],
+ ["81D4",0x74A4],
+ ["81D5",0x74B4],
+ ["81D6",0x74B9],
+ ["81D7",0x74C8],
+ ["81D8",0x74CC],
+ ["81D9",0x74D0],
+ ["81DA",0x74D3],
+ ["81DB",0x7542],
+ ["81DC",0x7555],
+ ["81DD",0x756E],
+ ["81DE",0x758D],
+ ["81DF",0x759E],
+ ["81E0",0x75DC],
+ ["81E1",0x762C],
+ ["81E2",0x764F],
+ ["81E3",0x7651],
+ ["81E4",0x7673],
+ ["81E5",0x7674],
+ ["81E6",0x76A5],
+ ["81E7",0x76D9],
+ ["81E8",0x770E],
+ ["81E9",0x770F],
+ ["81EA",0x7758],
+ ["81EB",0x7772],
+ ["81EC",0x7777],
+ ["81ED",0x7778],
+ ["81EE",0x777A],
+ ["81EF",0x777B],
+ ["81F0",0x7798],
+ ["81F1",0x77AF],
+ ["81F2",0x77BE],
+ ["81F3",0x77C3],
+ ["81F4",0x77C5],
+ ["81F5",0x77CB],
+ ["81F6",0x77DD],
+ ["81F7",0x77E6],
+ ["81F8",0x77F4],
+ ["81F9",0x781E],
+ ["81FA",0x783D],
+ ["81FB",0x7842],
+ ["81FC",0x7844],
+ ["81FD",0x784B],
+ ["81FE",0x7851],
+ ["8240",0x5516],
+ ["8241",0x58F7],
+ ["8242",0x9834],
+ ["8243",0x845B],
+ ["8244",0x7114],
+ ["8245",0x8276],
+ ["8246",0x8956],
+ ["8247",0x9D2C],
+ ["8248",0x9D0E],
+ ["8249",0x8EAF],
+ ["824A",0x6062],
+ ["824B",0x6666],
+ ["824C",0x86CE],
+ ["824D",0x64B9],
+ ["824E",0x938C],
+ ["824F",0x565B],
+ ["8250",0x6F45],
+ ["8251",0x8ACC],
+ ["8252",0x7149],
+ ["8253",0x5DCC],
+ ["8254",0x8749],
+ ["8255",0x9A28],
+ ["8256",0x7BAA],
+ ["8257",0x8D0B],
+ ["8258",0x9957],
+ ["8259",0x5C2D],
+ ["825A",0x7E4B],
+ ["825B",0x981A],
+ ["825C",0x5026],
+ ["825D",0x6372],
+ ["825E",0x9E78],
+ ["825F",0x783F],
+ ["8260",0x9EB9],
+ ["8261",0x9EBA],
+ ["8262",0x8CCE],
+ ["8263",0x8B83],
+ ["8264",0xEF79],
+ ["8265",0x848B],
+ ["8266",0x91A4],
+ ["8267",0x7A63],
+ ["8268",0x64B0],
+ ["8269",0x5DFD],
+ ["826A",0x5E96],
+ ["826B",0x8061],
+ ["826C",0x6955],
+ ["826D",0x7AEA],
+ ["826E",0x7026],
+ ["826F",0x68BC],
+ ["8270",0x7977],
+ ["8271",0x6D9C],
+ ["8272",0x8FE9],
+ ["8273",0x7962],
+ ["8274",0x56A2],
+ ["8275",0x877F],
+ ["8276",0x5265],
+ ["8277",0x7984],
+ ["8278",0x6E8C],
+ ["8279",0x9197],
+ ["827A",0x7B86],
+ ["827B",0x982C],
+ ["827C",0x685D],
+ ["827D",0x4FAD],
+ ["827E",0x85AE],
+ ["82A1",0x7BED],
+ ["82A2",0x874B],
+ ["82A3",0x5036],
+ ["82A4",0x690D],
+ ["82A5",0x6B96],
+ ["82A6",0x614E],
+ ["82A7",0x5177],
+ ["82A8",0x771F],
+ ["82A9",0x5024],
+ ["82AA",0x7F6E],
+ ["82AB",0x76F4],
+ ["82AC",0x69D9],
+ ["82AD",0x60E3],
+ ["82AE",0x62F6],
+ ["82AF",0x545F],
+ ["82B0",0x9784],
+ ["82B1",0x564C],
+ ["82B2",0x50C5],
+ ["82B3",0x5618],
+ ["82B4",0x865E],
+ ["82B5",0x5932],
+ ["82B6",0x595B],
+ ["82B7",0x595D],
+ ["82B8",0x5963],
+ ["82B9",0x596C],
+ ["82BA",0x599B],
+ ["82BB",0x59D7],
+ ["82BC",0x59EB],
+ ["82BD",0x5A1A],
+ ["82BE",0x5AAA],
+ ["82BF",0x5AD0],
+ ["82C0",0x5AF1],
+ ["82C1",0x5B36],
+ ["82C2",0x5BC9],
+ ["82C3",0x5BF3],
+ ["82C4",0x5C13],
+ ["82C5",0x5C1C],
+ ["82C6",0x5C1E],
+ ["82C7",0x5C53],
+ ["82C8",0x5C99],
+ ["82C9",0x5C9C],
+ ["82CA",0x5CBA],
+ ["82CB",0x5CBB],
+ ["82CC",0x5CC1],
+ ["82CD",0x5CF5],
+ ["82CE",0x5CFA],
+ ["82CF",0x5D15],
+ ["82D0",0x5D18],
+ ["82D1",0x5D3E],
+ ["82D2",0x5D53],
+ ["82D3",0x5D5C],
+ ["82D4",0x5D6D],
+ ["82D5",0x5D73],
+ ["82D6",0x5D74],
+ ["82D7",0x5D8C],
+ ["82D8",0x5D90],
+ ["82D9",0x5DB9],
+ ["82DA",0x5DD0],
+ ["82DB",0x5DD3],
+ ["82DC",0x5E47],
+ ["82DD",0x5E64],
+ ["82DE",0x5ECF],
+ ["82DF",0x5ED0],
+ ["82E0",0x5EEA],
+ ["82E1",0x5EF0],
+ ["82E2",0x5F09],
+ ["82E3",0x5F0C],
+ ["82E4",0x5F11],
+ ["82E5",0x5F21],
+ ["82E6",0x5F34],
+ ["82E7",0x5F41],
+ ["82E8",0x5F45],
+ ["82E9",0x5F51],
+ ["82EA",0x5F5C],
+ ["82EB",0x5F66],
+ ["82EC",0x5F83],
+ ["82ED",0x5FF0],
+ ["82EE",0x604A],
+ ["82EF",0x6060],
+ ["82F0",0x608B],
+ ["82F1",0x60A6],
+ ["82F2",0x60DE],
+ ["82F3",0x6111],
+ ["82F4",0x6120],
+ ["82F5",0x6121],
+ ["82F6",0x613C],
+ ["82F7",0x613D],
+ ["82F8",0x6198],
+ ["82F9",0x61B7],
+ ["82FA",0x61F4],
+ ["82FB",0x6213],
+ ["82FC",0x621D],
+ ["82FD",0x621E],
+ ["82FE",0x6237],
+ ["8340",0x5E7A],
+ ["8341",0x6C10],
+ ["8342",0x53CE],
+ ["8343",0x4F2B],
+ ["8344",0x4F4E],
+ ["8345",0x5434],
+ ["8346",0x56F1],
+ ["8347",0x58EE],
+ ["8348",0x5939],
+ ["8349",0x5986],
+ ["834A",0x5C2C],
+ ["834B",0x51B3],
+ ["834C",0x51B2],
+ ["834D",0x707E],
+ ["834E",0x89C1],
+ ["834F",0x89D2],
+ ["8350",0x8D1D],
+ ["8351",0x8F66],
+ ["8352",0x4E9A],
+ ["8353",0x6765],
+ ["8354",0x4ED1],
+ ["8355",0x4E24],
+ ["8356",0x534F],
+ ["8357",0x5C4A],
+ ["8358",0x5188],
+ ["8359",0x5E95],
+ ["835A",0x62B5],
+ ["835B",0x4E1C],
+ ["835C",0x4E89],
+ ["835D",0x72B6],
+ ["835E",0x7C7C],
+ ["835F",0x7EA0],
+ ["8360",0x5367],
+ ["8361",0x8F67],
+ ["8362",0x90B8],
+ ["8363",0x957F],
+ ["8364",0x95E8],
+ ["8365",0x4FA0],
+ ["8366",0x4FA3],
+ ["8367",0x5156],
+ ["8368",0x5219],
+ ["8369",0x52B2],
+ ["836A",0x5374],
+ ["836B",0x5942],
+ ["836C",0x5E05],
+ ["836D",0x67E2],
+ ["836E",0x6C79],
+ ["836F",0x4E3A],
+ ["8370",0x7EA3],
+ ["8371",0x7EA2],
+ ["8372",0x7EAA],
+ ["8373",0x7EAB],
+ ["8374",0x7EA5],
+ ["8375",0x7EA6],
+ ["8376",0x7EA1],
+ ["8377",0x80DD],
+ ["8378",0x82CE],
+ ["8379",0x8BA1],
+ ["837A",0x8BA2],
+ ["837B",0x8BA3],
+ ["837C",0x8D1E],
+ ["837D",0x8D1F],
+ ["837E",0x519B],
+ ["83A1",0x8F68],
+ ["83A2",0x95E9],
+ ["83A3",0x97E6],
+ ["83A4",0x9875],
+ ["83A5",0x98CE],
+ ["83A6",0x98DE],
+ ["83A7",0x4FE9],
+ ["83A8",0x4EEC],
+ ["83A9",0x4F25],
+ ["83AA",0x4E2A],
+ ["83AB",0x4F26],
+ ["83AC",0x4ED3],
+ ["83AD",0x51BB],
+ ["83AE",0x521A],
+ ["83AF",0x5265],
+ ["83B0",0x5458],
+ ["83B1",0x5A31],
+ ["83B2",0x5B59],
+ ["83B3",0x5CE1],
+ ["83B4",0x5C9B],
+ ["83B5",0x5C98],
+ ["83B6",0x5E08],
+ ["83B7",0x5E93],
+ ["83B8",0x5F84],
+ ["83B9",0x631F],
+ ["83BA",0x65F6],
+ ["83BB",0x664B],
+ ["83BC",0x4E66],
+ ["83BD",0x6CFE],
+ ["83BE",0x6D43],
+ ["83BF",0x4E4C],
+ ["83C0",0x72ED],
+ ["83C1",0x72C8],
+ ["83C2",0x4EA9],
+ ["83C3",0x7825],
+ ["83C4",0x79EA],
+ ["83C5",0x7EBA],
+ ["83C6",0x7EB1],
+ ["83C7",0x7EB9],
+ ["83C8",0x7EAF],
+ ["83C9",0x7EBD],
+ ["83CA",0x7EB0],
+ ["83CB",0x7EA7],
+ ["83CC",0x7EAD],
+ ["83CD",0x7EB3],
+ ["83CE",0x7EB8],
+ ["83CF",0x7EB7],
+ ["83D0",0x80C1],
+ ["83D1",0x8109],
+ ["83D2",0x520D],
+ ["83D3",0x8BB0],
+ ["83D4",0x8BA6],
+ ["83D5",0x8BA8],
+ ["83D6",0x8BA7],
+ ["83D7",0x8BAA],
+ ["83D8",0x8BAF],
+ ["83D9",0x8BAD],
+ ["83DA",0x8BAB],
+ ["83DB",0x5C82],
+ ["83DC",0x8D22],
+ ["83DD",0x8D21],
+ ["83DE",0x8F69],
+ ["83DF",0x8F6B],
+ ["83E0",0x9489],
+ ["83E1",0x9488],
+ ["83E2",0x948A],
+ ["83E3",0x948B],
+ ["83E4",0x95EA],
+ ["83E5",0x9635],
+ ["83E6",0x9655],
+ ["83E7",0x9649],
+ ["83E8",0x9965],
+ ["83E9",0x9A6C],
+ ["83EA",0x9AA8],
+ ["83EB",0x4F2A],
+ ["83EC",0x4F1F],
+ ["83ED",0x4FA6],
+ ["83EE",0x4FA7],
+ ["83EF",0x52A1],
+ ["83F0",0x52A8],
+ ["83F1",0x533A],
+ ["83F2",0x53C2],
+ ["83F3",0x54D1],
+ ["83F4",0x95EE],
+ ["83F5",0x8854],
+ ["83F6",0x56FD],
+ ["83F7",0x575A],
+ ["83F8",0x57A9],
+ ["83F9",0x6267],
+ ["83FA",0x591F],
+ ["83FB",0x5A04],
+ ["83FC",0x5987],
+ ["83FD",0x4E13],
+ ["83FE",0x5C06],
+ ["8440",0x5C49],
+ ["8441",0x5CE5],
+ ["8442",0x5C97],
+ ["8443",0x5E26],
+ ["8444",0x5E10],
+ ["8445",0x5F20],
+ ["8446",0x5F3A],
+ ["8447",0x4ECE],
+ ["8448",0x5F95],
+ ["8449",0x51C4],
+ ["844A",0x6005],
+ ["844B",0x626B],
+ ["844C",0x6302],
+ ["844D",0x626A],
+ ["844E",0x62A1],
+ ["844F",0x6323],
+ ["8450",0x8D25],
+ ["8451",0x542F],
+ ["8452",0x659B],
+ ["8453",0x65A9],
+ ["8454",0x663C],
+ ["8455",0x52D6],
+ ["8456",0x5F03],
+ ["8457",0x6761],
+ ["8458",0x67AD],
+ ["8459",0x6740],
+ ["845A",0x6C22],
+ ["845B",0x51C9],
+ ["845C",0x6D45],
+ ["845D",0x6E0A],
+ ["845E",0x6CEA],
+ ["845F",0x6CA6],
+ ["8460",0x51C0],
+ ["8461",0x7275],
+ ["8462",0x72F0],
+ ["8463",0x73B0],
+ ["8464",0x4EA7],
+ ["8465",0x6BD5],
+ ["8466",0x5F02],
+ ["8467",0x4F17],
+ ["8468",0x7ECA],
+ ["8469",0x7EDF],
+ ["846A",0x7ECD],
+ ["846B",0x7ECB],
+ ["846C",0x7ECC],
+ ["846D",0x7EC6],
+ ["846E",0x7EC5],
+ ["846F",0x7EC4],
+ ["8470",0x7EC8],
+ ["8471",0x7EC1],
+ ["8472",0x7EC2],
+ ["8473",0x94B5],
+ ["8474",0x4E60],
+ ["8475",0x835A],
+ ["8476",0x830E],
+ ["8477",0x8392],
+ ["8478",0x5E84],
+ ["8479",0x82CB],
+ ["847A",0x5904],
+ ["847B",0x672F],
+ ["847C",0x886E],
+ ["847D",0x89C5],
+ ["847E",0x89C4],
+ ["84A1",0x8BBF],
+ ["84A2",0x8BB6],
+ ["84A3",0x8BC0],
+ ["84A4",0x8BB7],
+ ["84A5",0x8BB8],
+ ["84A6",0x8BBE],
+ ["84A7",0x8BBC],
+ ["84A8",0x8BB9],
+ ["84A9",0x8D29],
+ ["84AA",0x8D23],
+ ["84AB",0x8D2F],
+ ["84AC",0x8D27],
+ ["84AD",0x8D2A],
+ ["84AE",0x8D2B],
+ ["84AF",0x8F6D],
+ ["84B0",0x8F6F],
+ ["84B1",0x8FD9],
+ ["84B2",0x8FDE],
+ ["84B3",0x8FF3],
+ ["84B4",0x9497],
+ ["84B5",0x9493],
+ ["84B6",0x948F],
+ ["84B7",0x9492],
+ ["84B8",0x95ED],
+ ["84B9",0x9648],
+ ["84BA",0x9646],
+ ["84BB",0x9634],
+ ["84BC",0x9876],
+ ["84BD",0x9877],
+ ["84BE",0x9C7C],
+ ["84BF",0x9E1F],
+ ["84C0",0x5364],
+ ["84C1",0x9EA6],
+ ["84C2",0x5907],
+ ["84C3",0x4F27],
+ ["84C4",0x4F1E],
+ ["84C5",0x51EF],
+ ["84C6",0x5240],
+ ["84C7",0x521B],
+ ["84C8",0x52B3],
+ ["84C9",0x52CB],
+ ["84CA",0x4E27],
+ ["84CB",0x5355],
+ ["84CC",0x54DF],
+ ["84CD",0x5524],
+ ["84CE",0x4E54],
+ ["84CF",0x56F4],
+ ["84D0",0x5C27],
+ ["84D1",0x573A],
+ ["84D2",0x62A5],
+ ["84D3",0x57DA],
+ ["84D4",0x58F6],
+ ["84D5",0x5A32],
+ ["84D6",0x5BFB],
+ ["84D7",0x5C9A],
+ ["84D8",0x5E27],
+ ["84D9",0x5E0F],
+ ["84DA",0x5395],
+ ["84DB",0x53A9],
+ ["84DC",0x6076],
+ ["84DD",0x95F7],
+ ["84DE",0x60EC],
+ ["84DF",0x607B],
+ ["84E0",0x607C],
+ ["84E1",0x62E3],
+ ["84E2",0x6325],
+ ["84E3",0x6362],
+ ["84E4",0x626C],
+ ["84E5",0x67A3],
+ ["84E6",0x680B],
+ ["84E7",0x6808],
+ ["84E8",0x94A6],
+ ["84E9",0x6B8B],
+ ["84EA",0x58F3],
+ ["84EB",0x6C2F],
+ ["84EC",0x6C29],
+ ["84ED",0x6D8C],
+ ["84EE",0x51D1],
+ ["84EF",0x6E6E],
+ ["84F0",0x6DA1],
+ ["84F1",0x6C64],
+ ["84F2",0x6D4B],
+ ["84F3",0x6D51],
+ ["84F4",0x6DA3],
+ ["84F5",0x65E0],
+ ["84F6",0x72B9],
+ ["84F7",0x82CF],
+ ["84F8",0x753B],
+ ["84F9",0x75C9],
+ ["84FA",0x53D1],
+ ["84FB",0x76D7],
+ ["84FC",0x781A],
+ ["84FD",0x79C6],
+ ["84FE",0x7A97],
+ ["8540",0x7B14],
+ ["8541",0x7B0B],
+ ["8542",0x7EDE],
+ ["8543",0x7ED3],
+ ["8544",0x7ED2],
+ ["8545",0x7EDD],
+ ["8546",0x4E1D],
+ ["8547",0x7EDC],
+ ["8548",0x7ED9],
+ ["8549",0x7EDA],
+ ["854A",0x7ED6],
+ ["854B",0x7EDB],
+ ["854C",0x8083],
+ ["854D",0x80BE],
+ ["854E",0x80C0],
+ ["854F",0x534E],
+ ["8550",0x83B1],
+ ["8551",0x82CC],
+ ["8552",0x865A],
+ ["8553",0x89C6],
+ ["8554",0x8BC4],
+ ["8555",0x8BCD],
+ ["8556",0x8BC1],
+ ["8557",0x8BC2],
+ ["8558",0x8BCF],
+ ["8559",0x8BC5],
+ ["855A",0x8BC8],
+ ["855B",0x8BCB],
+ ["855C",0x8BC9],
+ ["855D",0x8BCA],
+ ["855E",0x8BC3],
+ ["855F",0x8D2E],
+ ["8560",0x8D34],
+ ["8561",0x8D30],
+ ["8562",0x8D3B],
+ ["8563",0x8D32],
+ ["8564",0x8D39],
+ ["8565",0x8D3A],
+ ["8566",0x8D35],
+ ["8567",0x4E70],
+ ["8568",0x8D2C],
+ ["8569",0x8D38],
+ ["856A",0x8D37],
+ ["856B",0x8F72],
+ ["856C",0x8F74],
+ ["856D",0x8F76],
+ ["856E",0x8FDB],
+ ["856F",0x90AE],
+ ["8570",0x4E61],
+ ["8571",0x949E],
+ ["8572",0x94AE],
+ ["8573",0x9499],
+ ["8574",0x94A0],
+ ["8575",0x94A7],
+ ["8576",0x949D],
+ ["8577",0x94A4],
+ ["8578",0x94A3],
+ ["8579",0x95F5],
+ ["857A",0x95F0],
+ ["857B",0x5F00],
+ ["857C",0x95F2],
+ ["857D",0x95F4],
+ ["857E",0x95F3],
+ ["85A1",0x961F],
+ ["85A2",0x9636],
+ ["85A3",0x9633],
+ ["85A4",0x97E7],
+ ["85A5",0x9879],
+ ["85A6",0x987A],
+ ["85A7",0x987B],
+ ["85A8",0x996A],
+ ["85A9",0x996D],
+ ["85AA",0x9968],
+ ["85AB",0x996E],
+ ["85AC",0x996C],
+ ["85AD",0x51AF],
+ ["85AE",0x9A6D],
+ ["85AF",0x4E71],
+ ["85B0",0x503A],
+ ["85B1",0x4F20],
+ ["85B2",0x4EC5],
+ ["85B3",0x503E],
+ ["85B4",0x4F24],
+ ["85B5",0x506C],
+ ["85B6",0x94F2],
+ ["85B7",0x52BF],
+ ["85B8",0x79EF],
+ ["85B9",0x6C47],
+ ["85BA",0x5417],
+ ["85BB",0x545C],
+ ["85BC",0x545B],
+ ["85BD",0x56ED],
+ ["85BE",0x5706],
+ ["85BF",0x6D82],
+ ["85C0",0x5757],
+ ["85C1",0x575E],
+ ["85C2",0x57D8],
+ ["85C3",0x8314],
+ ["85C4",0x5965],
+ ["85C5",0x5988],
+ ["85C6",0x7231],
+ ["85C7",0x5FFE],
+ ["85C8",0x6006],
+ ["85C9",0x607A],
+ ["85CA",0x635F],
+ ["85CB",0x62A2],
+ ["85CC",0x6363],
+ ["85CD",0x6784],
+ ["85CE",0x6656],
+ ["85CF",0x6655],
+ ["85D0",0x65F8],
+ ["85D1",0x4F1A],
+ ["85D2",0x4E1A],
+ ["85D3",0x6781],
+ ["85D4",0x6768],
+ ["85D5",0x6862],
+ ["85D6",0x67AB],
+ ["85D7",0x5C81],
+ ["85D8",0x6C9F],
+ ["85D9",0x706D],
+ ["85DA",0x6E7F],
+ ["85DB",0x6ED1],
+ ["85DC",0x6CA7],
+ ["85DD",0x70E6],
+ ["85DE",0x70BC],
+ ["85DF",0x7080],
+ ["85E0",0x7115],
+ ["85E1",0x7237],
+ ["85E2",0x72EE],
+ ["85E3",0x733E],
+ ["85E4",0x73F2],
+ ["85E5",0x5F53],
+ ["85E6",0x76CF],
+ ["85E7",0x7750],
+ ["85E8",0x7741],
+ ["85E9",0x96CE],
+ ["85EA",0x788C],
+ ["85EB",0x8282],
+ ["85EC",0x7B15],
+ ["85ED",0x7CA4],
+ ["85EE",0x7ECF],
+ ["85EF",0x7EE2],
+ ["85F0",0x7ED1],
+ ["85F1",0x7EE5],
+ ["85F2",0x7EE6],
+ ["85F3",0x4E49],
+ ["85F4",0x7FA1],
+ ["85F5",0x5723],
+ ["85F6",0x80A0],
+ ["85F7",0x811A],
+ ["85F8",0x80BF],
+ ["85F9",0x8111],
+ ["85FA",0x8364],
+ ["85FB",0x82C7],
+ ["85FC",0x53F6],
+ ["85FD",0x83B4],
+ ["85FE",0x865E],
+ ["8640",0x864F],
+ ["8641",0x53F7],
+ ["8642",0x8708],
+ ["8643",0x86AC],
+ ["8644",0x8865],
+ ["8645",0x88C5],
+ ["8646",0x8BE7],
+ ["8647",0x8BE5],
+ ["8648",0x8BE6],
+ ["8649",0x8BD5],
+ ["864A",0x8BD7],
+ ["864B",0x8BD8],
+ ["864C",0x8BD9],
+ ["864D",0x8BE3],
+ ["864E",0x8BDA],
+ ["864F",0x8BDD],
+ ["8650",0x8BDB],
+ ["8651",0x8BE1],
+ ["8652",0x8BE2],
+ ["8653",0x8BE0],
+ ["8654",0x8BDF],
+ ["8655",0x8D3C],
+ ["8656",0x8D44],
+ ["8657",0x8D3E],
+ ["8658",0x8D3F],
+ ["8659",0x8D40],
+ ["865A",0x8D41],
+ ["865B",0x8D42],
+ ["865C",0x8D45],
+ ["865D",0x8F83],
+ ["865E",0x8F7D],
+ ["865F",0x8F7C],
+ ["8660",0x8F7E],
+ ["8661",0x519C],
+ ["8662",0x8FD0],
+ ["8663",0x8FBE],
+ ["8664",0x8FDD],
+ ["8665",0x8FC7],
+ ["8666",0x90B9],
+ ["8667",0x94B4],
+ ["8668",0x94B3],
+ ["8669",0x94B9],
+ ["866A",0x94B8],
+ ["866B",0x94BE],
+ ["866C",0x94C0],
+ ["866D",0x94C5],
+ ["866E",0x94A9],
+ ["866F",0x94C2],
+ ["8670",0x94C3],
+ ["8671",0x94C9],
+ ["8672",0x94CB],
+ ["8673",0x949C],
+ ["8674",0x94CD],
+ ["8675",0x94BF],
+ ["8676",0x94C6],
+ ["8677",0x95F8],
+ ["8678",0x9668],
+ ["8679",0x96BD],
+ ["867A",0x7535],
+ ["867B",0x9884],
+ ["867C",0x987D],
+ ["867D",0x987F],
+ ["867E",0x987C],
+ ["86A1",0x9881],
+ ["86A2",0x9882],
+ ["86A3",0x9972],
+ ["86A4",0x9974],
+ ["86A5",0x9971],
+ ["86A6",0x9970],
+ ["86A7",0x9A70],
+ ["86A8",0x9A6E],
+ ["86A9",0x9A6F],
+ ["86AA",0x9E20],
+ ["86AB",0x4FA5],
+ ["86AC",0x4FA8],
+ ["86AD",0x532E],
+ ["86AE",0x538C],
+ ["86AF",0x5C1D],
+ ["86B0",0x5455],
+ ["86B1",0x53F9],
+ ["86B2",0x55BD],
+ ["86B3",0x5567],
+ ["86B4",0x54D4],
+ ["86B5",0x56E2],
+ ["86B6",0x56FE],
+ ["86B7",0x5C18],
+ ["86B8",0x57AB],
+ ["86B9",0x5811],
+ ["86BA",0x5BFF],
+ ["86BB",0x68A6],
+ ["86BC",0x593A],
+ ["86BD",0x5941],
+ ["86BE",0x59AA],
+ ["86BF",0x5B9E],
+ ["86C0",0x5BDD],
+ ["86C1",0x5BF9],
+ ["86C2",0x5C61],
+ ["86C3",0x5D2D],
+ ["86C4",0x5C96],
+ ["86C5",0x5E01],
+ ["86C6",0x5E3C],
+ ["86C7",0x5F7B],
+ ["86C8",0x6001],
+ ["86C9",0x60EF],
+ ["86CA",0x6078],
+ ["86CB",0x60ED],
+ ["86CC",0x60E8],
+ ["86CD",0x6402],
+ ["86CE",0x63B4],
+ ["86CF",0x63BA],
+ ["86D0",0x7545],
+ ["86D1",0x8363],
+ ["86D2",0x67AA],
+ ["86D3",0x6EDA],
+ ["86D4",0x6E0D],
+ ["86D5",0x6C49],
+ ["86D6",0x6EE1],
+ ["86D7",0x6EDE],
+ ["86D8",0x6E10],
+ ["86D9",0x6DA8],
+ ["86DA",0x6D9F],
+ ["86DB",0x6CAA],
+ ["86DC",0x6E14],
+ ["86DD",0x6E17],
+ ["86DE",0x6DA4],
+ ["86DF",0x8367],
+ ["86E0",0x5C14],
+ ["86E1",0x8366],
+ ["86E2",0x72F1],
+ ["86E3",0x7410],
+ ["86E4",0x739B],
+ ["86E5",0x759F],
+ ["86E6",0x75A1],
+ ["86E7",0x75AF],
+ ["86E8",0x75EA],
+ ["86E9",0x5C3D],
+ ["86EA",0x76D1],
+ ["86EB",0x7855],
+ ["86EC",0x796F],
+ ["86ED",0x7978],
+ ["86EE",0x79CD],
+ ["86EF",0x79F0],
+ ["86F0",0x6D3C],
+ ["86F1",0x7A9D],
+ ["86F2",0x7B3A],
+ ["86F3",0x7B5D],
+ ["86F4",0x7EFD],
+ ["86F5",0x7EFE],
+ ["86F6",0x7EFC],
+ ["86F7",0x7EF0],
+ ["86F8",0x7EEB],
+ ["86F9",0x7EFF],
+ ["86FA",0x7D27],
+ ["86FB",0x7F00],
+ ["86FC",0x7EB2],
+ ["86FD",0x7EEE],
+ ["86FE",0x7EF8],
+ ["8740",0x7EF5],
+ ["8741",0x7EB6],
+ ["8742",0x7EF4],
+ ["8743",0x7EEA],
+ ["8744",0x7F01],
+ ["8745",0x7EF6],
+ ["8746",0x7F5A],
+ ["8747",0x95FB],
+ ["8748",0x8385],
+ ["8749",0x76D6],
+ ["874A",0x836A],
+ ["874B",0x82CD],
+ ["874C",0x8680],
+ ["874D",0x8BF5],
+ ["874E",0x8BED],
+ ["874F",0x8BEC],
+ ["8750",0x8BA4],
+ ["8751",0x8BEB],
+ ["8752",0x8BEF],
+ ["8753",0x8BF4],
+ ["8754",0x8BF0],
+ ["8755",0x8BF2],
+ ["8756",0x8BF1],
+ ["8757",0x8BF3],
+ ["8758",0x8BEE],
+ ["8759",0x5BBE],
+ ["875A",0x8D48],
+ ["875B",0x8D4A],
+ ["875C",0x8D75],
+ ["875D",0x8D76],
+ ["875E",0x8F85],
+ ["875F",0x8F84],
+ ["8760",0x8F7B],
+ ["8761",0x8FDC],
+ ["8762",0x900A],
+ ["8763",0x9012],
+ ["8764",0x94F0],
+ ["8765",0x94F6],
+ ["8766",0x94DC],
+ ["8767",0x94ED],
+ ["8768",0x94E2],
+ ["8769",0x94EC],
+ ["876A",0x94E8],
+ ["876B",0x94F5],
+ ["876C",0x94E3],
+ ["876D",0x9602],
+ ["876E",0x95FA],
+ ["876F",0x95FD],
+ ["8770",0x9601],
+ ["8771",0x9600],
+ ["8772",0x9645],
+ ["8773",0x9887],
+ ["8774",0x9886],
+ ["8775",0x98D2],
+ ["8776",0x997A],
+ ["8777",0x997C],
+ ["8778",0x9975],
+ ["8779",0x9977],
+ ["877A",0x9A73],
+ ["877B",0x80AE],
+ ["877C",0x9AB0],
+ ["877D",0x9E23],
+ ["877E",0x9E22],
+ ["87A1",0x51E4],
+ ["87A2",0x9F50],
+ ["87A3",0x4EBF],
+ ["87A4",0x4EEA],
+ ["87A5",0x4EF7],
+ ["87A6",0x4FAC],
+ ["87A7",0x4FA9],
+ ["87A8",0x4FED],
+ ["87A9",0x5267],
+ ["87AA",0x5218],
+ ["87AB",0x5251],
+ ["87AC",0x523D],
+ ["87AD",0x5389],
+ ["87AE",0x5520],
+ ["87AF",0x5634],
+ ["87B0",0x54D7],
+ ["87B1",0x5618],
+ ["87B2",0x55B7],
+ ["87B3",0x5578],
+ ["87B4",0x53FD],
+ ["87B5",0x589F],
+ ["87B6",0x575F],
+ ["87B7",0x5760],
+ ["87B8",0x5815],
+ ["87B9",0x5A34],
+ ["87BA",0x5A75],
+ ["87BB",0x59A9],
+ ["87BC",0x5A07],
+ ["87BD",0x5A06],
+ ["87BE",0x5BBD],
+ ["87BF",0x5BA1],
+ ["87C0",0x5199],
+ ["87C1",0x5C42],
+ ["87C2",0x5D94],
+ ["87C3",0x5E1C],
+ ["87C4",0x5E9F],
+ ["87C5",0x53A8],
+ ["87C6",0x5E99],
+ ["87C7",0x53AE],
+ ["87C8",0x5E7F],
+ ["87C9",0x5F39],
+ ["87CA",0x5E86],
+ ["87CB",0x8651],
+ ["87CC",0x5FE7],
+ ["87CD",0x6002],
+ ["87CE",0x60AF],
+ ["87CF",0x60EE],
+ ["87D0",0x6124],
+ ["87D1",0x6003],
+ ["87D2",0x631A],
+ ["87D3",0x6251],
+ ["87D4",0x635E],
+ ["87D5",0x62E8],
+ ["87D6",0x6320],
+ ["87D7",0x629A],
+ ["87D8",0x63B8],
+ ["87D9",0x63FF],
+ ["87DA",0x654C],
+ ["87DB",0x6570],
+ ["87DC",0x6682],
+ ["87DD",0x6635],
+ ["87DE",0x6837],
+ ["87DF",0x6869],
+ ["87E0",0x67A2],
+ ["87E1",0x6807],
+ ["87E2",0x697C],
+ ["87E3",0x6868],
+ ["87E4",0x4E50],
+ ["87E5",0x679E],
+ ["87E6",0x6B27],
+ ["87E7",0x6B87],
+ ["87E8",0x6BB4],
+ ["87E9",0x6D46],
+ ["87EA",0x6CFC],
+ ["87EB",0x6D01],
+ ["87EC",0x6D47],
+ ["87ED",0x6E83],
+ ["87EE",0x6DA6],
+ ["87EF",0x6DA7],
+ ["87F0",0x6D54],
+ ["87F1",0x70ED],
+ ["87F2",0x5956],
+ ["87F3",0x83B9],
+ ["87F4",0x75AE],
+ ["87F5",0x7691],
+ ["87F6",0x76B1],
+ ["87F7",0x76D8],
+ ["87F8",0x786E],
+ ["87F9",0x7801],
+ ["87FA",0x7A91],
+ ["87FB",0x7A77],
+ ["87FC",0x7F14],
+ ["87FD",0x7EC3],
+ ["87FE",0x7EAC],
+ ["8840",0x7F04],
+ ["8841",0x7F05],
+ ["8842",0x7F09],
+ ["8843",0x7F16],
+ ["8844",0x7F18],
+ ["8845",0x7EBF],
+ ["8846",0x7F0E],
+ ["8847",0x7F13],
+ ["8848",0x7F0D],
+ ["8849",0x7F02],
+ ["884A",0x7F08],
+ ["884B",0x7F07],
+ ["884C",0x9A82],
+ ["884D",0x7F62],
+ ["884E",0x80F6],
+ ["884F",0x80A4],
+ ["8850",0x83B2],
+ ["8851",0x836B],
+ ["8852",0x848B],
+ ["8853",0x867E],
+ ["8854",0x8717],
+ ["8855",0x536B],
+ ["8856",0x8C0A],
+ ["8857",0x8C05],
+ ["8858",0x8C08],
+ ["8859",0x8C06],
+ ["885A",0x8BDE],
+ ["885B",0x8BF7],
+ ["885C",0x8BF8],
+ ["885D",0x8BFE],
+ ["885E",0x8BFF],
+ ["885F",0x8C04],
+ ["8860",0x8C03],
+ ["8861",0x8C01],
+ ["8862",0x8BBA],
+ ["8863",0x8BE4],
+ ["8864",0x8C07],
+ ["8865",0x8BFD],
+ ["8866",0x8C00],
+ ["8867",0x7AD6],
+ ["8868",0x8D54],
+ ["8869",0x8D4F],
+ ["886A",0x8D4B],
+ ["886B",0x8D31],
+ ["886C",0x8D26],
+ ["886D",0x8D4C],
+ ["886E",0x8D24],
+ ["886F",0x5356],
+ ["8870",0x8D50],
+ ["8871",0x8D28],
+ ["8872",0x8D53],
+ ["8873",0x8DF5],
+ ["8874",0x8F89],
+ ["8875",0x8F86],
+ ["8876",0x8F8D],
+ ["8877",0x8F88],
+ ["8878",0x8F87],
+ ["8879",0x8F6E],
+ ["887A",0x8F8E],
+ ["887B",0x8F8B],
+ ["887C",0x8F8A],
+ ["887D",0x9002],
+ ["887E",0x8FC1],
+ ["88A1",0x90BB],
+ ["88A2",0x90D1],
+ ["88A3",0x9093],
+ ["88A4",0x950C],
+ ["88A5",0x9511],
+ ["88A6",0x9500],
+ ["88A7",0x94FA],
+ ["88A8",0x94D0],
+ ["88A9",0x9504],
+ ["88AA",0x94DD],
+ ["88AB",0x9510],
+ ["88AC",0x9509],
+ ["88AD",0x950B],
+ ["88AE",0x94A1],
+ ["88AF",0x9502],
+ ["88B0",0x95FE],
+ ["88B1",0x9605],
+ ["88B2",0x5DE9],
+ ["88B3",0x9889],
+ ["88B4",0x988C],
+ ["88B5",0x517B],
+ ["88B6",0x997F],
+ ["88B7",0x9981],
+ ["88B8",0x9A7C],
+ ["88B9",0x9A7B],
+ ["88BA",0x9A77],
+ ["88BB",0x9A76],
+ ["88BC",0x9A7D],
+ ["88BD",0x9A7E],
+ ["88BE",0x9A79],
+ ["88BF",0x9A78],
+ ["88C0",0x9AB7],
+ ["88C1",0x95F9],
+ ["88C2",0x9C7F],
+ ["88C3",0x9C81],
+ ["88C4",0x9E29],
+ ["88C5",0x9E26],
+ ["88C6",0x9EB8],
+ ["88C7",0x9F7F],
+ ["88C8",0x4FE6],
+ ["88C9",0x50A7],
+ ["88CA",0x4FAA],
+ ["88CB",0x5E42],
+ ["88CC",0x5242],
+ ["88CD",0x5428],
+ ["88CE",0x54DD],
+ ["88CF",0x55F3],
+ ["88D0",0x57A6],
+ ["88D1",0x575B],
+ ["88D2",0x594B],
+ ["88D3",0x8885],
+ ["88D4",0x5B66],
+ ["88D5",0x5BFC],
+ ["88D6",0x5BAA],
+ ["88D7",0x51ED],
+ ["88D8",0x60EB],
+ ["88D9",0x61D4],
+ ["88DA",0x5FC6],
+ ["88DB",0x6218],
+ ["88DC",0x62E5],
+ ["88DD",0x6321],
+ ["88DE",0x631E],
+ ["88DF",0x636E],
+ ["88E0",0x63B3],
+ ["88E1",0x62E9],
+ ["88E2",0x6361],
+ ["88E3",0x62C5],
+ ["88E4",0x631D],
+ ["88E5",0x5386],
+ ["88E6",0x6653],
+ ["88E7",0x6654],
+ ["88E8",0x6619],
+ ["88E9",0x6866],
+ ["88EA",0x6A2A],
+ ["88EB",0x6811],
+ ["88EC",0x692D],
+ ["88ED",0x6865],
+ ["88EE",0x673A],
+ ["88EF",0x6861],
+ ["88F0",0x6DC0],
+ ["88F1",0x6D53],
+ ["88F2",0x6CFD],
+ ["88F3",0x6D4A],
+ ["88F4",0x6CA3],
+ ["88F5",0x6FA6],
+ ["88F6",0x6E11],
+ ["88F7",0x70BD],
+ ["88F8",0x70E7],
+ ["88F9",0x706F],
+ ["88FA",0x70EB],
+ ["88FB",0x7116],
+ ["88FC",0x72EC],
+ ["88FD",0x7391],
+ ["88FE",0x74EF],
+ ["8940",0x7618],
+ ["8941",0x5362],
+ ["8942",0x7792],
+ ["8943",0x7816],
+ ["8944",0x789B],
+ ["8945",0x79EF],
+ ["8946",0x9896],
+ ["8947",0x7A23],
+ ["8948",0x7AA5],
+ ["8949",0x7B03],
+ ["894A",0x7B5B],
+ ["894B",0x7F22],
+ ["894C",0x7F23],
+ ["894D",0x8426],
+ ["894E",0x7F1A],
+ ["894F",0x53BF],
+ ["8950",0x7F1F],
+ ["8951",0x7F1C],
+ ["8952",0x7F19],
+ ["8953",0x7EC9],
+ ["8954",0x817B],
+ ["8955",0x5174],
+ ["8956",0x8231],
+ ["8957",0x8361],
+ ["8958",0x8427],
+ ["8959",0x829C],
+ ["895A",0x8682],
+ ["895B",0x8424],
+ ["895C",0x88E4],
+ ["895D",0x4EB2],
+ ["895E",0x89CE],
+ ["895F",0x8C1B],
+ ["8960",0x8C1A],
+ ["8961",0x8C0F],
+ ["8962",0x8BB3],
+ ["8963",0x8C0B],
+ ["8964",0x8C0D],
+ ["8965",0x8C10],
+ ["8966",0x8C18],
+ ["8967",0x8BFA],
+ ["8968",0x8C12],
+ ["8969",0x8C13],
+ ["896A",0x8BBD],
+ ["896B",0x8C15],
+ ["896C",0x8C19],
+ ["896D",0x8C0C],
+ ["896E",0x8C16],
+ ["896F",0x8D56],
+ ["8970",0x8F90],
+ ["8971",0x8F91],
+ ["8972",0x8F93],
+ ["8973",0x8F8F],
+ ["8974",0x529E],
+ ["8975",0x9009],
+ ["8976",0x8FDF],
+ ["8977",0x8FBD],
+ ["8978",0x9057],
+ ["8979",0x90BA],
+ ["897A",0x952D],
+ ["897B",0x952F],
+ ["897C",0x9530],
+ ["897D",0x9519],
+ ["897E",0x94B1],
+ ["89A1",0x94A2],
+ ["89A2",0x9521],
+ ["89A3",0x5F55],
+ ["89A4",0x94EE],
+ ["89A5",0x9525],
+ ["89A6",0x9526],
+ ["89A7",0x951F],
+ ["89A8",0x9522],
+ ["89A9",0x9531],
+ ["89AA",0x960E],
+ ["89AB",0x968F],
+ ["89AC",0x9669],
+ ["89AD",0x9759],
+ ["89AE",0x817C],
+ ["89AF",0x988A],
+ ["89B0",0x9888],
+ ["89B1",0x9891],
+ ["89B2",0x9894],
+ ["89B3",0x5934],
+ ["89B4",0x9893],
+ ["89B5",0x9890],
+ ["89B6",0x9986],
+ ["89B7",0x996F],
+ ["89B8",0x9984],
+ ["89B9",0x9985],
+ ["89BA",0x9A87],
+ ["89BB",0x9A88],
+ ["89BC",0x9A86],
+ ["89BD",0x9AB8],
+ ["89BE",0x9ABC],
+ ["89BF",0x9C8D],
+ ["89C0",0x9E35],
+ ["89C1",0x9E2A],
+ ["89C2",0x9E2F],
+ ["89C3",0x9E2D],
+ ["89C4",0x9E33],
+ ["89C5",0x9F99],
+ ["89C6",0x9F9F],
+ ["89C7",0x4F18],
+ ["89C8",0x507F],
+ ["89C9",0x50A8],
+ ["89CA",0x52B1],
+ ["89CB",0x549B],
+ ["89CC",0x5413],
+ ["89CD",0x538B],
+ ["89CE",0x57D9],
+ ["89CF",0x5A74],
+ ["89D0",0x5AD4],
+ ["89D1",0x5B37],
+ ["89D2",0x5C34],
+ ["89D3",0x5C66],
+ ["89D4",0x5C7F],
+ ["89D5",0x5D58],
+ ["89D6",0x5E2E],
+ ["89D7",0x5F25],
+ ["89D8",0x5E94],
+ ["89D9",0x6073],
+ ["89DA",0x620F],
+ ["89DB",0x51FB],
+ ["89DC",0x6324],
+ ["89DD",0x62E7],
+ ["89DE",0x62DF],
+ ["89DF",0x6401],
+ ["89E0",0x655B],
+ ["89E1",0x6BD9],
+ ["89E2",0x66A7],
+ ["89E3",0x6863],
+ ["89E4",0x68C0],
+ ["89E5",0x6867],
+ ["89E6",0x6809],
+ ["89E7",0x6A2F],
+ ["89E8",0x6B93],
+ ["89E9",0x6BE1],
+ ["89EA",0x6CDE],
+ ["89EB",0x6EE8],
+ ["89EC",0x6D4E],
+ ["89ED",0x6D9B],
+ ["89EE",0x6EE5],
+ ["89EF",0x6DA9],
+ ["89F0",0x6F4D],
+ ["89F1",0x8425],
+ ["89F2",0x707F],
+ ["89F3",0x70DB],
+ ["89F4",0x70E9],
+ ["89F5",0x5899],
+ ["89F6",0x72DE],
+ ["89F7",0x83B7],
+ ["89F8",0x73AF],
+ ["89F9",0x7477],
+ ["89FA",0x75E8],
+ ["89FB",0x7597],
+ ["89FC",0x77EB],
+ ["89FD",0x78FA],
+ ["89FE",0x77F6],
+ ["8A40",0x7BD3],
+ ["8A41",0x7CAA],
+ ["8A42",0x9546],
+ ["8A43",0x7CC1],
+ ["8A44",0x7F29],
+ ["8A45",0x7EE9],
+ ["8A46",0x7F2A],
+ ["8A47",0x7F15],
+ ["8A48",0x7F27],
+ ["8A49",0x7EF7],
+ ["8A4A",0x7F1D],
+ ["8A4B",0x603B],
+ ["8A4C",0x7EB5],
+ ["8A4D",0x7F2B],
+ ["8A4E",0x7EA4],
+ ["8A4F",0x7F25],
+ ["8A50",0x7E66],
+ ["8A51",0x7F26],
+ ["8A52",0x58F0],
+ ["8A53",0x806A],
+ ["8A54",0x8054],
+ ["8A55",0x8038],
+ ["8A56",0x8113],
+ ["8A57",0x80C6],
+ ["8A58",0x8138],
+ ["8A59",0x810D],
+ ["8A5A",0x4E34],
+ ["8A5B",0x4E3E],
+ ["8A5C",0x8270],
+ ["8A5D",0x8537],
+ ["8A5E",0x84DF],
+ ["8A5F",0x4E8F],
+ ["8A60",0x877C],
+ ["8A61",0x8748],
+ ["8A62",0x4EB5],
+ ["8A63",0x891B],
+ ["8A64",0x89CA],
+ ["8A65",0x8C1C],
+ ["8A66",0x8C24],
+ ["8A67",0x8C26],
+ ["8A68",0x8BB2],
+ ["8A69",0x8C0E],
+ ["8A6A",0x8C23],
+ ["8A6B",0x8C22],
+ ["8A6C",0x8A8A],
+ ["8A6D",0x8C27],
+ ["8A6E",0x8D5A],
+ ["8A6F",0x8D5B],
+ ["8A70",0x8D2D],
+ ["8A71",0x8D59],
+ ["8A72",0x8D8B],
+ ["8A73",0x8F96],
+ ["8A74",0x8F97],
+ ["8A75",0x6BC2],
+ ["8A76",0x8F95],
+ ["8A77",0x8206],
+ ["8A78",0x8FD8],
+ ["8A79",0x8FC8],
+ ["8A7A",0x915D],
+ ["8A7B",0x9540],
+ ["8A7C",0x9541],
+ ["8A7D",0x951A],
+ ["8A7E",0x952E],
+ ["8AA1",0x9532],
+ ["8AA2",0x9505],
+ ["8AA3",0x9524],
+ ["8AA4",0x953A],
+ ["8AA5",0x9539],
+ ["8AA6",0x953B],
+ ["8AA7",0x953E],
+ ["8AA8",0x9537],
+ ["8AA9",0x9614],
+ ["8AAA",0x9615],
+ ["8AAB",0x9611],
+ ["8AAC",0x95F1],
+ ["8AAD",0x9690],
+ ["8AAE",0x96B6],
+ ["8AAF",0x867D],
+ ["8AB0",0x97E9],
+ ["8AB1",0x9897],
+ ["8AB2",0x98D3],
+ ["8AB3",0x9A8B],
+ ["8AB4",0x9A8F],
+ ["8AB5",0x9C9C],
+ ["8AB6",0x9C9B],
+ ["8AB7",0x9C94],
+ ["8AB8",0x9C91],
+ ["8AB9",0x9E3F],
+ ["8ABA",0x9E3D],
+ ["8ABB",0x70B9],
+ ["8ABC",0x658B],
+ ["8ABD",0x4E1B],
+ ["8ABE",0x565C],
+ ["8ABF",0x5739],
+ ["8AC0",0x5792],
+ ["8AC1",0x5A76],
+ ["8AC2",0x61D1],
+ ["8AC3",0x6269],
+ ["8AC4",0x63B7],
+ ["8AC5",0x6270],
+ ["8AC6",0x64B5],
+ ["8AC7",0x6446],
+ ["8AC8",0x64DE],
+ ["8AC9",0x64B7],
+ ["8ACA",0x65AD],
+ ["8ACB",0x69DF],
+ ["8ACC",0x67DC],
+ ["8ACD",0x69DB],
+ ["8ACE",0x67E0],
+ ["8ACF",0x6B24],
+ ["8AD0",0x5F52],
+ ["8AD1",0x6BA1],
+ ["8AD2",0x6CFB],
+ ["8AD3",0x6E16],
+ ["8AD4",0x6EE4],
+ ["8AD5",0x6E0E],
+ ["8AD6",0x6E85],
+ ["8AD7",0x6D4F],
+ ["8AD8",0x70EC],
+ ["8AD9",0x7118],
+ ["8ADA",0x72B7],
+ ["8ADB",0x730E],
+ ["8ADC",0x74EE],
+ ["8ADD",0x75A0],
+ ["8ADE",0x7751],
+ ["8ADF",0x7840],
+ ["8AE0",0x793C],
+ ["8AE1",0x7A51],
+ ["8AE2",0x79FD],
+ ["8AE3",0x7A9C],
+ ["8AE4",0x7A8D],
+ ["8AE5",0x7BAB],
+ ["8AE6",0x7C27],
+ ["8AE7",0x7BAA],
+ ["8AE8",0x7BD1],
+ ["8AE9",0x7B80],
+ ["8AEA",0x7CAE],
+ ["8AEB",0x7EC7],
+ ["8AEC",0x7F2E],
+ ["8AED",0x7ED5],
+ ["8AEE",0x7F2D],
+ ["8AEF",0x7EE3],
+ ["8AF0",0x7F2F],
+ ["8AF1",0x7FD8],
+ ["8AF2",0x804C],
+ ["8AF3",0x8042],
+ ["8AF4",0x8110],
+ ["8AF5",0x8191],
+ ["8AF6",0x65E7],
+ ["8AF7",0x8428],
+ ["8AF8",0x84DD],
+ ["8AF9",0x8360],
+ ["8AFA",0x86F2],
+ ["8AFB",0x8749],
+ ["8AFC",0x89D0],
+ ["8AFD",0x89DE],
+ ["8AFE",0x8C1F],
+ ["8B40",0x8C28],
+ ["8B41",0x8C2C],
+ ["8B42",0x8C2A],
+ ["8B43",0x8D58],
+ ["8B44",0x8E52],
+ ["8B45",0x8FF9],
+ ["8B46",0x8DF8],
+ ["8B47",0x8EAF],
+ ["8B48",0x8F6C],
+ ["8B49",0x8F99],
+ ["8B4A",0x8FE9],
+ ["8B4B",0x533B],
+ ["8B4C",0x9171],
+ ["8B4D",0x9551],
+ ["8B4E",0x9501],
+ ["8B4F",0x94A8],
+ ["8B50",0x954D],
+ ["8B51",0x9547],
+ ["8B52",0x9550],
+ ["8B53",0x9552],
+ ["8B54",0x9549],
+ ["8B55",0x9616],
+ ["8B56",0x95EF],
+ ["8B57",0x9617],
+ ["8B58",0x9619],
+ ["8B59",0x6742],
+ ["8B5A",0x53CC],
+ ["8B5B",0x96CF],
+ ["8B5C",0x9E21],
+ ["8B5D",0x989D],
+ ["8B5E",0x989C],
+ ["8B5F",0x9898],
+ ["8B60",0x989A],
+ ["8B61",0x989B],
+ ["8B62",0x998F],
+ ["8B63",0x998A],
+ ["8B64",0x9988],
+ ["8B65",0x9A91],
+ ["8B66",0x9AC1],
+ ["8B67",0x9CA8],
+ ["8B68",0x9CA4],
+ ["8B69",0x9CAB],
+ ["8B6A",0x9CA7],
+ ["8B6B",0x9E43],
+ ["8B6C",0x9E45],
+ ["8B6D",0x9E44],
+ ["8B6E",0x5784],
+ ["8B6F",0x575C],
+ ["8B70",0x5BA0],
+ ["8B71",0x5E9E],
+ ["8B72",0x5E90],
+ ["8B73",0x60E9],
+ ["8B74",0x6000],
+ ["8B75",0x61D2],
+ ["8B76",0x62E2],
+ ["8B77",0x65F7],
+ ["8B78",0x6A71],
+ ["8B79",0x691F],
+ ["8B7A",0x6988],
+ ["8B7B",0x6A79],
+ ["8B7C",0x6F47],
+ ["8B7D",0x6FD1],
+ ["8B7E",0x6CA5],
+ ["8BA1",0x6FD2],
+ ["8BA2",0x6CF8],
+ ["8BA3",0x70C1],
+ ["8BA4",0x724D],
+ ["8BA5",0x728A],
+ ["8BA6",0x517D],
+ ["8BA7",0x736D],
+ ["8BA8",0x73BA],
+ ["8BA9",0x743C],
+ ["8BAA",0x7574],
+ ["8BAB",0x762A],
+ ["8BAC",0x788D],
+ ["8BAD",0x7977],
+ ["8BAE",0x7A33],
+ ["8BAF",0x7B7E],
+ ["8BB0",0x8327],
+ ["8BB1",0x7ECE],
+ ["8BB2",0x7EF3],
+ ["8BB3",0x7ED8],
+ ["8BB4",0x7F57],
+ ["8BB5",0x7F34],
+ ["8BB6",0x81BB],
+ ["8BB7",0x827A],
+ ["8BB8",0x85AE],
+ ["8BB9",0x836F],
+ ["8BBA",0x8681],
+ ["8BBB",0x8747],
+ ["8BBC",0x88C6],
+ ["8BBD",0x8884],
+ ["8BBE",0x8C31],
+ ["8BBF",0x8BC6],
+ ["8BC0",0x8C2D],
+ ["8BC1",0x8C32],
+ ["8BC2",0x8BA5],
+ ["8BC3",0x8C2F],
+ ["8BC4",0x8D60],
+ ["8BC5",0x8D5E],
+ ["8BC6",0x8DF7],
+ ["8BC7",0x8F9A],
+ ["8BC8",0x8F7F],
+ ["8BC9",0x8F9E],
+ ["8BCA",0x8FB9],
+ ["8BCB",0x955C],
+ ["8BCC",0x955D],
+ ["8BCD",0x955E],
+ ["8BCE",0x94FE],
+ ["8BCF",0x9557],
+ ["8BD0",0x9558],
+ ["8BD1",0x9556],
+ ["8BD2",0x9559],
+ ["8BD3",0x9535],
+ ["8BD4",0x9542],
+ ["8BD5",0x94FF],
+ ["8BD6",0x933E],
+ ["8BD7",0x5173],
+ ["8BD8",0x9647],
+ ["8BD9",0x96BE],
+ ["8BDA",0x96FE],
+ ["8BDB",0x97EC],
+ ["8BDC",0x97F5],
+ ["8BDD",0x7C7B],
+ ["8BDE",0x98A0],
+ ["8BDF",0x98D5],
+ ["8BE0",0x9992],
+ ["8BE1",0x9991],
+ ["8BE2",0x9A9B],
+ ["8BE3",0x9A97],
+ ["8BE4",0x9CB8],
+ ["8BE5",0x9CB3],
+ ["8BE6",0x9CAD],
+ ["8BE7",0x9CB7],
+ ["8BE8",0x9E51],
+ ["8BE9",0x9E49],
+ ["8BEA",0x9E4A],
+ ["8BEB",0x9E4C],
+ ["8BEC",0x9E4F],
+ ["8BED",0x4E3D],
+ ["8BEE",0x9EB4],
+ ["8BEF",0x529D],
+ ["8BF0",0x5499],
+ ["8BF1",0x5624],
+ ["8BF2",0x4E25],
+ ["8BF3",0x5B9D],
+ ["8BF4",0x60AC],
+ ["8BF5",0x5FCF],
+ ["8BF6",0x62E6],
+ ["8BF7",0x6400],
+ ["8BF8",0x80E7],
+ ["8BF9",0x6987],
+ ["8BFA",0x6F9C],
+ ["8BFB",0x6F4B],
+ ["8BFC",0x7089],
+ ["8BFD",0x73D1],
+ ["8BFE",0x77FF],
+ ["8C40",0x783A],
+ ["8C41",0x77FE],
+ ["8C42",0x783E],
+ ["8C43",0x7AA6],
+ ["8C44",0x7ADE],
+ ["8C45",0x7B79],
+ ["8C46",0x7BEE],
+ ["8C47",0x8FAB],
+ ["8C48",0x7F24],
+ ["8C49",0x7EE7],
+ ["8C4A",0x7F42],
+ ["8C4B",0x80EA],
+ ["8C4C",0x8230],
+ ["8C4D",0x853C],
+ ["8C4E",0x853A],
+ ["8C4F",0x82A6],
+ ["8C50",0x82F9],
+ ["8C51",0x8574],
+ ["8C52",0x869D],
+ ["8C53",0x8934],
+ ["8C54",0x89C9],
+ ["8C55",0x89E6],
+ ["8C56",0x8BAE],
+ ["8C57",0x8BD1],
+ ["8C58",0x8C35],
+ ["8C59",0x8D62],
+ ["8C5A",0x8D61],
+ ["8C5B",0x8DB8],
+ ["8C5C",0x91CA],
+ ["8C5D",0x949F],
+ ["8C5E",0x94D9],
+ ["8C5F",0x9508],
+ ["8C60",0x9610],
+ ["8C61",0x98D8],
+ ["8C62",0x9976],
+ ["8C63",0x9965],
+ ["8C64",0x9A9E],
+ ["8C65",0x817E],
+ ["8C66",0x9A9A],
+ ["8C67",0x9CC3],
+ ["8C68",0x9CC5],
+ ["8C69",0x515A],
+ ["8C6A",0x9F83],
+ ["8C6B",0x9F84],
+ ["8C6C",0x4FEA],
+ ["8C6D",0x55EB],
+ ["8C6E",0x556D],
+ ["8C6F",0x56A3],
+ ["8C70",0x5C5E],
+ ["8C71",0x60E7],
+ ["8C72",0x6151],
+ ["8C73",0x6444],
+ ["8C74",0x643A],
+ ["8C75",0x6593],
+ ["8C76",0x6A31],
+ ["8C77",0x680F],
+ ["8C78",0x68C2],
+ ["8C79",0x6B7C],
+ ["8C7A",0x70C2],
+ ["8C7B",0x727A],
+ ["8C7C",0x9576],
+ ["8C7D",0x748E],
+ ["8C7E",0x765E],
+ ["8CA1",0x7F20],
+ ["8CA2",0x7EED],
+ ["8CA3",0x5170],
+ ["8CA4",0x85D3],
+ ["8CA5",0x86CE],
+ ["8CA6",0x89C8],
+ ["8CA7",0x8C34],
+ ["8CA8",0x62A4],
+ ["8CA9",0x8A89],
+ ["8CAA",0x8D43],
+ ["8CAB",0x8E0C],
+ ["8CAC",0x8DC3],
+ ["8CAD",0x8DFB],
+ ["8CAE",0x8F70],
+ ["8CAF",0x8FA9],
+ ["8CB0",0x9570],
+ ["8CB1",0x956D],
+ ["8CB2",0x94C1],
+ ["8CB3",0x94DB],
+ ["8CB4",0x94CE],
+ ["8CB5",0x956F],
+ ["8CB6",0x954C],
+ ["8CB7",0x54CD],
+ ["8CB8",0x987E],
+ ["8CB9",0x98A2],
+ ["8CBA",0x98E8],
+ ["8CBB",0x9A71],
+ ["8CBC",0x9AA0],
+ ["8CBD",0x84E6],
+ ["8CBE",0x9AA1],
+ ["8CBF",0x9AC5],
+ ["8CC0",0x9CCD],
+ ["8CC1",0x9CCF],
+ ["8CC2",0x83BA],
+ ["8CC3",0x9E64],
+ ["8CC4",0x9E5E],
+ ["8CC5",0x9F87],
+ ["8CC6",0x9F88],
+ ["8CC7",0x556E],
+ ["8CC8",0x4FE8],
+ ["8CC9",0x50A5],
+ ["8CCA",0x5453],
+ ["8CCB",0x5B6A],
+ ["8CCC",0x5DC5],
+ ["8CCD",0x5CE6],
+ ["8CCE",0x5F2F],
+ ["8CCF",0x644A],
+ ["8CD0",0x6743],
+ ["8CD1",0x6B22],
+ ["8CD2",0x6EE9],
+ ["8CD3",0x7321],
+ ["8CD4",0x53E0],
+ ["8CD5",0x763E],
+ ["8CD6",0x7663],
+ ["8CD7",0x7B3C],
+ ["8CD8",0x7C41],
+ ["8CD9",0x804B],
+ ["8CDA",0x810F],
+ ["8CDB",0x88AD],
+ ["8CDC",0x886C],
+ ["8CDD",0x8BFB],
+ ["8CDE",0x8D4E],
+ ["8CDF",0x8D5D],
+ ["8CE0",0x8E2F],
+ ["8CE1",0x8E2C],
+ ["8CE2",0x8F94],
+ ["8CE3",0x90E6],
+ ["8CE4",0x94F8],
+ ["8CE5",0x9274],
+ ["8CE6",0x9701],
+ ["8CE7",0x9791],
+ ["8CE8",0x7E6E],
+ ["8CE9",0x98A4],
+ ["8CEA",0x9A84],
+ ["8CEB",0x9A81],
+ ["8CEC",0x9CD6],
+ ["8CED",0x9CA2],
+ ["8CEE",0x9CD4],
+ ["8CEF",0x9CD7],
+ ["8CF0",0x9E67],
+ ["8CF1",0x9E25],
+ ["8CF2",0x9F39],
+ ["8CF3",0x9F89],
+ ["8CF4",0x9F8A],
+ ["8CF5",0x9F9A],
+ ["8CF6",0x604B],
+ ["8CF7",0x631B],
+ ["8CF8",0x6405],
+ ["8CF9",0x74D2],
+ ["8CFA",0x7A83],
+ ["8CFB",0x7F28],
+ ["8CFC",0x81E2],
+ ["8CFD",0x841D],
+ ["8CFE",0x86CA],
+ ["8D40",0x53D8],
+ ["8D41",0x9026],
+ ["8D42",0x903B],
+ ["8D43",0x9573],
+ ["8D44",0x94C4],
+ ["8D45",0x9765],
+ ["8D46",0x663E],
+ ["8D47",0x990D],
+ ["8D48",0x60CA],
+ ["8D49",0x9A7F],
+ ["8D4A",0x9A8C],
+ ["8D4B",0x9AD3],
+ ["8D4C",0x9AD1],
+ ["8D4D",0x9CDD],
+ ["8D4E",0x9CDE],
+ ["8D4F",0x9CDC],
+ ["8D50",0x9E36],
+ ["8D51",0x5631],
+ ["8D52",0x575D],
+ ["8D53",0x63FD],
+ ["8D54",0x762B],
+ ["8D55",0x766B],
+ ["8D56",0x7F81],
+ ["8D57",0x8695],
+ ["8D58",0x8BA9],
+ ["8D59",0x8C17],
+ ["8D5A",0x8C36],
+ ["8D5B",0x8273],
+ ["8D5C",0x8D63],
+ ["8D5D",0x917F],
+ ["8D5E",0x96F3],
+ ["8D5F",0x7075],
+ ["8D60",0x972D],
+ ["8D61",0x98A6],
+ ["8D62",0x9AA4],
+ ["8D63",0x9B13],
+ ["8D64",0x9B47],
+ ["8D65",0x9C8E],
+ ["8D66",0x9E70],
+ ["8D67",0x9E6D],
+ ["8D68",0x7877],
+ ["8D69",0x76D0],
+ ["8D6A",0x9CCC],
+ ["8D6B",0x9F8C],
+ ["8D6C",0x9F8B],
+ ["8D6D",0x5385],
+ ["8D6E",0x6984],
+ ["8D6F",0x6E7E],
+ ["8D70",0x7BF1],
+ ["8D71",0x7BA9],
+ ["8D72",0x86EE],
+ ["8D73",0x89C2],
+ ["8D74",0x8E51],
+ ["8D75",0x8845],
+ ["8D76",0x94A5],
+ ["8D77",0x9885],
+ ["8D78",0x998B],
+ ["8D79",0x9ACB],
+ ["8D7A",0x9EC9],
+ ["8D7B",0x6EE6],
+ ["8D7C",0x77A9],
+ ["8D7D",0x954A],
+ ["8D7E",0x97AF],
+ ["8DA1",0x9A74],
+ ["8DA2",0x9AA5],
+ ["8DA3",0x7F06],
+ ["8DA4",0x8C20],
+ ["8DA5",0x8E8F],
+ ["8DA6",0x917D],
+ ["8DA7",0x94BB],
+ ["8DA8",0x92AE],
+ ["8DA9",0x9523],
+ ["8DAA",0x9CC4],
+ ["8DAB",0x9C88],
+ ["8DAC",0x9EE9],
+ ["8DAD",0x51FF],
+ ["8DAE",0x9E66],
+ ["8DAF",0x9A8A],
+ ["8DB0",0x9E73],
+ ["8DB1",0x9E3E],
+ ["8DB2",0x94BA],
+ ["8DB3",0x4EC2],
+ ["8DB4",0x864D],
+ ["8DB5",0x6B92],
+ ["8DB6",0x57A7],
+ ["8DB7",0x577B],
+ ["8DB8",0x620B],
+ ["8DB9",0x4FE3],
+ ["8DBA",0x522D],
+ ["8DBB",0x538D],
+ ["8DBC",0x5459],
+ ["8DBD",0x537A],
+ ["8DBE",0x7EA8],
+ ["8DBF",0x8307],
+ ["8DC0",0x9487],
+ ["8DC1",0x9486],
+ ["8DC2",0x5457],
+ ["8DC3",0x5F2A],
+ ["8DC4",0x7953],
+ ["8DC5",0x7EBE],
+ ["8DC6",0x90CF],
+ ["8DC7",0x948C],
+ ["8DC8",0x5250],
+ ["8DC9",0x5326],
+ ["8DCA",0x56F5],
+ ["8DCB",0x57AD],
+ ["8DCC",0x5A05],
+ ["8DCD",0x5CBD],
+ ["8DCE",0x5D03],
+ ["8DCF",0x6D9E],
+ ["8DD0",0x6E0C],
+ ["8DD1",0x70C3],
+ ["8DD2",0x7726],
+ ["8DD3",0x7EC0],
+ ["8DD4",0x7ED0],
+ ["8DD5",0x80EB],
+ ["8DD6",0x948E],
+ ["8DD7",0x9490],
+ ["8DD8",0x9495],
+ ["8DD9",0x948D],
+ ["8DDA",0x95EB],
+ ["8DDB",0x59AB],
+ ["8DDC",0x5D5B],
+ ["8DDD",0x607D],
+ ["8DDE",0x6860],
+ ["8DDF",0x67A8],
+ ["8DE0",0x6CA9],
+ ["8DE1",0x6D48],
+ ["8DE2",0x7572],
+ ["8DE3",0x7817],
+ ["8DE4",0x7ED7],
+ ["8DE5",0x83DD],
+ ["8DE6",0x89C7],
+ ["8DE7",0x8BB5],
+ ["8DE8",0x8BCE],
+ ["8DE9",0x8BD2],
+ ["8DEA",0x8D36],
+ ["8DEB",0x8D33],
+ ["8DEC",0x8F7A],
+ ["8DED",0x8F75],
+ ["8DEE",0x8F78],
+ ["8DEF",0x902F],
+ ["8DF0",0x90D3],
+ ["8DF1",0x9104],
+ ["8DF2",0x94AB],
+ ["8DF3",0x94AC],
+ ["8DF4",0x949B],
+ ["8DF5",0x94AF],
+ ["8DF6",0x94AD],
+ ["8DF7",0x94AA],
+ ["8DF8",0x95F6],
+ ["8DF9",0x9667],
+ ["8DFA",0x9878],
+ ["8DFB",0x996B],
+ ["8DFC",0x9EF9],
+ ["8DFD",0x4F1B],
+ ["8DFE",0x507B],
+ ["8E40",0x4F65],
+ ["8E41",0x5522],
+ ["8E42",0x57B2],
+ ["8E43",0x5DEF],
+ ["8E44",0x5FAD],
+ ["8E45",0x709C],
+ ["8E46",0x8315],
+ ["8E47",0x72F2],
+ ["8E48",0x73AE],
+ ["8E49",0x7EE8],
+ ["8E4A",0x7EE0],
+ ["8E4B",0x7EE1],
+ ["8E4C",0x7F9F],
+ ["8E4D",0x836D],
+ ["8E4E",0x86F1],
+ ["8E4F",0x8BD3],
+ ["8E50",0x8BD6],
+ ["8E51",0x8BE9],
+ ["8E52",0x8BD4],
+ ["8E53",0x8BDC],
+ ["8E54",0x8D91],
+ ["8E55",0x8F82],
+ ["8E56",0x8F81],
+ ["8E57",0x90AC],
+ ["8E58",0x94CA],
+ ["8E59",0x94C8],
+ ["8E5A",0x94B0],
+ ["8E5B",0x94B2],
+ ["8E5C",0x94B6],
+ ["8E5D",0x950D],
+ ["8E5E",0x94CC],
+ ["8E5F",0x94BD],
+ ["8E60",0x94BC],
+ ["8E61",0x9883],
+ ["8E62",0x9880],
+ ["8E63",0x51EB],
+ ["8E64",0x9EFE],
+ ["8E65",0x507E],
+ ["8E66",0x551B],
+ ["8E67",0x5D5D],
+ ["8E68",0x5E3B],
+ ["8E69",0x60AB],
+ ["8E6A",0x60AD],
+ ["8E6B",0x6004],
+ ["8E6C",0x622C],
+ ["8E6D",0x6217],
+ ["8E6E",0x629F],
+ ["8E6F",0x62A0],
+ ["8E70",0x63BC],
+ ["8E71",0x6864],
+ ["8E72",0x6769],
+ ["8E73",0x8365],
+ ["8E74",0x6D52],
+ ["8E75",0x6CA4],
+ ["8E76",0x709D],
+ ["8E77",0x76B2],
+ ["8E78",0x7800],
+ ["8E79",0x7EFB],
+ ["8E7A",0x7EF2],
+ ["8E7B",0x7EEF],
+ ["8E7C",0x7EFA],
+ ["8E7D",0x83B3],
+ ["8E7E",0x89CB],
+ ["8EA1",0x8BF6],
+ ["8EA2",0x8D47],
+ ["8EA3",0x94F1],
+ ["8EA4",0x94D2],
+ ["8EA5",0x94D1],
+ ["8EA6",0x94D5],
+ ["8EA7",0x94DF],
+ ["8EA8",0x94EB],
+ ["8EA9",0x94EF],
+ ["8EAA",0x94EA],
+ ["8EAB",0x94F7],
+ ["8EAC",0x94D6],
+ ["8EAD",0x94E5],
+ ["8EAE",0x98D1],
+ ["8EAF",0x523F],
+ ["8EB0",0x52A2],
+ ["8EB1",0x54D3],
+ ["8EB2",0x5452],
+ ["8EB3",0x5D02],
+ ["8EB4",0x5CE4],
+ ["8EB5",0x5E91],
+ ["8EB6",0x6126],
+ ["8EB7",0x6322],
+ ["8EB8",0x6920],
+ ["8EB9",0x6BF5],
+ ["8EBA",0x988D],
+ ["8EBB",0x6D9D],
+ ["8EBC",0x6F62],
+ ["8EBD",0x6DA0],
+ ["8EBE",0x6ED7],
+ ["8EBF",0x740F],
+ ["8EC0",0x7481],
+ ["8EC1",0x7617],
+ ["8EC2",0x7F03],
+ ["8EC3",0x7F17],
+ ["8EC4",0x7F0C],
+ ["8EC5",0x7F0F],
+ ["8EC6",0x7F11],
+ ["8EC7",0x835C],
+ ["8EC8",0x848C],
+ ["8EC9",0x8311],
+ ["8ECA",0x82C1],
+ ["8ECB",0x8BF9],
+ ["8ECC",0x8BFC],
+ ["8ECD",0x8C02],
+ ["8ECE",0x8D55],
+ ["8ECF",0x90F8],
+ ["8ED0",0x9512],
+ ["8ED1",0x94D7],
+ ["8ED2",0x94FD],
+ ["8ED3",0x9513],
+ ["8ED4",0x950A],
+ ["8ED5",0x94E4],
+ ["8ED6",0x9506],
+ ["8ED7",0x9507],
+ ["8ED8",0x9514],
+ ["8ED9",0x9606],
+ ["8EDA",0x9603],
+ ["8EDB",0x9753],
+ ["8EDC",0x988F],
+ ["8EDD",0x997D],
+ ["8EDE",0x9A75],
+ ["8EDF",0x9A80],
+ ["8EE0",0x9C82],
+ ["8EE1",0x9E28],
+ ["8EE2",0x54D2],
+ ["8EE3",0x54D5],
+ ["8EE4",0x54D9],
+ ["8EE5",0x5AD2],
+ ["8EE6",0x5CC4],
+ ["8EE7",0x603F],
+ ["8EE8",0x6B9A],
+ ["8EE9",0x6D4D],
+ ["8EEA",0x70E8],
+ ["8EEB",0x7303],
+ ["8EEC",0x72EF],
+ ["8EED",0x789C],
+ ["8EEE",0x7AAD],
+ ["8EEF",0x7E17],
+ ["8EF0",0x7F1B],
+ ["8EF1",0x8487],
+ ["8EF2",0x8368],
+ ["8EF3",0x8489],
+ ["8EF4",0x835E],
+ ["8EF5",0x83B8],
+ ["8EF6",0x8297],
+ ["8EF7",0x86F3],
+ ["8EF8",0x8BE8],
+ ["8EF9",0x8C11],
+ ["8EFA",0x8C14],
+ ["8EFB",0x8C1D],
+ ["8EFC",0x90D0],
+ ["8EFD",0x9529],
+ ["8EFE",0x952C],
+ ["8F40",0x9516],
+ ["8F41",0x9517],
+ ["8F42",0x94FC],
+ ["8F43",0x951B],
+ ["8F44",0x9515],
+ ["8F45",0x951E],
+ ["8F46",0x9494],
+ ["8F47",0x960F],
+ ["8F48",0x9608],
+ ["8F49",0x9609],
+ ["8F4A",0x960A],
+ ["8F4B",0x960C],
+ ["8F4C",0x960D],
+ ["8F4D",0x9E32],
+ ["8F4E",0x9E31],
+ ["8F4F",0x54DC],
+ ["8F50",0x5E31],
+ ["8F51",0x6079],
+ ["8F52",0x6448],
+ ["8F53",0xE3C1],
+ ["8F54",0x6CF6],
+ ["8F55",0x7315],
+ ["8F56",0x7513],
+ ["8F57",0x7605],
+ ["8F58",0x75EB],
+ ["8F59",0x7857],
+ ["8F5A",0x7BA6],
+ ["8F5B",0x7B5A],
+ ["8F5C",0x7CE8],
+ ["8F5D",0x7F21],
+ ["8F5E",0x8027],
+ ["8F5F",0x835F],
+ ["8F60",0x83B6],
+ ["8F61",0x86F0],
+ ["8F62",0x88E2],
+ ["8F63",0x89CF],
+ ["8F64",0x8C21],
+ ["8F65",0x8BCC],
+ ["8F66",0x8C25],
+ ["8F67",0x8DC4],
+ ["8F68",0x9538],
+ ["8F69",0x9534],
+ ["8F6A",0x94E1],
+ ["8F6B",0x9536],
+ ["8F6C",0x9612],
+ ["8F6D",0x9967],
+ ["8F6E",0x9C92],
+ ["8F6F",0x9C95],
+ ["8F70",0x9E38],
+ ["8F71",0x9E39],
+ ["8F72",0x9E3A],
+ ["8F73",0x9F80],
+ ["8F74",0x603C],
+ ["8F75",0x6445],
+ ["8F76",0x64B8],
+ ["8F77",0x6CFA],
+ ["8F78",0x7596],
+ ["8F79",0x7F0B],
+ ["8F7A",0x8069],
+ ["8F7B",0x8369],
+ ["8F7C",0x87E5],
+ ["8F7D",0x866E],
+ ["8F7E",0x8BB4],
+ ["8FA1",0x8C29],
+ ["8FA2",0x8D5C],
+ ["8FA3",0x8D3D],
+ ["8FA4",0x8F98],
+ ["8FA5",0x909D],
+ ["8FA6",0x9553],
+ ["8FA7",0x94E0],
+ ["8FA8",0x953C],
+ ["8FA9",0x954F],
+ ["8FAA",0x84E5],
+ ["8FAB",0x97EA],
+ ["8FAC",0x9969],
+ ["8FAD",0x9A90],
+ ["8FAE",0x9A92],
+ ["8FAF",0x9A93],
+ ["8FB0",0x960B],
+ ["8FB1",0x9CA9],
+ ["8FB2",0x9CA0],
+ ["8FB3",0x9E48],
+ ["8FB4",0x9E41],
+ ["8FB5",0x9E46],
+ ["8FB6",0x53A3],
+ ["8FB7",0x5456],
+ ["8FB8",0x5786],
+ ["8FB9",0x69E0],
+ ["8FBA",0x680E],
+ ["8FBB",0x6C07],
+ ["8FBC",0x6CF7],
+ ["8FBD",0x6F46],
+ ["8FBE",0x7962],
+ ["8FBF",0x7F32],
+ ["8FC0",0x7F33],
+ ["8FC1",0x7F74],
+ ["8FC2",0x8223],
+ ["8FC3",0x86CF],
+ ["8FC4",0x867F],
+ ["8FC5",0x88E3],
+ ["8FC6",0x89D1],
+ ["8FC7",0x89EF],
+ ["8FC8",0x8C2E],
+ ["8FC9",0x955B],
+ ["8FCA",0x955F],
+ ["8FCB",0x956A],
+ ["8FCC",0x9546],
+ ["8FCD",0x94E9],
+ ["8FCE",0x97EB],
+ ["8FCF",0x98A1],
+ ["8FD0",0x9990],
+ ["8FD1",0x9AC2],
+ ["8FD2",0x9CB5],
+ ["8FD3",0x9CB6],
+ ["8FD4",0x9CBB],
+ ["8FD5",0x9CB1],
+ ["8FD6",0x9E4E],
+ ["8FD7",0x9E2B],
+ ["8FD8",0x9EFC],
+ ["8FD9",0x55BE],
+ ["8FDA",0x6484],
+ ["8FDB",0x680A],
+ ["8FDC",0x67A5],
+ ["8FDD",0x680C],
+ ["8FDE",0x7F31],
+ ["8FDF",0x804D],
+ ["8FE0",0x830F],
+ ["8FE1",0x82C8],
+ ["8FE2",0x8572],
+ ["8FE3",0x86F4],
+ ["8FE4",0x877E],
+ ["8FE5",0x94F4],
+ ["8FE6",0x9566],
+ ["8FE7",0x9568],
+ ["8FE8",0x9561],
+ ["8FE9",0x9563],
+ ["8FEA",0x9544],
+ ["8FEB",0x956B],
+ ["8FEC",0x94E7],
+ ["8FED",0x9564],
+ ["8FEE",0x94F9],
+ ["8FEF",0x961A],
+ ["8FF0",0x989F],
+ ["8FF1",0x9994],
+ ["8FF2",0x9A7A],
+ ["8FF3",0x9A9D],
+ ["8FF4",0x9A9F],
+ ["8FF5",0x9A98],
+ ["8FF6",0x9E57],
+ ["8FF7",0x9E5A],
+ ["8FF8",0x9E5C],
+ ["8FF9",0x9F86],
+ ["8FFA",0x9F85],
+ ["8FFB",0x50A9],
+ ["8FFC",0x5CBF],
+ ["8FFD",0x75C8],
+ ["8FFE",0x64BA],
+ ["9040",0x6989],
+ ["9041",0x6EE0],
+ ["9042",0x783B],
+ ["9043",0x7C9D],
+ ["9044",0x7EA9],
+ ["9045",0x7F2C],
+ ["9046",0x8539],
+ ["9047",0x8D46],
+ ["9048",0x9571],
+ ["9049",0x95FC],
+ ["904A",0x98D9],
+ ["904B",0x9AA2],
+ ["904C",0x9A96],
+ ["904D",0x9A9C],
+ ["904E",0x9CA5],
+ ["904F",0x9CCE],
+ ["9050",0x9CD0],
+ ["9051",0x9E63],
+ ["9052",0x9E58],
+ ["9053",0x9E7E],
+ ["9054",0x5181],
+ ["9055",0x5A08],
+ ["9056",0x7055],
+ ["9057",0x6512],
+ ["9058",0x763F],
+ ["9059",0x7BA8],
+ ["905A",0x7C74],
+ ["905B",0x823B],
+ ["905C",0x89CC],
+ ["905D",0x8DF9],
+ ["905E",0x8DDE],
+ ["905F",0x8F79],
+ ["9060",0x9554],
+ ["9061",0x956C],
+ ["9062",0x9AA3],
+ ["9063",0x9A85],
+ ["9064",0x9CD5],
+ ["9065",0x9CA3],
+ ["9066",0x9CA6],
+ ["9067",0x9E68],
+ ["9068",0x9E37],
+ ["9069",0x9F9B],
+ ["906A",0x683E],
+ ["906B",0x6924],
+ ["906C",0x84E0],
+ ["906D",0x96E0],
+ ["906E",0x8F73],
+ ["906F",0x9CDF],
+ ["9070",0x9C9F],
+ ["9071",0x9E69],
+ ["9072",0x9E6C],
+ ["9073",0x9E6A],
+ ["9074",0x9E6B],
+ ["9075",0x9E47],
+ ["9076",0x704F],
+ ["9077",0x7C16],
+ ["9078",0x8C30],
+ ["9079",0x9ACC],
+ ["907A",0x7B3E],
+ ["907B",0x7C9C],
+ ["907C",0x7F35],
+ ["907D",0x8114],
+ ["907E",0x8E7F],
+ ["90A1",0x9567],
+ ["90A2",0x9C9A],
+ ["90A3",0x8DB1],
+ ["90A4",0x8E9C],
+ ["90A5",0x917E],
+ ["90A6",0x8C33],
+ ["90A7",0x989E],
+ ["90A8",0x98A7],
+ ["90A9",0x9AA7],
+ ["90AA",0x9E2C],
+ ["90AB",0x6206],
+ ["90AC",0x9604],
+ ["90AD",0x9CA1],
+ ["90AE",0x9E42],
+ ["90AF",0x79B8],
+ ["90B0",0x62D4],
+ ["90B1",0x8DCB],
+ ["90B2",0x73D0],
+ ["90B3",0x5BAB],
+ ["90B4",0x62D0],
+ ["90B5",0x6BC1],
+ ["90B6",0x51CF],
+ ["90B7",0x7984],
+ ["90B8",0x5415],
+ ["90B9",0x6F5C],
+ ["90BA",0x889C],
+ ["90BB",0x90E7],
+ ["90BC",0x5179],
+ ["90BD",0x6238],
+ ["90BE",0x629B],
+ ["90BF",0x6327],
+ ["90C0",0x63BB],
+ ["90C1",0x63DE],
+ ["90C2",0x63FA],
+ ["90C3",0x6491],
+ ["90C4",0x64C0],
+ ["90C5",0x64E1],
+ ["90C6",0x64F6],
+ ["90C7",0x6505],
+ ["90C8",0x6535],
+ ["90C9",0x654E],
+ ["90CA",0x656B],
+ ["90CB",0x6588],
+ ["90CC",0x65D9],
+ ["90CD",0x661E],
+ ["90CE",0x663B],
+ ["90CF",0x663F],
+ ["90D0",0x6644],
+ ["90D1",0x6657],
+ ["90D2",0x6669],
+ ["90D3",0x6673],
+ ["90D4",0x6683],
+ ["90D5",0x66BC],
+ ["90D6",0x66BF],
+ ["90D7",0x66C1],
+ ["90D8",0x66F5],
+ ["90D9",0x66FA],
+ ["90DA",0x66FB],
+ ["90DB",0x670E],
+ ["90DC",0x6716],
+ ["90DD",0x6737],
+ ["90DE",0x6764],
+ ["90DF",0x6766],
+ ["90E0",0x67A6],
+ ["90E1",0x67A7],
+ ["90E2",0x67A9],
+ ["90E3",0x67FB],
+ ["90E4",0x67FD],
+ ["90E5",0x6800],
+ ["90E6",0x6801],
+ ["90E7",0x6805],
+ ["90E8",0x681E],
+ ["90E9",0x684A],
+ ["90EA",0x6852],
+ ["90EB",0x6855],
+ ["90EC",0x6859],
+ ["90ED",0x688D],
+ ["90EE",0x68B9],
+ ["90EF",0x68CF],
+ ["90F0",0x5088],
+ ["90F1",0x9528],
+ ["90F2",0x9C97],
+ ["90F3",0x6922],
+ ["90F4",0x6926],
+ ["90F5",0x00DC],
+ ["90F6",0xE4DF],
+ ["90F7",0xE4E0],
+ ["90F8",0x00FC],
+ ["90F9",0xE4E2],
+ ["90FA",0xE4E3],
+ ["90FB",0x00DC],
+ ["90FC",0x00FC],
+ ["90FD",0x6936],
+ ["90FE",0x6961],
+ ["9140",0x82C5],
+ ["9141",0x82CA],
+ ["9142",0x82D8],
+ ["9143",0x8318],
+ ["9144",0x831A],
+ ["9145",0x8323],
+ ["9146",0x8346],
+ ["9147",0x835B],
+ ["9148",0x8362],
+ ["9149",0x836C],
+ ["914A",0x836E],
+ ["914B",0x839C],
+ ["914C",0x839F],
+ ["914D",0x83B5],
+ ["914E",0x83BC],
+ ["914F",0x83F7],
+ ["9150",0x842A],
+ ["9151",0x8448],
+ ["9152",0x845C],
+ ["9153",0x8462],
+ ["9154",0x8484],
+ ["9155",0x8488],
+ ["9156",0x84DC],
+ ["9157",0x84E3],
+ ["9158",0x8538],
+ ["9159",0x855A],
+ ["915A",0x8597],
+ ["915B",0x85AB],
+ ["915C",0x85C1],
+ ["915D",0x8613],
+ ["915E",0x8616],
+ ["915F",0x220B],
+ ["9160",0x8715],
+ ["9161",0x8770],
+ ["9162",0x877D],
+ ["9163",0x878B],
+ ["9164",0x87A8],
+ ["9165",0x87C7],
+ ["9166",0x87D0],
+ ["9167",0x8807],
+ ["9168",0x880E],
+ ["9169",0x8827],
+ ["916A",0x88AE],
+ ["916B",0x2208],
+ ["916C",0x88B5],
+ ["916D",0x88BF],
+ ["916E",0x88E5],
+ ["916F",0x88F5],
+ ["9170",0x891C],
+ ["9171",0x891D],
+ ["9172",0x8977],
+ ["9173",0x89E7],
+ ["9174",0x8A37],
+ ["9175",0x8AAC],
+ ["9176",0x8ADA],
+ ["9177",0x8B5B],
+ ["9178",0x8B71],
+ ["9179",0x8C2B],
+ ["917A",0x8C3A],
+ ["917B",0x8C7C],
+ ["917C",0x8C8E],
+ ["917D",0x8CAE],
+ ["917E",0x8D12],
+ ["91A1",0x8D49],
+ ["91A2",0x8D4D],
+ ["91A3",0x8D71],
+ ["91A4",0x8E08],
+ ["91A5",0x8E3A],
+ ["91A6",0x8E70],
+ ["91A7",0x8E99],
+ ["91A8",0x8EB0],
+ ["91A9",0x8EB1],
+ ["91AA",0x8EC5],
+ ["91AB",0x8EC6],
+ ["91AC",0x8ECE],
+ ["91AD",0x8EE3],
+ ["91AE",0x8F0C],
+ ["91AF",0x8F71],
+ ["91B0",0x8F77],
+ ["91B1",0x8FA7],
+ ["91B2",0x8FEF],
+ ["91B3",0x900E],
+ ["91B4",0x9039],
+ ["91B5",0x9065],
+ ["91B6",0x9089],
+ ["91B7",0x90DE],
+ ["91B8",0x9115],
+ ["91B9",0x91D6],
+ ["91BA",0x91DB],
+ ["91BB",0x91DE],
+ ["91BC",0x91E1],
+ ["91BD",0x91E5],
+ ["91BE",0x91F6],
+ ["91BF",0x91FC],
+ ["91C0",0x9229],
+ ["91C1",0x922C],
+ ["91C2",0xFF07],
+ ["91C3",0x9259],
+ ["91C4",0x9277],
+ ["91C5",0x92ED],
+ ["91C6",0x933A],
+ ["91C7",0xE54D],
+ ["91C8",0xE54E],
+ ["91C9",0x722B],
+ ["91CA",0x5182],
+ ["91CB",0x5196],
+ ["91CC",0x4E37],
+ ["91CD",0x516B],
+ ["91CE",0x513F],
+ ["91CF",0xE555],
+ ["91D0",0xE556],
+ ["91D1",0x6729],
+ ["91D2",0x6C3A],
+ ["91D3",0x5382],
+ ["91D4",0x7592],
+ ["91D5",0x8080],
+ ["91D6",0x8864],
+ ["91D7",0x4E06],
+ ["91D8",0xE55E],
+ ["91D9",0xE55F],
+ ["91DA",0xE560],
+ ["91DB",0x2E97],
+ ["91DC",0x52F9],
+ ["91DD",0x5315],
+ ["91DE",0x2021],
+ ["91DF",0xE565],
+ ["91E0",0x3404],
+ ["91E1",0xE567],
+ ["91E2",0xE568],
+ ["91E3",0xE569],
+ ["91E4",0xE56A],
+ ["91E5",0xE56B],
+ ["91E6",0x51F5],
+ ["91E7",0xE56D],
+ ["91E8",0x5C6E],
+ ["91E9",0xE56F],
+ ["91EA",0x56D7],
+ ["91EB",0x4EA0],
+ ["91EC",0x51AB],
+ ["91ED",0x2E80],
+ ["91EE",0x69C7],
+ ["91EF",0xE575],
+ ["91F0",0x254E],
+ ["91F1",0x25D8],
+ ["91F2",0x25D9],
+ ["91F3",0x2642],
+ ["91F4",0x25B6],
+ ["91F5",0x25C4],
+ ["91F6",0x2195],
+ ["91F7",0x203C],
+ ["91F8",0x00B6],
+ ["91F9",0x2200],
+ ["91FA",0x21A8],
+ ["91FB",0x2194],
+ ["91FC",0x2302],
+ ["91FD",0xE583],
+ ["91FE",0xE584],
+ ["9240",0x4E9C],
+ ["9241",0x60AA],
+ ["9242",0x5727],
+ ["9243",0x56F2],
+ ["9244",0x533B],
+ ["9245",0x58F1],
+ ["9246",0x9038],
+ ["9247",0x96A0],
+ ["9248",0x6804],
+ ["9249",0x55B6],
+ ["924A",0x99C5],
+ ["924B",0x8B01],
+ ["924C",0x5186],
+ ["924D",0x7E01],
+ ["924E",0x5FDC],
+ ["924F",0x6B27],
+ ["9250",0x6BB4],
+ ["9251",0x685C],
+ ["9252",0x5965],
+ ["9253",0x7A4F],
+ ["9254",0x4EEE],
+ ["9255",0x4FA1],
+ ["9256",0x753B],
+ ["9257",0x7070],
+ ["9258",0x4F1A],
+ ["9259",0x6094],
+ ["925A",0x6D77],
+ ["925B",0x7D75],
+ ["925C",0x58CA],
+ ["925D",0x61D0],
+ ["925E",0x62E1],
+ ["925F",0x6BBB],
+ ["9260",0x899A],
+ ["9261",0x5B66],
+ ["9262",0x697D],
+ ["9263",0x559D],
+ ["9264",0x6E07],
+ ["9265",0xE5AA],
+ ["9266",0x5DFB],
+ ["9267",0x9665],
+ ["9268",0x52E7],
+ ["9269",0x5BDB],
+ ["926A",0x6F22],
+ ["926B",0x95A2],
+ ["926C",0x6B53],
+ ["926D",0x89B3],
+ ["926E",0x6C17],
+ ["926F",0x5E30],
+ ["9270",0x622F],
+ ["9271",0x72A0],
+ ["9272",0x8650],
+ ["9273",0x65E7],
+ ["9274",0x6025],
+ ["9275",0x62E0],
+ ["9276",0x6319],
+ ["9277",0x865A],
+ ["9278",0x5CE1],
+ ["9279",0x631F],
+ ["927A",0x72ED],
+ ["927B",0x90F7],
+ ["927C",0x97FF],
+ ["927D",0x6681],
+ ["927E",0x52E4],
+ ["92A1",0x8B39],
+ ["92A2",0x533A],
+ ["92A3",0x99C6],
+ ["92A4",0x52F2],
+ ["92A5",0xE5C8],
+ ["92A6",0x5F84],
+ ["92A7",0x830E],
+ ["92A8",0x6075],
+ ["92A9",0x63B2],
+ ["92AA",0x6E13],
+ ["92AB",0x7D4C],
+ ["92AC",0x86CD],
+ ["92AD",0x8EFD],
+ ["92AE",0x7D99],
+ ["92AF",0x9D8F],
+ ["92B0",0x6483],
+ ["92B1",0x770C],
+ ["92B2",0x5039],
+ ["92B3",0x5263],
+ ["92B4",0x967A],
+ ["92B5",0x570F],
+ ["92B6",0x691C],
+ ["92B7",0x6A29],
+ ["92B8",0x9855],
+ ["92B9",0x9A13],
+ ["92BA",0x53B3],
+ ["92BB",0x5449],
+ ["92BC",0x5A2F],
+ ["92BD",0x8AA4],
+ ["92BE",0x5E83],
+ ["92BF",0x6E2F],
+ ["92C0",0x9271],
+ ["92C1",0x53F7],
+ ["92C2",0x56FD],
+ ["92C3",0x9ED2],
+ ["92C4",0x7A40],
+ ["92C5",0x7815],
+ ["92C6",0x6E08],
+ ["92C7",0x658E],
+ ["92C8",0x6B73],
+ ["92C9",0x5264],
+ ["92CA",0x96D1],
+ ["92CB",0x53C2],
+ ["92CC",0x685F],
+ ["92CD",0x60E8],
+ ["92CE",0x8CDB],
+ ["92CF",0x6B8B],
+ ["92D0",0x6B6F],
+ ["92D1",0x5150],
+ ["92D2",0x8F9E],
+ ["92D3",0x6E7F],
+ ["92D4",0x5B9F],
+ ["92D5",0x5199],
+ ["92D6",0x820E],
+ ["92D7",0x6368],
+ ["92D8",0x91C8],
+ ["92D9",0x5BFF],
+ ["92DA",0x53CE],
+ ["92DB",0x8846],
+ ["92DC",0x5F93],
+ ["92DD",0x6E0B],
+ ["92DE",0x7363],
+ ["92DF",0x7E26],
+ ["92E0",0x7C9B],
+ ["92E1",0x51E6],
+ ["92E2",0x5C06],
+ ["92E3",0x79F0],
+ ["92E4",0x6E09],
+ ["92E5",0x713C],
+ ["92E6",0x5968],
+ ["92E7",0x6761],
+ ["92E8",0x72B6],
+ ["92E9",0x4E57],
+ ["92EA",0x6D44],
+ ["92EB",0x5270],
+ ["92EC",0x7573],
+ ["92ED",0x7E04],
+ ["92EE",0x58CC],
+ ["92EF",0x5B22],
+ ["92F0",0x8B72],
+ ["92F1",0x91B8],
+ ["92F2",0x89E6],
+ ["92F3",0x5631],
+ ["92F4",0x5BDD],
+ ["92F5",0x5C3D],
+ ["92F6",0x56F3],
+ ["92F7",0x7C8B],
+ ["92F8",0x9154],
+ ["92F9",0x7A42],
+ ["92FA",0x968F],
+ ["92FB",0x9AC4],
+ ["92FC",0x67A2],
+ ["92FD",0x6570],
+ ["92FE",0x636E],
+ ["9340",0x702C],
+ ["9341",0x58F0],
+ ["9342",0x6589],
+ ["9343",0x9759],
+ ["9344",0x7A83],
+ ["9345",0x6442],
+ ["9346",0x7D76],
+ ["9347",0x5C02],
+ ["9348",0x6D45],
+ ["9349",0x6226],
+ ["934A",0x8DF5],
+ ["934B",0x92AD],
+ ["934C",0x6F5C],
+ ["934D",0x9077],
+ ["934E",0x9078],
+ ["934F",0x7E4A],
+ ["9350",0x7985],
+ ["9351",0x758E],
+ ["9352",0x58EE],
+ ["9353",0x4E89],
+ ["9354",0x8358],
+ ["9355",0x635C],
+ ["9356",0x633F],
+ ["9357",0x5DE3],
+ ["9358",0x7A93],
+ ["9359",0x88C5],
+ ["935A",0x50E7],
+ ["935B",0x5C64],
+ ["935C",0x7DCF],
+ ["935D",0x9A12],
+ ["935E",0x5897],
+ ["935F",0x618E],
+ ["9360",0x8535],
+ ["9361",0x8D08],
+ ["9362",0x81D3],
+ ["9363",0x5C5E],
+ ["9364",0x7D9A],
+ ["9365",0x5815],
+ ["9366",0x5BFE],
+ ["9367",0x5E2F],
+ ["9368",0x6EDE],
+ ["9369",0x6EDD],
+ ["936A",0x629E],
+ ["936B",0x6CA2],
+ ["936C",0x6FEF],
+ ["936D",0x5358],
+ ["936E",0x5606],
+ ["936F",0x56E3],
+ ["9370",0x65AD],
+ ["9371",0x5F3E],
+ ["9372",0x9045],
+ ["9373",0x663C],
+ ["9374",0x92F3],
+ ["9375",0x5E81],
+ ["9376",0x5FB4],
+ ["9377",0x8074],
+ ["9378",0x61F2],
+ ["9379",0x585A],
+ ["937A",0x9013],
+ ["937B",0x9244],
+ ["937C",0x70B9],
+ ["937D",0x8EE2],
+ ["937E",0x4F1D],
+ ["93A1",0x96FB],
+ ["93A2",0x706F],
+ ["93A3",0x5F53],
+ ["93A4",0x515A],
+ ["93A5",0x76D7],
+ ["93A6",0x7A32],
+ ["93A7",0x95D8],
+ ["93A8",0x5FB3],
+ ["93A9",0x6BD2],
+ ["93AA",0x72EC],
+ ["93AB",0x8AAD],
+ ["93AC",0x5C4A],
+ ["93AD",0x96E3],
+ ["93AE",0x5F10],
+ ["93AF",0x60A9],
+ ["93B0",0x8133],
+ ["93B1",0x62DD],
+ ["93B2",0x5EC3],
+ ["93B3",0x58F2],
+ ["93B4",0x6885],
+ ["93B5",0x535A],
+ ["93B6",0x8584],
+ ["93B7",0x9EA6],
+ ["93B8",0x7E1B],
+ ["93B9",0x767A],
+ ["93BA",0x9AEA],
+ ["93BB",0x629C],
+ ["93BC",0x6D5C],
+ ["93BD",0x6D5C],
+ ["93BE",0x654F],
+ ["93BF",0x6577],
+ ["93C0",0x4FAE],
+ ["93C1",0x6255],
+ ["93C2",0x4ECF],
+ ["93C3",0x8FBA],
+ ["93C4",0x5909],
+ ["93C5",0x6B69],
+ ["93C6",0x8217],
+ ["93C7",0x7C3F],
+ ["93C8",0x5305],
+ ["93C9",0x5B9D],
+ ["93CA",0x62B1],
+ ["93CB",0x6CE1],
+ ["93CC",0x80DE],
+ ["93CD",0x7832],
+ ["93CE",0x8C4A],
+ ["93CF",0x98FD],
+ ["93D0",0x58A8],
+ ["93D1",0x6BCE],
+ ["93D2",0x6E80],
+ ["93D3",0x8108],
+ ["93D4",0x9ED9],
+ ["93D5",0x8A33],
+ ["93D6",0x85AC],
+ ["93D7",0x8E8D],
+ ["93D8",0x4E0E],
+ ["93D9",0x8A89],
+ ["93DA",0x6447],
+ ["93DB",0x69D8],
+ ["93DC",0x8B21],
+ ["93DD",0x66DC],
+ ["93DE",0x6765],
+ ["93DF",0x983C],
+ ["93E0",0x4E71],
+ ["93E1",0x89A7],
+ ["93E2",0x7ADC],
+ ["93E3",0x9686],
+ ["93E4",0x65C5],
+ ["93E5",0x4E21],
+ ["93E6",0x731F],
+ ["93E7",0x7DD1],
+ ["93E8",0x6D99],
+ ["93E9",0x5841],
+ ["93EA",0x793C],
+ ["93EB",0x52B1],
+ ["93EC",0x623B],
+ ["93ED",0x970A],
+ ["93EE",0x9F62],
+ ["93EF",0x66A6],
+ ["93F0",0x6B74],
+ ["93F1",0x604B],
+ ["93F2",0x7DF4],
+ ["93F3",0x932C],
+ ["93F4",0x7089],
+ ["93F5",0x52B4],
+ ["93F6",0x697C],
+ ["93F7",0x9332],
+ ["93F8",0x6E7E],
+ ["93F9",0x5F25],
+ ["93FA",0x4E80],
+ ["93FB",0x66FD],
+ ["93FC",0x59C9],
+ ["93FD",0x5B8D],
+ ["93FE",0x5D8B],
+ ["9440",0x6A2B],
+ ["9441",0x691B],
+ ["9442",0x55B0],
+ ["9443",0x7C82],
+ ["9444",0x8FBC],
+ ["9445",0x698A],
+ ["9446",0x54B2],
+ ["9447",0x9D2B],
+ ["9448",0x96EB],
+ ["9449",0x6919],
+ ["944A",0x63C3],
+ ["944B",0x99C4],
+ ["944C",0x51E7],
+ ["944D",0x6802],
+ ["944E",0x8FBB],
+ ["944F",0x50CD],
+ ["9450",0x5CE0],
+ ["9451",0x6803],
+ ["9452",0x51EA],
+ ["9453",0x5302],
+ ["9454",0x7872],
+ ["9455",0x7551],
+ ["9456",0x7560],
+ ["9457",0x567A],
+ ["9458",0x92F2],
+ ["9459",0x5840],
+ ["945A",0x67FE],
+ ["945B",0x4FE3],
+ ["945C",0x6762],
+ ["945D",0x7C7E],
+ ["945E",0x5301],
+ ["945F",0x4FE4],
+ ["9460",0x4FE5],
+ ["9461",0x51E9],
+ ["9462",0x53FA],
+ ["9463",0x54D8],
+ ["9464",0x56CE],
+ ["9465",0x5726],
+ ["9466",0x5737],
+ ["9467",0x5738],
+ ["9468",0x5788],
+ ["9469",0x57B3],
+ ["946A",0x57AA],
+ ["946B",0x57B0],
+ ["946C",0x57D6],
+ ["946D",0x5870],
+ ["946E",0x58B9],
+ ["946F",0x58D7],
+ ["9470",0x5C76],
+ ["9471",0x5CBC],
+ ["9472",0x5CC5],
+ ["9473",0x5CBE],
+ ["9474",0x5D76],
+ ["9475",0x5F16],
+ ["9476",0x603A],
+ ["9477",0x63B5],
+ ["9478",0x6741],
+ ["9479",0x6763],
+ ["947A",0x67A1],
+ ["947B",0x68BA],
+ ["947C",0x6925],
+ ["947D",0x6928],
+ ["947E",0x6A7A],
+ ["94A1",0x6923],
+ ["94A2",0x6921],
+ ["94A3",0x697E],
+ ["94A4",0x6981],
+ ["94A5",0x69DD],
+ ["94A6",0x6A2E],
+ ["94A7",0x6A72],
+ ["94A8",0x6B1F],
+ ["94A9",0x6BDF],
+ ["94AA",0x6E15],
+ ["94AB",0x7195],
+ ["94AC",0x74E7],
+ ["94AD",0x74F2],
+ ["94AE",0x74F0],
+ ["94AF",0x74F1],
+ ["94B0",0x74F8],
+ ["94B1",0x7505],
+ ["94B2",0x7569],
+ ["94B3",0x766A],
+ ["94B4",0x7874],
+ ["94B5",0x7ACD],
+ ["94B6",0x7ACF],
+ ["94B7",0x7AD5],
+ ["94B8",0x7AD3],
+ ["94B9",0x7AE1],
+ ["94BA",0x7AF0],
+ ["94BB",0x7B02],
+ ["94BC",0x7C13],
+ ["94BD",0x7C17],
+ ["94BE",0x7C90],
+ ["94BF",0x7CAD],
+ ["94C0",0x7CC0],
+ ["94C1",0x7CD8],
+ ["94C2",0x7D9B],
+ ["94C3",0x7E05],
+ ["94C4",0x7E67],
+ ["94C5",0x7E83],
+ ["94C6",0x7E90],
+ ["94C7",0x81A4],
+ ["94C8",0x825D],
+ ["94C9",0x8422],
+ ["94CA",0x84D9],
+ ["94CB",0x8630],
+ ["94CC",0x86AB],
+ ["94CD",0x86EF],
+ ["94CE",0x88B0],
+ ["94CF",0x88C3],
+ ["94D0",0x88C4],
+ ["94D1",0x8904],
+ ["94D2",0xE72F],
+ ["94D3",0x8EBE],
+ ["94D4",0x8EC8],
+ ["94D5",0x8F4C],
+ ["94D6",0x8FB7],
+ ["94D7",0x8FDA],
+ ["94D8",0x9027],
+ ["94D9",0x9056],
+ ["94DA",0x9335],
+ ["94DB",0x933B],
+ ["94DC",0x93B9],
+ ["94DD",0x958A],
+ ["94DE",0x9596],
+ ["94DF",0x9779],
+ ["94E0",0x9786],
+ ["94E1",0x9790],
+ ["94E2",0x98AA],
+ ["94E3",0x9B96],
+ ["94E4",0x9B97],
+ ["94E5",0x9BB4],
+ ["94E6",0x9BCF],
+ ["94E7",0x9BD1],
+ ["94E8",0x9BD2],
+ ["94E9",0x9BF2],
+ ["94EA",0x9BF1],
+ ["94EB",0x9C30],
+ ["94EC",0x9C47],
+ ["94ED",0x9C5A],
+ ["94EE",0x9CF0],
+ ["94EF",0x9D46],
+ ["94F0",0x9D64],
+ ["94F1",0x9DAB],
+ ["94F2",0x4E44],
+ ["94F3",0x544F],
+ ["94F4",0x6318],
+ ["94F5",0x9BB1],
+ ["94F6",0x9C69],
+ ["94F7",0x9D47],
+ ["94F8",0x9D65],
+ ["94F9",0x9C2F],
+ ["94FA",0x9EBF],
+ ["94FB",0x51B4],
+ ["94FC",0x546A],
+ ["94FD",0x67A0],
+ ["94FE",0x9B8E],
+ ["9540",0x90A8],
+ ["9541",0x51B2],
+ ["9542",0x362D],
+ ["9543",0x62C5],
+ ["9544",0x52C5],
+ ["9545",0x67B1],
+ ["9546",0x54CD],
+ ["9547",0x6052],
+ ["9548",0x53C1],
+ ["9549",0x70F1],
+ ["954A",0x5803],
+ ["954B",0x555F],
+ ["954C",0x920E],
+ ["954D",0x7740],
+ ["954E",0x743C],
+ ["954F",0x714A],
+ ["9550",0x6ED9],
+ ["9551",0x53E0],
+ ["9552",0x732E],
+ ["9553",0x88CF],
+ ["9554",0x788D],
+ ["9555",0x7FA3],
+ ["9556",0x7DAB],
+ ["9557",0x8E2A],
+ ["9558",0x945B],
+ ["9559",0x636C],
+ ["955A",0x5FA7],
+ ["955B",0x5C05],
+ ["955C",0x803B],
+ ["955D",0x5CEF],
+ ["955E",0x39B8],
+ ["955F",0x7151],
+ ["9560",0x8CCD],
+ ["9561",0x97EE],
+ ["9562",0x5872],
+ ["9563",0x5A63],
+ ["9564",0x7F78],
+ ["9565",0x5D57],
+ ["9566",0x616F],
+ ["9567",0x6998],
+ ["9568",0x7D89],
+ ["9569",0x7CAE],
+ ["956A",0x7DB3],
+ ["956B",0x6F81],
+ ["956C",0x5AFA],
+ ["956D",0x58BB],
+ ["956E",0x7255],
+ ["956F",0x764E],
+ ["9570",0x8F2D],
+ ["9571",0x92B9],
+ ["9572",0x9D5E],
+ ["9573",0x9EAF],
+ ["9574",0x7F47],
+ ["9575",0x9DC4],
+ ["9576",0x8D18],
+ ["9577",0x51B3],
+ ["9578",0x866C],
+ ["9579",0x54A4],
+ ["957A",0x53A6],
+ ["957B",0x5226],
+ ["957C",0x6736],
+ ["957D",0x4E21],
+ ["957E",0x5374],
+ ["95A1",0x5EF9],
+ ["95A2",0x52B9],
+ ["95A3",0x548F],
+ ["95A4",0x5EF8],
+ ["95A5",0x59AC],
+ ["95A6",0x6031],
+ ["95A7",0x7240],
+ ["95A8",0x8117],
+ ["95A9",0x763B],
+ ["95AA",0x5F0D],
+ ["95AB",0x664B],
+ ["95AC",0x66A8],
+ ["95AD",0x6164],
+ ["95AE",0x634F],
+ ["95AF",0x70DF],
+ ["95B0",0x6D24],
+ ["95B1",0x7CA7],
+ ["95B2",0x7CC9],
+ ["95B3",0x53D9],
+ ["95B4",0x654D],
+ ["95B5",0x5742],
+ ["95B6",0x73CF],
+ ["95B7",0x80C6],
+ ["95B8",0x3551],
+ ["95B9",0x6B35],
+ ["95BA",0x7881],
+ ["95BB",0x53CC],
+ ["95BC",0x732B],
+ ["95BD",0x732A],
+ ["95BE",0x73C9],
+ ["95BF",0x754A],
+ ["95C0",0x59F9],
+ ["95C1",0x71C4],
+ ["95C2",0x750E],
+ ["95C3",0x7DDC],
+ ["95C4",0x99E1],
+ ["95C5",0x89A9],
+ ["95C6",0x6FF6],
+ ["95C7",0x3A57],
+ ["95C8",0x64EA],
+ ["95C9",0x3BED],
+ ["95CA",0x6CA1],
+ ["95CB",0x6E7C],
+ ["95CC",0x7567],
+ ["95CD",0x5869],
+ ["95CE",0x5869],
+ ["95CF",0x5204],
+ ["95D0",0xE7CA],
+ ["95D1",0x6187],
+ ["95D2",0x643A],
+ ["95D3",0x81EF],
+ ["95D4",0xE7CE],
+ ["95D5",0x51B5],
+ ["95D6",0x51D1],
+ ["95D7",0x6C79],
+ ["95D8",0x591F],
+ ["95D9",0x8FF9],
+ ["95DA",0x98F1],
+ ["95DB",0x6537],
+ ["95DC",0x8109],
+ ["95DD",0x88B4],
+ ["95DE",0x3A2A],
+ ["95DF",0x8EAD],
+ ["95E0",0x7F97],
+ ["95E1",0x9A10],
+ ["95E2",0x7D25],
+ ["95E3",0x6AC8],
+ ["95E4",0x518C],
+ ["95E5",0x5227],
+ ["95E6",0xE7E0],
+ ["95E7",0x811A],
+ ["95E8",0x53A0],
+ ["95E9",0x53A2],
+ ["95EA",0x6C5A],
+ ["95EB",0x6C37],
+ ["95EC",0x8218],
+ ["95ED",0x5586],
+ ["95EE",0x5EFB],
+ ["95EF",0x51C9],
+ ["95F0",0x78B1],
+ ["95F1",0x9262],
+ ["95F2",0x536D],
+ ["95F3",0x51C3],
+ ["95F4",0xE7EE],
+ ["95F5",0x8471],
+ ["95F6",0x8987],
+ ["95F7",0x976D],
+ ["95F8",0x8B90],
+ ["95F9",0x96A3],
+ ["95FA",0x5EFC],
+ ["95FB",0x96B7],
+ ["95FC",0x514E],
+ ["95FD",0x9C10],
+ ["95FE",0x6630],
+ ["9640",0x9255],
+ ["9641",0x7808],
+ ["9642",0x9345],
+ ["9643",0x9273],
+ ["9644",0x9369],
+ ["9645",0xE7FE],
+ ["9646",0xE7FF],
+ ["9647",0xE800],
+ ["9648",0xE801],
+ ["9649",0x91DF],
+ ["964A",0x91DA],
+ ["964B",0x7854],
+ ["964C",0x7866],
+ ["964D",0x7888],
+ ["964E",0x78B6],
+ ["964F",0x78C7],
+ ["9650",0x78D2],
+ ["9651",0x78D7],
+ ["9652",0x212B],
+ ["9653",0x21CB],
+ ["9654",0x78E4],
+ ["9655",0x78EE],
+ ["9656",0x78F0],
+ ["9657",0x78F1],
+ ["9658",0x78F5],
+ ["9659",0x7932],
+ ["965A",0x7933],
+ ["965B",0x7936],
+ ["965C",0x7958],
+ ["965D",0x3013],
+ ["965E",0x7959],
+ ["965F",0x7971],
+ ["9660",0x797E],
+ ["9661",0x7983],
+ ["9662",0x7986],
+ ["9663",0x7987],
+ ["9664",0x7991],
+ ["9665",0x7999],
+ ["9666",0x799F],
+ ["9667",0x79A5],
+ ["9668",0x79E2],
+ ["9669",0x79F1],
+ ["966A",0x79F4],
+ ["966B",0x7A2A],
+ ["966C",0x7A3A],
+ ["966D",0x7A45],
+ ["966E",0x7A65],
+ ["966F",0x7ABC],
+ ["9670",0x7AC2],
+ ["9671",0x7AC9],
+ ["9672",0x7ADB],
+ ["9673",0x7AE9],
+ ["9674",0x7AFE],
+ ["9675",0x7B0C],
+ ["9676",0x7B27],
+ ["9677",0x7B29],
+ ["9678",0x7B42],
+ ["9679",0x7B43],
+ ["967A",0x7B55],
+ ["967B",0x7B6F],
+ ["967C",0x7BB2],
+ ["967D",0x69DE],
+ ["967E",0x69F9],
+ ["96A1",0x9176],
+ ["96A2",0x815A],
+ ["96A3",0x82F7],
+ ["96A4",0x544B],
+ ["96A5",0x8132],
+ ["96A6",0x80BD],
+ ["96A7",0x8418],
+ ["96A8",0x915E],
+ ["96A9",0x9170],
+ ["96AA",0x918C],
+ ["96AB",0x8148],
+ ["96AC",0xE843],
+ ["96AD",0x4436],
+ ["96AE",0x8159],
+ ["96AF",0x809F],
+ ["96B0",0xE847],
+ ["96B1",0x5549],
+ ["96B2",0x5421],
+ ["96B3",0x54DA],
+ ["96B4",0x5432],
+ ["96B5",0x55B9],
+ ["96B6",0x5494],
+ ["96B7",0xE84E],
+ ["96B8",0x7852],
+ ["96B9",0x7845],
+ ["96BA",0x784C],
+ ["96BB",0xE852],
+ ["96BC",0x84BD],
+ ["96BD",0x841C],
+ ["96BE",0x82C4],
+ ["96BF",0xE856],
+ ["96C0",0x847B],
+ ["96C1",0x8B2D],
+ ["96C2",0xE859],
+ ["96C3",0x574B],
+ ["96C4",0xE85B],
+ ["96C5",0xE85C],
+ ["96C6",0x5745],
+ ["96C7",0x87CE],
+ ["96C8",0x5660],
+ ["96C9",0x55EA],
+ ["96CA",0x567B],
+ ["96CB",0x80BC],
+ ["96CC",0xE863],
+ ["96CD",0x78B8],
+ ["96CE",0x6A0C],
+ ["96CF",0x54CC],
+ ["96D0",0x7BD0],
+ ["96D1",0x7BEC],
+ ["96D2",0x7BFA],
+ ["96D3",0x7C15],
+ ["96D4",0x7C1B],
+ ["96D5",0x7C35],
+ ["96D6",0x7C44],
+ ["96D7",0x7C6D],
+ ["96D8",0x7C8E],
+ ["96D9",0x7CB8],
+ ["96DA",0x7CC3],
+ ["96DB",0x7CE6],
+ ["96DC",0x7CED],
+ ["96DD",0x7CF3],
+ ["96DE",0x7CF5],
+ ["96DF",0x7CF9],
+ ["96E0",0xE877],
+ ["96E1",0x7CFC],
+ ["96E2",0x7D8B],
+ ["96E3",0x7D97],
+ ["96E4",0x7DA4],
+ ["96E5",0x7DA8],
+ ["96E6",0x7DCD],
+ ["96E7",0x7DD0],
+ ["96E8",0x7DD3],
+ ["96E9",0x7DE5],
+ ["96EA",0x7DFD],
+ ["96EB",0x6A12],
+ ["96EC",0x6A22],
+ ["96ED",0x6A30],
+ ["96EE",0x6A36],
+ ["96EF",0x6A65],
+ ["96F0",0xE887],
+ ["96F1",0xE888],
+ ["96F2",0xE889],
+ ["96F3",0xE88A],
+ ["96F4",0xE88B],
+ ["96F5",0xE88C],
+ ["96F6",0xE88D],
+ ["96F7",0xE88E],
+ ["96F8",0x6A73],
+ ["96F9",0x6A78],
+ ["96FA",0xE891],
+ ["96FB",0xE892],
+ ["96FC",0x6A7C],
+ ["96FD",0x6AA9],
+ ["96FE",0x6AAA],
+ ["9740",0x24EA],
+ ["9741",0x2460],
+ ["9742",0x2461],
+ ["9743",0x2462],
+ ["9744",0x2463],
+ ["9745",0x2464],
+ ["9746",0x2465],
+ ["9747",0x2466],
+ ["9748",0x2467],
+ ["9749",0x2468],
+ ["974A",0x2469],
+ ["974B",0x246A],
+ ["974C",0x246B],
+ ["974D",0x246C],
+ ["974E",0x246D],
+ ["974F",0x246E],
+ ["9750",0x246F],
+ ["9751",0x2470],
+ ["9752",0x2471],
+ ["9753",0x2472],
+ ["9754",0x2473],
+ ["9755",0x9344],
+ ["9756",0x93AD],
+ ["9757",0x93C6],
+ ["9758",0x93E5],
+ ["9759",0x941A],
+ ["975A",0x9421],
+ ["975B",0x943E],
+ ["975C",0x9441],
+ ["975D",0x9453],
+ ["975E",0x945A],
+ ["975F",0x949A],
+ ["9760",0x94B7],
+ ["9761",0x94D8],
+ ["9762",0x94DE],
+ ["9763",0x94F3],
+ ["9764",0x9503],
+ ["9765",0x950E],
+ ["9766",0x950F],
+ ["9767",0x9518],
+ ["9768",0x951D],
+ ["9769",0x952A],
+ ["976A",0x952B],
+ ["976B",0x953F],
+ ["976C",0x9545],
+ ["976D",0x954E],
+ ["976E",0x9562],
+ ["976F",0x9565],
+ ["9770",0x9569],
+ ["9771",0x9572],
+ ["9772",0x9587],
+ ["9773",0x9599],
+ ["9774",0x95A0],
+ ["9775",0x95B2],
+ ["9776",0x9666],
+ ["9777",0x969D],
+ ["9778",0x96AF],
+ ["9779",0x96B2],
+ ["977A",0x9733],
+ ["977B",0x973B],
+ ["977C",0x974D],
+ ["977D",0x974F],
+ ["977E",0x9751],
+ ["97A1",0x9755],
+ ["97A2",0x9764],
+ ["97A3",0x976B],
+ ["97A4",0x9771],
+ ["97A5",0x9792],
+ ["97A6",0x97B2],
+ ["97A7",0x97F2],
+ ["97A8",0x983D],
+ ["97A9",0x9854],
+ ["97AA",0x98A5],
+ ["97AB",0x98C3],
+ ["97AC",0x98DA],
+ ["97AD",0x98EE],
+ ["97AE",0x991D],
+ ["97AF",0x9920],
+ ["97B0",0x9963],
+ ["97B1",0x9980],
+ ["97B2",0x9987],
+ ["97B3",0x998D],
+ ["97B4",0x9993],
+ ["97B5",0x9995],
+ ["97B6",0x99BC],
+ ["97B7",0x99C8],
+ ["97B8",0x99F2],
+ ["97B9",0x9AB6],
+ ["97BA",0x9AD9],
+ ["97BB",0x9ADE],
+ ["97BC",0x9B0F],
+ ["97BD",0x9B49],
+ ["97BE",0x9B72],
+ ["97BF",0x9B83],
+ ["97C0",0x9B9F],
+ ["97C1",0x9BBB],
+ ["97C2",0x9BE3],
+ ["97C3",0x9BF5],
+ ["97C4",0x9C00],
+ ["97C5",0x9C04],
+ ["97C6",0x9C1B],
+ ["97C7",0x24B6],
+ ["97C8",0x24B7],
+ ["97C9",0x24B8],
+ ["97CA",0x24B9],
+ ["97CB",0x24BA],
+ ["97CC",0x24BB],
+ ["97CD",0x24BC],
+ ["97CE",0x24BD],
+ ["97CF",0x24BE],
+ ["97D0",0x24BF],
+ ["97D1",0x24C0],
+ ["97D2",0x24C1],
+ ["97D3",0x24C2],
+ ["97D4",0x24C3],
+ ["97D5",0x24C4],
+ ["97D6",0x24C5],
+ ["97D7",0x24C6],
+ ["97D8",0x24C7],
+ ["97D9",0x24C8],
+ ["97DA",0x24C9],
+ ["97DB",0x24CA],
+ ["97DC",0x24CB],
+ ["97DD",0x24CC],
+ ["97DE",0x24CD],
+ ["97DF",0x24CE],
+ ["97E0",0x24CF],
+ ["97E1",0x24D0],
+ ["97E2",0x24D1],
+ ["97E3",0x24D2],
+ ["97E4",0x24D3],
+ ["97E5",0x24D4],
+ ["97E6",0x24D5],
+ ["97E7",0x24D6],
+ ["97E8",0x24D7],
+ ["97E9",0x24D8],
+ ["97EA",0x24D9],
+ ["97EB",0x24DA],
+ ["97EC",0x24DB],
+ ["97ED",0x24DC],
+ ["97EE",0x24DD],
+ ["97EF",0x24DE],
+ ["97F0",0x24DF],
+ ["97F1",0x24E0],
+ ["97F2",0x24E1],
+ ["97F3",0x24E2],
+ ["97F4",0x24E3],
+ ["97F5",0x24E4],
+ ["97F6",0x24E5],
+ ["97F7",0x24E6],
+ ["97F8",0x24E7],
+ ["97F9",0x24E8],
+ ["97FA",0x24E9],
+ ["97FB",0x00AE],
+ ["97FC",0x2122],
+ ["97FD",0xE931],
+ ["97FE",0xE932],
+ ["9840",0x9C76],
+ ["9841",0x278A],
+ ["9842",0x278B],
+ ["9843",0x278C],
+ ["9844",0x278D],
+ ["9845",0x278E],
+ ["9846",0x278F],
+ ["9847",0x2790],
+ ["9848",0x2791],
+ ["9849",0x2792],
+ ["984A",0x2793],
+ ["984B",0x9C85],
+ ["984C",0x9C86],
+ ["984D",0x9C87],
+ ["984E",0x9C8B],
+ ["984F",0x9C90],
+ ["9850",0x9C9E],
+ ["9851",0x9CAE],
+ ["9852",0x9CB0],
+ ["9853",0x9CB2],
+ ["9854",0x9CB4],
+ ["9855",0x9CBA],
+ ["9856",0x9CBC],
+ ["9857",0x9CBD],
+ ["9858",0x9CC6],
+ ["9859",0x9CC7],
+ ["985A",0x9CCA],
+ ["985B",0x9CCB],
+ ["985C",0x9CD3],
+ ["985D",0x9CD8],
+ ["985E",0x9CD9],
+ ["985F",0x9CE2],
+ ["9860",0x9CEB],
+ ["9861",0x9CEC],
+ ["9862",0x9D2A],
+ ["9863",0x9D48],
+ ["9864",0x9D50],
+ ["9865",0x9D7A],
+ ["9866",0x9DC6],
+ ["9867",0x9E4B],
+ ["9868",0x9E55],
+ ["9869",0x9E5B],
+ ["986A",0x9E71],
+ ["986B",0x9EAA],
+ ["986C",0x9EBD],
+ ["986D",0x9EC4],
+ ["986E",0x9EE2],
+ ["986F",0x9EEA],
+ ["9870",0x9F08],
+ ["9871",0x9F0B],
+ ["9872",0x9F0D],
+ ["9873",0x9F21],
+ ["9874",0x9F44],
+ ["9875",0x9F51],
+ ["9876",0x9F9D],
+ ["9877",0xFA0E],
+ ["9878",0xFA0F],
+ ["9879",0xFA11],
+ ["987A",0xFA13],
+ ["987B",0xFA14],
+ ["987C",0xFA18],
+ ["987D",0xFA1F],
+ ["987E",0xFA20],
+ ["98A1",0xFA21],
+ ["98A2",0xFA23],
+ ["98A3",0xFA24],
+ ["98A4",0xFA27],
+ ["98A5",0xFA28],
+ ["98A6",0xFA29],
+ ["98A7",0x4E04],
+ ["98A8",0x4E2F],
+ ["98A9",0x4E81],
+ ["98AA",0x4E87],
+ ["98AB",0x4EA3],
+ ["98AC",0x4EB7],
+ ["98AD",0x4EBC],
+ ["98AE",0x4EF8],
+ ["98AF",0x4F28],
+ ["98B0",0x4F29],
+ ["98B1",0x4F37],
+ ["98B2",0x4F42],
+ ["98B3",0x4F45],
+ ["98B4",0x4F4B],
+ ["98B5",0x4F72],
+ ["98B6",0x4FA2],
+ ["98B7",0x4FB0],
+ ["98B8",0x4FBD],
+ ["98B9",0x4FC8],
+ ["98BA",0x4FCC],
+ ["98BB",0x4FF0],
+ ["98BC",0x4FF2],
+ ["98BD",0x4FF9],
+ ["98BE",0x5003],
+ ["98BF",0x5008],
+ ["98C0",0x5034],
+ ["98C1",0x503B],
+ ["98C2",0x5058],
+ ["98C3",0x5066],
+ ["98C4",0x5081],
+ ["98C5",0x5090],
+ ["98C6",0x50BC],
+ ["98C7",0x50D0],
+ ["98C8",0x50DF],
+ ["98C9",0x50E1],
+ ["98CA",0x50FC],
+ ["98CB",0x510D],
+ ["98CC",0x512B],
+ ["98CD",0x5160],
+ ["98CE",0x51AE],
+ ["98CF",0x51B8],
+ ["98D0",0x51D2],
+ ["98D1",0x51E2],
+ ["98D2",0x5205],
+ ["98D3",0x5234],
+ ["98D4",0x523C],
+ ["98D5",0x5259],
+ ["98D6",0x5268],
+ ["98D7",0x5279],
+ ["98D8",0x52A4],
+ ["98D9",0x52CC],
+ ["98DA",0x5327],
+ ["98DB",0x5342],
+ ["98DC",0x535D],
+ ["98DD",0x537D],
+ ["98DE",0x537E],
+ ["98DF",0x53C5],
+ ["98E0",0x53D0],
+ ["98E1",0x53D2],
+ ["98E2",0x53FE],
+ ["98E3",0x546D],
+ ["98E4",0x5485],
+ ["98E5",0x5493],
+ ["98E6",0x549E],
+ ["98E7",0x54B9],
+ ["98E8",0x54E3],
+ ["98E9",0x54EF],
+ ["98EA",0x550D],
+ ["98EB",0x5518],
+ ["98EC",0x5525],
+ ["98ED",0x5528],
+ ["98EE",0x552B],
+ ["98EF",0x5547],
+ ["98F0",0x5579],
+ ["98F1",0x5590],
+ ["98F2",0x55B4],
+ ["98F3",0x55C1],
+ ["98F4",0x55D7],
+ ["98F5",0x55D8],
+ ["98F6",0x55FB],
+ ["98F7",0x4FB4],
+ ["98F8",0x5621],
+ ["98F9",0x2203],
+ ["98FA",0x5652],
+ ["98FB",0xE9CC],
+ ["98FC",0x263B],
+ ["98FD",0xE9CE],
+ ["98FE",0xE9CF],
+ ["9940",0x565D],
+ ["9941",0x2474],
+ ["9942",0x2475],
+ ["9943",0x2476],
+ ["9944",0x2477],
+ ["9945",0x2478],
+ ["9946",0x2479],
+ ["9947",0x247A],
+ ["9948",0x247B],
+ ["9949",0x247C],
+ ["994A",0x247D],
+ ["994B",0x247E],
+ ["994C",0x247F],
+ ["994D",0x2480],
+ ["994E",0x2481],
+ ["994F",0x2482],
+ ["9950",0x2483],
+ ["9951",0x2484],
+ ["9952",0x2485],
+ ["9953",0x2486],
+ ["9954",0x2487],
+ ["9955",0x5661],
+ ["9956",0x5689],
+ ["9957",0x568B],
+ ["9958",0x569E],
+ ["9959",0x56A1],
+ ["995A",0x56B1],
+ ["995B",0x56B9],
+ ["995C",0x56BF],
+ ["995D",0x56D6],
+ ["995E",0x56EF],
+ ["995F",0x5715],
+ ["9960",0x571D],
+ ["9961",0x5732],
+ ["9962",0x573D],
+ ["9963",0x573F],
+ ["9964",0x5743],
+ ["9965",0x21D4],
+ ["9966",0x577E],
+ ["9967",0x578A],
+ ["9968",0x578D],
+ ["9969",0x5790],
+ ["996A",0x579C],
+ ["996B",0x57BB],
+ ["996C",0x57BE],
+ ["996D",0x57C4],
+ ["996E",0x57DE],
+ ["996F",0x57FE],
+ ["9970",0x5812],
+ ["9971",0x5822],
+ ["9972",0x5847],
+ ["9973",0x585C],
+ ["9974",0x585F],
+ ["9975",0x5873],
+ ["9976",0x58A7],
+ ["9977",0x58AA],
+ ["9978",0x58B0],
+ ["9979",0x58B5],
+ ["997A",0x58B6],
+ ["997B",0x58CB],
+ ["997C",0x58D0],
+ ["997D",0x58E0],
+ ["997E",0x5905],
+ ["99A1",0x5911],
+ ["99A2",0x5989],
+ ["99A3",0x5994],
+ ["99A4",0x599A],
+ ["99A5",0x599F],
+ ["99A6",0x59B0],
+ ["99A7",0x59B8],
+ ["99A8",0x59C4],
+ ["99A9",0x59EF],
+ ["99AA",0x59F0],
+ ["99AB",0x59F8],
+ ["99AC",0x5A02],
+ ["99AD",0x5A0B],
+ ["99AE",0x5A0D],
+ ["99AF",0x5A12],
+ ["99B0",0x5A21],
+ ["99B1",0x5A24],
+ ["99B2",0x5A27],
+ ["99B3",0x5A2A],
+ ["99B4",0x5A2B],
+ ["99B5",0x5A2C],
+ ["99B6",0x5A3D],
+ ["99B7",0x5A45],
+ ["99B8",0x5A54],
+ ["99B9",0x5A59],
+ ["99BA",0x5A61],
+ ["99BB",0x5A68],
+ ["99BC",0x5A6B],
+ ["99BD",0x5A6E],
+ ["99BE",0x5A71],
+ ["99BF",0x5A79],
+ ["99C0",0x5A7E],
+ ["99C1",0x5A81],
+ ["99C2",0x5A82],
+ ["99C3",0x5A86],
+ ["99C4",0x5A88],
+ ["99C5",0x5A91],
+ ["99C6",0x5A99],
+ ["99C7",0x5AA0],
+ ["99C8",0x5AA1],
+ ["99C9",0x5AAB],
+ ["99CA",0x5AC3],
+ ["99CB",0x5ACE],
+ ["99CC",0x5ACF],
+ ["99CD",0x5AD3],
+ ["99CE",0x5AE4],
+ ["99CF",0x5AF0],
+ ["99D0",0x5AFE],
+ ["99D1",0x5B0D],
+ ["99D2",0x5B11],
+ ["99D3",0x5B15],
+ ["99D4",0x5B1F],
+ ["99D5",0x5B2B],
+ ["99D6",0x5B41],
+ ["99D7",0x5B44],
+ ["99D8",0x5B46],
+ ["99D9",0x5B4A],
+ ["99DA",0x5B4F],
+ ["99DB",0x5B68],
+ ["99DC",0x5B74],
+ ["99DD",0x5B76],
+ ["99DE",0x5B7C],
+ ["99DF",0x5B82],
+ ["99E0",0x5B90],
+ ["99E1",0x249C],
+ ["99E2",0x249D],
+ ["99E3",0x249E],
+ ["99E4",0x249F],
+ ["99E5",0x24A0],
+ ["99E6",0x24A1],
+ ["99E7",0x24A2],
+ ["99E8",0x24A3],
+ ["99E9",0x24A4],
+ ["99EA",0x24A5],
+ ["99EB",0x24A6],
+ ["99EC",0x24A7],
+ ["99ED",0x24A8],
+ ["99EE",0x24A9],
+ ["99EF",0x24AA],
+ ["99F0",0x24AB],
+ ["99F1",0x24AC],
+ ["99F2",0x24AD],
+ ["99F3",0x24AE],
+ ["99F4",0x24AF],
+ ["99F5",0x24B0],
+ ["99F6",0x24B1],
+ ["99F7",0x24B2],
+ ["99F8",0x24B3],
+ ["99F9",0x24B4],
+ ["99FA",0x24B5],
+ ["99FB",0xEA69],
+ ["99FC",0x3232],
+ ["99FD",0x3231],
+ ["99FE",0x6AAB],
+ ["9A40",0x5B96],
+ ["9A41",0x2488],
+ ["9A42",0x2489],
+ ["9A43",0x248A],
+ ["9A44",0x248B],
+ ["9A45",0x248C],
+ ["9A46",0x248D],
+ ["9A47",0x248E],
+ ["9A48",0x248F],
+ ["9A49",0x2490],
+ ["9A4A",0x2491],
+ ["9A4B",0x2492],
+ ["9A4C",0x2493],
+ ["9A4D",0x2494],
+ ["9A4E",0x2495],
+ ["9A4F",0x2496],
+ ["9A50",0x2497],
+ ["9A51",0x2498],
+ ["9A52",0x2499],
+ ["9A53",0x249A],
+ ["9A54",0x249B],
+ ["9A55",0x5BD5],
+ ["9A56",0x5BD7],
+ ["9A57",0x5C23],
+ ["9A58",0x5C85],
+ ["9A59",0x5C9E],
+ ["9A5A",0x5CC2],
+ ["9A5B",0x5D10],
+ ["9A5C",0x5D2C],
+ ["9A5D",0x5D2F],
+ ["9A5E",0x5D48],
+ ["9A5F",0x5D56],
+ ["9A60",0x5D70],
+ ["9A61",0x5D7B],
+ ["9A62",0x5D85],
+ ["9A63",0x5DA4],
+ ["9A64",0x5DAB],
+ ["9A65",0x5DB6],
+ ["9A66",0x5DC1],
+ ["9A67",0x5DD7],
+ ["9A68",0x5E09],
+ ["9A69",0x5E48],
+ ["9A6A",0x5E92],
+ ["9A6B",0x5EBD],
+ ["9A6C",0x5F0E],
+ ["9A6D",0x5F72],
+ ["9A6E",0x5FB1],
+ ["9A6F",0x5FC2],
+ ["9A70",0x5FDB],
+ ["9A71",0x5FDF],
+ ["9A72",0x6023],
+ ["9A73",0x607E],
+ ["9A74",0x60D7],
+ ["9A75",0x6107],
+ ["9A76",0x610C],
+ ["9A77",0x6119],
+ ["9A78",0x6122],
+ ["9A79",0x6150],
+ ["9A7A",0x6160],
+ ["9A7B",0x6181],
+ ["9A7C",0x6195],
+ ["9A7D",0x61B9],
+ ["9A7E",0x61C0],
+ ["9AA1",0x61CF],
+ ["9AA2",0x61D3],
+ ["9AA3",0x61DA],
+ ["9AA4",0x6290],
+ ["9AA5",0x6331],
+ ["9AA6",0x2283],
+ ["9AA7",0x6337],
+ ["9AA8",0x6379],
+ ["9AA9",0x638B],
+ ["9AAA",0x63C1],
+ ["9AAB",0x63E2],
+ ["9AAC",0x63E6],
+ ["9AAD",0x63FB],
+ ["9AAE",0x63FE],
+ ["9AAF",0x6407],
+ ["9AB0",0x6432],
+ ["9AB1",0x6438],
+ ["9AB2",0x643B],
+ ["9AB3",0x645A],
+ ["9AB4",0x6471],
+ ["9AB5",0x647C],
+ ["9AB6",0x648D],
+ ["9AB7",0x64AF],
+ ["9AB8",0x64B4],
+ ["9AB9",0x64B6],
+ ["9ABA",0x64DD],
+ ["9ABB",0x64E5],
+ ["9ABC",0x650A],
+ ["9ABD",0x6511],
+ ["9ABE",0x651F],
+ ["9ABF",0x655F],
+ ["9AC0",0x656D],
+ ["9AC1",0x6586],
+ ["9AC2",0x65B5],
+ ["9AC3",0x65BE],
+ ["9AC4",0x65D1],
+ ["9AC5",0x65D4],
+ ["9AC6",0x65E3],
+ ["9AC7",0x65FF],
+ ["9AC8",0x6618],
+ ["9AC9",0x6623],
+ ["9ACA",0x6663],
+ ["9ACB",0x666B],
+ ["9ACC",0x667D],
+ ["9ACD",0x6685],
+ ["9ACE",0x6692],
+ ["9ACF",0x669A],
+ ["9AD0",0x66A4],
+ ["9AD1",0x66AD],
+ ["9AD2",0x66B3],
+ ["9AD3",0x66B6],
+ ["9AD4",0x66CD],
+ ["9AD5",0x66CE],
+ ["9AD6",0x6702],
+ ["9AD7",0x670C],
+ ["9AD8",0x6719],
+ ["9AD9",0x6744],
+ ["9ADA",0x676B],
+ ["9ADB",0x678F],
+ ["9ADC",0x67A4],
+ ["9ADD",0x67BF],
+ ["9ADE",0x67D6],
+ ["9ADF",0x67D7],
+ ["9AE0",0x2282],
+ ["9AE1",0x680D],
+ ["9AE2",0x6810],
+ ["9AE3",0x681B],
+ ["9AE4",0x6836],
+ ["9AE5",0x6847],
+ ["9AE6",0x6856],
+ ["9AE7",0x6884],
+ ["9AE8",0x6888],
+ ["9AE9",0x68BD],
+ ["9AEA",0x68C3],
+ ["9AEB",0x68C5],
+ ["9AEC",0x6902],
+ ["9AED",0x6903],
+ ["9AEE",0x6909],
+ ["9AEF",0x6918],
+ ["9AF0",0x6943],
+ ["9AF1",0x6946],
+ ["9AF2",0x6964],
+ ["9AF3",0x6967],
+ ["9AF4",0x6972],
+ ["9AF5",0x6985],
+ ["9AF6",0x699F],
+ ["9AF7",0x69A2],
+ ["9AF8",0x69D1],
+ ["9AF9",0x69D5],
+ ["9AFA",0x69D6],
+ ["9AFB",0x9A21],
+ ["9AFC",0x9A26],
+ ["9AFD",0x9A2F],
+ ["9AFE",0x6AC1],
+ ["9B40",0x59BF],
+ ["9B41",0x69E1],
+ ["9B42",0x6A03],
+ ["9B43",0x6A1A],
+ ["9B44",0x6A1C],
+ ["9B45",0x6A2C],
+ ["9B46",0x6A2D],
+ ["9B47",0x6A33],
+ ["9B48",0x6A43],
+ ["9B49",0x6A45],
+ ["9B4A",0x6A4C],
+ ["9B4B",0x6A53],
+ ["9B4C",0x6A57],
+ ["9B4D",0x6A63],
+ ["9B4E",0x6A74],
+ ["9B4F",0x6A82],
+ ["9B50",0x6A8A],
+ ["9B51",0x6A8F],
+ ["9B52",0x6A99],
+ ["9B53",0x6AA7],
+ ["9B54",0x6AB1],
+ ["9B55",0x6AB5],
+ ["9B56",0x6ABE],
+ ["9B57",0x6AC9],
+ ["9B58",0x6AD4],
+ ["9B59",0x6AD8],
+ ["9B5A",0x6AF6],
+ ["9B5B",0x6B57],
+ ["9B5C",0x6B7A],
+ ["9B5D",0x6BDC],
+ ["9B5E",0x6C1C],
+ ["9B5F",0x6C31],
+ ["9B60",0x6C58],
+ ["9B61",0x6C6E],
+ ["9B62",0x6C75],
+ ["9B63",0x6C7F],
+ ["9B64",0x6CAF],
+ ["9B65",0x6CCB],
+ ["9B66",0x6CDF],
+ ["9B67",0x6CFF],
+ ["9B68",0x6D02],
+ ["9B69",0x6D05],
+ ["9B6A",0x6D06],
+ ["9B6B",0x6D26],
+ ["9B6C",0x6D57],
+ ["9B6D",0x6D5B],
+ ["9B6E",0x6D71],
+ ["9B6F",0x6D81],
+ ["9B70",0x6D8F],
+ ["9B71",0x6DA5],
+ ["9B72",0x6DB1],
+ ["9B73",0x6DFE],
+ ["9B74",0x6E02],
+ ["9B75",0x6E04],
+ ["9B76",0x6E0F],
+ ["9B77",0x6E18],
+ ["9B78",0x6E2A],
+ ["9B79",0x6E50],
+ ["9B7A",0x6E59],
+ ["9B7B",0x6E9A],
+ ["9B7C",0x6EB5],
+ ["9B7D",0x6EB8],
+ ["9B7E",0x6EDB],
+ ["9BA1",0x6EFA],
+ ["9BA2",0x6F04],
+ ["9BA3",0x6F0B],
+ ["9BA4",0x6F0C],
+ ["9BA5",0x6F16],
+ ["9BA6",0x6F17],
+ ["9BA7",0x6F34],
+ ["9BA8",0x6F3D],
+ ["9BA9",0x6F56],
+ ["9BAA",0x6F79],
+ ["9BAB",0x6F8A],
+ ["9BAC",0x6F9D],
+ ["9BAD",0x6F9F],
+ ["9BAE",0x6FBB],
+ ["9BAF",0x6FBE],
+ ["9BB0",0x6FD3],
+ ["9BB1",0x6FD9],
+ ["9BB2",0x6FF8],
+ ["9BB3",0x7003],
+ ["9BB4",0x704B],
+ ["9BB5",0x704D],
+ ["9BB6",0x7050],
+ ["9BB7",0x7054],
+ ["9BB8",0x705C],
+ ["9BB9",0x7067],
+ ["9BBA",0x7077],
+ ["9BBB",0x7079],
+ ["9BBC",0x708B],
+ ["9BBD",0x708F],
+ ["9BBE",0x70A0],
+ ["9BBF",0x70A3],
+ ["9BC0",0x70A5],
+ ["9BC1",0x70A6],
+ ["9BC2",0x70A7],
+ ["9BC3",0x70C4],
+ ["9BC4",0x70CC],
+ ["9BC5",0x70D0],
+ ["9BC6",0x70D6],
+ ["9BC7",0x026A],
+ ["9BC8",0x025B],
+ ["9BC9",0x00E6],
+ ["9BCA",0x028C],
+ ["9BCB",0x0251],
+ ["9BCC",0x0254],
+ ["9BCD",0x028A],
+ ["9BCE",0x025D],
+ ["9BCF",0x0259],
+ ["9BD0",0x025A],
+ ["9BD1",0x025C],
+ ["9BD2",0x0261],
+ ["9BD3",0x1E43],
+ ["9BD4",0x1E49],
+ ["9BD5",0x014A],
+ ["9BD6",0x1E3B],
+ ["9BD7",0x0275],
+ ["9BD8",0x00F0],
+ ["9BD9",0x0283],
+ ["9BDA",0x0292],
+ ["9BDB",0x02A7],
+ ["9BDC",0x02A4],
+ ["9BDD",0x00E3],
+ ["9BDE",0xEB86],
+ ["9BDF",0xEB87],
+ ["9BE0",0x026F],
+ ["9BE1",0x0278],
+ ["9BE2",0x0287],
+ ["9BE3",0xEB8B],
+ ["9BE4",0x00C7],
+ ["9BE5",0x0153],
+ ["9BE6",0x0252],
+ ["9BE7",0xFF47],
+ ["9BE8",0x02CB],
+ ["9BE9",0x02CF],
+ ["9BEA",0xFF41],
+ ["9BEB",0xFF42],
+ ["9BEC",0xFF44],
+ ["9BED",0xFF45],
+ ["9BEE",0xFF46],
+ ["9BEF",0xFF48],
+ ["9BF0",0xFF49],
+ ["9BF1",0xFF4A],
+ ["9BF2",0xFF4B],
+ ["9BF3",0xFF4C],
+ ["9BF4",0xFF4D],
+ ["9BF5",0xFF4E],
+ ["9BF6",0xFF4F],
+ ["9BF7",0xFF50],
+ ["9BF8",0xFF52],
+ ["9BF9",0xFF53],
+ ["9BFA",0xFF54],
+ ["9BFB",0xFF55],
+ ["9BFC",0xFF56],
+ ["9BFD",0xFF57],
+ ["9BFE",0xFF5A],
+ ["9C40",0x70F5],
+ ["9C41",0x3220],
+ ["9C42",0x3221],
+ ["9C43",0x3222],
+ ["9C44",0x3223],
+ ["9C45",0x3224],
+ ["9C46",0x3225],
+ ["9C47",0x3226],
+ ["9C48",0x3227],
+ ["9C49",0x3228],
+ ["9C4A",0x3229],
+ ["9C4B",0x70FE],
+ ["9C4C",0x7105],
+ ["9C4D",0x711D],
+ ["9C4E",0x7129],
+ ["9C4F",0x712B],
+ ["9C50",0x712C],
+ ["9C51",0x7133],
+ ["9C52",0x7135],
+ ["9C53",0x713B],
+ ["9C54",0x713E],
+ ["9C55",0x7140],
+ ["9C56",0x714F],
+ ["9C57",0x716B],
+ ["9C58",0x7175],
+ ["9C59",0x7177],
+ ["9C5A",0x717C],
+ ["9C5B",0x717E],
+ ["9C5C",0x718C],
+ ["9C5D",0x718E],
+ ["9C5E",0x7191],
+ ["9C5F",0x7196],
+ ["9C60",0x71A2],
+ ["9C61",0x71A3],
+ ["9C62",0x71AD],
+ ["9C63",0x71B4],
+ ["9C64",0x71B7],
+ ["9C65",0x71BA],
+ ["9C66",0x71D1],
+ ["9C67",0x71DD],
+ ["9C68",0x71EB],
+ ["9C69",0x7200],
+ ["9C6A",0x7209],
+ ["9C6B",0x720E],
+ ["9C6C",0x720F],
+ ["9C6D",0x7216],
+ ["9C6E",0x7217],
+ ["9C6F",0x7224],
+ ["9C70",0x5AA4],
+ ["9C71",0x722E],
+ ["9C72",0x2286],
+ ["9C73",0x7257],
+ ["9C74",0x725C],
+ ["9C75",0x7294],
+ ["9C76",0x7304],
+ ["9C77",0x7310],
+ ["9C78",0x7341],
+ ["9C79",0x7374],
+ ["9C7A",0x738C],
+ ["9C7B",0x738F],
+ ["9C7C",0x7398],
+ ["9C7D",0x739C],
+ ["9C7E",0x739E],
+ ["9CA1",0x73A7],
+ ["9CA2",0x73AA],
+ ["9CA3",0x73D5],
+ ["9CA4",0x73E1],
+ ["9CA5",0x73E2],
+ ["9CA6",0x73E4],
+ ["9CA7",0x73E6],
+ ["9CA8",0x73EF],
+ ["9CA9",0x73F3],
+ ["9CAA",0x2287],
+ ["9CAB",0x73F9],
+ ["9CAC",0x73FB],
+ ["9CAD",0x7402],
+ ["9CAE",0x7411],
+ ["9CAF",0x7412],
+ ["9CB0",0x7414],
+ ["9CB1",0x7415],
+ ["9CB2",0x7417],
+ ["9CB3",0x7419],
+ ["9CB4",0x741C],
+ ["9CB5",0x741E],
+ ["9CB6",0x741F],
+ ["9CB7",0x7437],
+ ["9CB8",0x7438],
+ ["9CB9",0x7439],
+ ["9CBA",0x7443],
+ ["9CBB",0x7445],
+ ["9CBC",0x7447],
+ ["9CBD",0x7448],
+ ["9CBE",0x7449],
+ ["9CBF",0x7453],
+ ["9CC0",0x7456],
+ ["9CC1",0x7465],
+ ["9CC2",0x746B],
+ ["9CC3",0x746C],
+ ["9CC4",0x7474],
+ ["9CC5",0x747A],
+ ["9CC6",0x7482],
+ ["9CC7",0x5382],
+ ["9CC8",0x5E7F],
+ ["9CC9",0x4E28],
+ ["9CCA",0x5E7A],
+ ["9CCB",0x5196],
+ ["9CCC",0x5B80],
+ ["9CCD",0x5369],
+ ["9CCE",0x2E87],
+ ["9CCF",0xEC14],
+ ["9CD0",0x5303],
+ ["9CD1",0x2612],
+ ["9CD2",0x8279],
+ ["9CD3",0x4491],
+ ["9CD4",0x2E8C],
+ ["9CD5",0x2E8A],
+ ["9CD6",0x4E36],
+ ["9CD7",0xEC1C],
+ ["9CD8",0x531A],
+ ["9CD9",0xEC1E],
+ ["9CDA",0xEC1F],
+ ["9CDB",0x2E95],
+ ["9CDC",0xEC21],
+ ["9CDD",0xEC22],
+ ["9CDE",0x2514],
+ ["9CDF",0x4E5A],
+ ["9CE0",0x8FB6],
+ ["9CE1",0x5EF4],
+ ["9CE2",0x5188],
+ ["9CE3",0x4E85],
+ ["9CE4",0xEC29],
+ ["9CE5",0x4E3F],
+ ["9CE6",0xEC2B],
+ ["9CE7",0xEC2C],
+ ["9CE8",0x4E5B],
+ ["9CE9",0x53B6],
+ ["9CEA",0x8F66],
+ ["9CEB",0x7E9F],
+ ["9CEC",0x8BA0],
+ ["9CED",0x8D1D],
+ ["9CEE",0x9E1F],
+ ["9CEF",0x95E8],
+ ["9CF0",0x9485],
+ ["9CF1",0x961D],
+ ["9CF2",0x624C],
+ ["9CF3",0x6C35],
+ ["9CF4",0x4EBB],
+ ["9CF5",0x5FC4],
+ ["9CF6",0x706C],
+ ["9CF7",0x2EAE],
+ ["9CF8",0x53E3],
+ ["9CF9",0x6AE2],
+ ["9CFA",0x9A3B],
+ ["9CFB",0x9A3C],
+ ["9CFC",0x9A58],
+ ["9CFD",0x9A5C],
+ ["9CFE",0x9A63],
+ ["9D40",0x260E],
+ ["9D41",0x2192],
+ ["9D42",0x2190],
+ ["9D43",0x2191],
+ ["9D44",0x2193],
+ ["9D45",0x21E8],
+ ["9D46",0x21E6],
+ ["9D47",0x21E7],
+ ["9D48",0x21E9],
+ ["9D49",0x21E8],
+ ["9D4A",0x21E6],
+ ["9D4B",0x21E7],
+ ["9D4C",0x21E9],
+ ["9D4D",0x261E],
+ ["9D4E",0x261C],
+ ["9D4F",0x261B],
+ ["9D50",0x261F],
+ ["9D51",0x3016],
+ ["9D52",0x3017],
+ ["9D53",0x25CB],
+ ["9D54",0x2715],
+ ["9D55",0x2713],
+ ["9D56",0x56FB],
+ ["9D57",0x263D],
+ ["9D58",0x591D],
+ ["9D59",0x664D],
+ ["9D5A",0x7225],
+ ["9D5B",0x2729],
+ ["9D5C",0x2721],
+ ["9D5D",0x263A],
+ ["9D5E",0x2639],
+ ["9D5F",0xEC63],
+ ["9D60",0xEC64],
+ ["9D61",0xEC65],
+ ["9D62",0xEC66],
+ ["9D63",0xEC67],
+ ["9D64",0x5C78],
+ ["9D65",0x266C],
+ ["9D66",0x266A],
+ ["9D67",0x5AD1],
+ ["9D68",0x5BB7],
+ ["9D69",0x5CFC],
+ ["9D6A",0xEC6E],
+ ["9D6B",0x2709],
+ ["9D6C",0x2702],
+ ["9D6D",0xEC71],
+ ["9D6E",0xEC72],
+ ["9D6F",0xEC73],
+ ["9D70",0xEC74],
+ ["9D71",0x5CD5],
+ ["9D72",0x676E],
+ ["9D73",0x7461],
+ ["9D74",0x749D],
+ ["9D75",0x7F53],
+ ["9D76",0x8593],
+ ["9D77",0x274F],
+ ["9D78",0xEC7C],
+ ["9D79",0xEC7D],
+ ["9D7A",0x5D78],
+ ["9D7B",0x5F3B],
+ ["9D7C",0xEC80],
+ ["9D7D",0x2501],
+ ["9D7E",0x2503],
+ ["9DA1",0xEC83],
+ ["9DA2",0xEC84],
+ ["9DA3",0xEC85],
+ ["9DA4",0xEC86],
+ ["9DA5",0xEC87],
+ ["9DA6",0xEC88],
+ ["9DA7",0xEC89],
+ ["9DA8",0xEC8A],
+ ["9DA9",0xEC8B],
+ ["9DAA",0xEC8C],
+ ["9DAB",0xEC8D],
+ ["9DAC",0xEC8E],
+ ["9DAD",0xEC8F],
+ ["9DAE",0xEC90],
+ ["9DAF",0xEC91],
+ ["9DB0",0x9AB2],
+ ["9DB1",0x9AE0],
+ ["9DB2",0x9B14],
+ ["9DB3",0x9B34],
+ ["9DB4",0x9B39],
+ ["9DB5",0x9B40],
+ ["9DB6",0x9B50],
+ ["9DB7",0x9B7F],
+ ["9DB8",0x263C],
+ ["9DB9",0x7D95],
+ ["9DBA",0x2601],
+ ["9DBB",0x9734],
+ ["9DBC",0x2602],
+ ["9DBD",0xEC9F],
+ ["9DBE",0xECA0],
+ ["9DBF",0xECA1],
+ ["9DC0",0x2708],
+ ["9DC1",0xECA3],
+ ["9DC2",0xECA4],
+ ["9DC3",0xECA5],
+ ["9DC4",0xECA6],
+ ["9DC5",0xECA7],
+ ["9DC6",0xECA8],
+ ["9DC7",0xECA9],
+ ["9DC8",0x213B],
+ ["9DC9",0x2121],
+ ["9DCA",0x66E7],
+ ["9DCB",0x6E57],
+ ["9DCC",0xECAE],
+ ["9DCD",0x7157],
+ ["9DCE",0x79CA],
+ ["9DCF",0x2116],
+ ["9DD0",0x816C],
+ ["9DD1",0x8AF9],
+ ["9DD2",0x9856],
+ ["9DD3",0xECB5],
+ ["9DD4",0xECB6],
+ ["9DD5",0x2620],
+ ["9DD6",0xECB8],
+ ["9DD7",0x2664],
+ ["9DD8",0x2660],
+ ["9DD9",0x2667],
+ ["9DDA",0x2663],
+ ["9DDB",0x2662],
+ ["9DDC",0x2666],
+ ["9DDD",0x2661],
+ ["9DDE",0x2665],
+ ["9DDF",0xECC1],
+ ["9DE0",0xECC2],
+ ["9DE1",0x6AE4],
+ ["9DE2",0x211E],
+ ["9DE3",0x33C2],
+ ["9DE4",0x33D8],
+ ["9DE5",0x33A1],
+ ["9DE6",0xECC8],
+ ["9DE7",0x33A5],
+ ["9DE8",0xECCA],
+ ["9DE9",0xECCB],
+ ["9DEA",0xECCC],
+ ["9DEB",0xECCD],
+ ["9DEC",0xECCE],
+ ["9DED",0x2611],
+ ["9DEE",0x9B81],
+ ["9DEF",0x9B8B],
+ ["9DF0",0x9B8D],
+ ["9DF1",0x9BDD],
+ ["9DF2",0x9BE9],
+ ["9DF3",0x9BED],
+ ["9DF4",0x9BF4],
+ ["9DF5",0x9C1F],
+ ["9DF6",0x9C20],
+ ["9DF7",0x9C26],
+ ["9DF8",0x9C53],
+ ["9DF9",0x9C5D],
+ ["9DFA",0x9C7B],
+ ["9DFB",0x9D0C],
+ ["9DFC",0x9D16],
+ ["9DFD",0x21B2],
+ ["9DFE",0x6B05],
+ ["9E40",0x8CE9],
+ ["9E41",0x8CF2],
+ ["9E42",0x8D03],
+ ["9E43",0x8D11],
+ ["9E44",0x8D1C],
+ ["9E45",0x8D7A],
+ ["9E46",0x8DA9],
+ ["9E47",0x8DC0],
+ ["9E48",0x8E01],
+ ["9E49",0x8E0E],
+ ["9E4A",0x8E46],
+ ["9E4B",0x8E68],
+ ["9E4C",0x8E71],
+ ["9E4D",0x8E7E],
+ ["9E4E",0x8E80],
+ ["9E4F",0x8EB6],
+ ["9E50",0x8EB9],
+ ["9E51",0x8EBC],
+ ["9E52",0x8EC3],
+ ["9E53",0x8EE4],
+ ["9E54",0x8EED],
+ ["9E55",0x8EF2],
+ ["9E56",0x8F30],
+ ["9E57",0x8F41],
+ ["9E58",0x8F4A],
+ ["9E59",0x8FA5],
+ ["9E5A",0x8FB3],
+ ["9E5B",0x8FB8],
+ ["9E5C",0x8FCA],
+ ["9E5D",0x8FCF],
+ ["9E5E",0x9008],
+ ["9E5F",0x9033],
+ ["9E60",0x9037],
+ ["9E61",0x9064],
+ ["9E62",0x906C],
+ ["9E63",0x91A9],
+ ["9E64",0x91B6],
+ ["9E65",0x91C4],
+ ["9E66",0x91FA],
+ ["9E67",0x9208],
+ ["9E68",0x9213],
+ ["9E69",0x9221],
+ ["9E6A",0x9228],
+ ["9E6B",0x922B],
+ ["9E6C",0x9235],
+ ["9E6D",0x923C],
+ ["9E6E",0x9241],
+ ["9E6F",0x9258],
+ ["9E70",0x925D],
+ ["9E71",0x925F],
+ ["9E72",0x926B],
+ ["9E73",0x926E],
+ ["9E74",0x9281],
+ ["9E75",0x9284],
+ ["9E76",0x9289],
+ ["9E77",0x928F],
+ ["9E78",0x92B1],
+ ["9E79",0x92BA],
+ ["9E7A",0x92BF],
+ ["9E7B",0x92D4],
+ ["9E7C",0x92DB],
+ ["9E7D",0x92E3],
+ ["9E7E",0x92E5],
+ ["9EA1",0x92EB],
+ ["9EA2",0x92EC],
+ ["9EA3",0x92F4],
+ ["9EA4",0x92F6],
+ ["9EA5",0x92FD],
+ ["9EA6",0x9303],
+ ["9EA7",0x9307],
+ ["9EA8",0x9330],
+ ["9EA9",0x9331],
+ ["9EAA",0x9340],
+ ["9EAB",0x9342],
+ ["9EAC",0x9343],
+ ["9EAD",0x935F],
+ ["9EAE",0x9362],
+ ["9EAF",0x9366],
+ ["9EB0",0x9368],
+ ["9EB1",0x9373],
+ ["9EB2",0x9374],
+ ["9EB3",0x9378],
+ ["9EB4",0x937D],
+ ["9EB5",0x9381],
+ ["9EB6",0x9384],
+ ["9EB7",0x9386],
+ ["9EB8",0x9387],
+ ["9EB9",0x9390],
+ ["9EBA",0x939C],
+ ["9EBB",0x93A0],
+ ["9EBC",0x93B8],
+ ["9EBD",0x93BB],
+ ["9EBE",0x93BD],
+ ["9EBF",0x93BF],
+ ["9EC0",0x93CB],
+ ["9EC1",0x93D3],
+ ["9EC2",0x93DB],
+ ["9EC3",0x93E0],
+ ["9EC4",0x93F0],
+ ["9EC5",0x93F1],
+ ["9EC6",0x93F3],
+ ["9EC7",0x93F4],
+ ["9EC8",0x9401],
+ ["9EC9",0x9404],
+ ["9ECA",0x9408],
+ ["9ECB",0x9417],
+ ["9ECC",0x941B],
+ ["9ECD",0x941D],
+ ["9ECE",0x9424],
+ ["9ECF",0x9425],
+ ["9ED0",0x9426],
+ ["9ED1",0x942D],
+ ["9ED2",0x9442],
+ ["9ED3",0x9443],
+ ["9ED4",0x944D],
+ ["9ED5",0x9454],
+ ["9ED6",0x9458],
+ ["9ED7",0x9465],
+ ["9ED8",0x9467],
+ ["9ED9",0x946C],
+ ["9EDA",0x9479],
+ ["9EDB",0x947B],
+ ["9EDC",0x9578],
+ ["9EDD",0x9585],
+ ["9EDE",0x95A6],
+ ["9EDF",0x95AA],
+ ["9EE0",0x9656],
+ ["9EE1",0x967B],
+ ["9EE2",0x96A5],
+ ["9EE3",0x96F4],
+ ["9EE4",0x971B],
+ ["9EE5",0x9736],
+ ["9EE6",0x9740],
+ ["9EE7",0x9741],
+ ["9EE8",0x9757],
+ ["9EE9",0x9787],
+ ["9EEA",0x9789],
+ ["9EEB",0x979B],
+ ["9EEC",0x97B1],
+ ["9EED",0x97BD],
+ ["9EEE",0x97C0],
+ ["9EEF",0x97C2],
+ ["9EF0",0x97D2],
+ ["9EF1",0x97E0],
+ ["9EF2",0x9814],
+ ["9EF3",0x9815],
+ ["9EF4",0x9823],
+ ["9EF5",0x9833],
+ ["9EF6",0x9868],
+ ["9EF7",0x98B7],
+ ["9EF8",0x98B9],
+ ["9EF9",0x98C7],
+ ["9EFA",0x98CA],
+ ["9EFB",0x98E0],
+ ["9EFC",0x98E1],
+ ["9EFD",0x98EC],
+ ["9EFE",0x98F5],
+ ["9F40",0x9D21],
+ ["9F41",0x9D34],
+ ["9F42",0x9D39],
+ ["9F43",0x9D49],
+ ["9F44",0x9D4E],
+ ["9F45",0x9D6D],
+ ["9F46",0x2237],
+ ["9F47",0x9D6E],
+ ["9F48",0x9D7C],
+ ["9F49",0x9D83],
+ ["9F4A",0x9D93],
+ ["9F4B",0x9DA5],
+ ["9F4C",0x222C],
+ ["9F4D",0x9DBD],
+ ["9F4E",0x6B81],
+ ["9F4F",0x6BB1],
+ ["9F50",0x9C4F],
+ ["9F51",0x9E90],
+ ["9F52",0x9DC0],
+ ["9F53",0xED91],
+ ["9F54",0xED92],
+ ["9F55",0x262F],
+ ["9F56",0x2630],
+ ["9F57",0x2637],
+ ["9F58",0x2633],
+ ["9F59",0x2634],
+ ["9F5A",0x2635],
+ ["9F5B",0x2632],
+ ["9F5C",0x2636],
+ ["9F5D",0x2631],
+ ["9F5E",0x9DC9],
+ ["9F5F",0x9DD4],
+ ["9F60",0x9DFC],
+ ["9F61",0x9E0A],
+ ["9F62",0x9E0C],
+ ["9F63",0x9E0E],
+ ["9F64",0x9E18],
+ ["9F65",0x9E7B],
+ ["9F66",0x9E85],
+ ["9F67",0x9EA2],
+ ["9F68",0x9EAC],
+ ["9F69",0x9EB1],
+ ["9F6A",0x9EC1],
+ ["9F6B",0x9EC6],
+ ["9F6C",0x9EC7],
+ ["9F6D",0x9EF1],
+ ["9F6E",0x9EF8],
+ ["9F6F",0x9F27],
+ ["9F70",0x990E],
+ ["9F71",0x9919],
+ ["9F72",0x991C],
+ ["9F73",0x9937],
+ ["9F74",0x995D],
+ ["9F75",0x9962],
+ ["9F76",0x999B],
+ ["9F77",0x99A4],
+ ["9F78",0x99AA],
+ ["9F79",0x99B8],
+ ["9F7A",0x99E0],
+ ["9F7B",0x99E6],
+ ["9F7C",0x99F5],
+ ["9F7D",0x9A1F],
+ ["9F7E",0x7DFE],
+ ["9FA1",0x7E07],
+ ["9FA2",0x7E5B],
+ ["9FA3",0x7E65],
+ ["9FA4",0x7E6C],
+ ["9FA5",0x7F37],
+ ["9FA6",0x7F40],
+ ["9FA7",0x7F41],
+ ["9FA8",0x7F49],
+ ["9FA9",0x7F52],
+ ["9FAA",0x7F8F],
+ ["9FAB",0x7F93],
+ ["9FAC",0x7FB4],
+ ["9FAD",0x7FDD],
+ ["9FAE",0x7FE7],
+ ["9FAF",0x7FFA],
+ ["9FB0",0x8002],
+ ["9FB1",0x8008],
+ ["9FB2",0x802E],
+ ["9FB3",0x802F],
+ ["9FB4",0x803C],
+ ["9FB5",0x80A7],
+ ["9FB6",0x810C],
+ ["9FB7",0x812A],
+ ["9FB8",0x8134],
+ ["9FB9",0x8142],
+ ["9FBA",0x8156],
+ ["9FBB",0x8184],
+ ["9FBC",0x81A5],
+ ["9FBD",0x81E4],
+ ["9FBE",0x8254],
+ ["9FBF",0x8265],
+ ["9FC0",0x827B],
+ ["9FC1",0x8287],
+ ["9FC2",0x82BF],
+ ["9FC3",0x82E2],
+ ["9FC4",0x82EE],
+ ["9FC5",0x82F8],
+ ["9FC6",0x82FC],
+ ["9FC7",0x82FF],
+ ["9FC8",0x830B],
+ ["9FC9",0x831D],
+ ["9FCA",0x833D],
+ ["9FCB",0x8357],
+ ["9FCC",0x8391],
+ ["9FCD",0x83AC],
+ ["9FCE",0x83CD],
+ ["9FCF",0x83ED],
+ ["9FD0",0x8405],
+ ["9FD1",0x8414],
+ ["9FD2",0x8416],
+ ["9FD3",0x8421],
+ ["9FD4",0x842E],
+ ["9FD5",0x843E],
+ ["9FD6",0x844A],
+ ["9FD7",0x8453],
+ ["9FD8",0x8455],
+ ["9FD9",0x8458],
+ ["9FDA",0x8464],
+ ["9FDB",0x8472],
+ ["9FDC",0x847F],
+ ["9FDD",0x8480],
+ ["9FDE",0x8492],
+ ["9FDF",0x8493],
+ ["9FE0",0x8496],
+ ["9FE1",0x84A3],
+ ["9FE2",0x84BE],
+ ["9FE3",0x84DE],
+ ["9FE4",0x84E1],
+ ["9FE5",0x84E2],
+ ["9FE6",0x84E4],
+ ["9FE7",0x84F8],
+ ["9FE8",0x8503],
+ ["9FE9",0x8505],
+ ["9FEA",0x8510],
+ ["9FEB",0x8533],
+ ["9FEC",0x2010],
+ ["9FED",0x8542],
+ ["9FEE",0x854C],
+ ["9FEF",0x8552],
+ ["9FF0",0x855F],
+ ["9FF1",0x856F],
+ ["9FF2",0x8570],
+ ["9FF3",0x8573],
+ ["9FF4",0x85D6],
+ ["9FF5",0x85E0],
+ ["9FF6",0x85EE],
+ ["9FF7",0x85FC],
+ ["9FF8",0x860D],
+ ["9FF9",0x860F],
+ ["9FFA",0x8614],
+ ["9FFB",0x8628],
+ ["9FFC",0x8642],
+ ["9FFD",0x8645],
+ ["9FFE",0x8672],
+ ["A040",0x889C],
+ ["A041",0x5B6D],
+ ["A042",0x8137],
+ ["A043",0xEE1E],
+ ["A044",0x9938],
+ ["A045",0x5572],
+ ["A046",0x556B],
+ ["A047",0xEE22],
+ ["A048",0x35CE],
+ ["A049",0x5571],
+ ["A04A",0x55BA],
+ ["A04B",0x55F1],
+ ["A04C",0x35D2],
+ ["A04D",0x55F0],
+ ["A04E",0x5605],
+ ["A04F",0x5622],
+ ["A050",0x562D],
+ ["A051",0x5643],
+ ["A052",0x561E],
+ ["A053",0x5692],
+ ["A054",0x7CCD],
+ ["A055",0x541A],
+ ["A056",0x5413],
+ ["A057",0x5497],
+ ["A058",0x66F1],
+ ["A059",0x7534],
+ ["A05A",0x544D],
+ ["A05B",0x56A4],
+ ["A05C",0x569F],
+ ["A05D",0x64D3],
+ ["A05E",0x632E],
+ ["A05F",0x63F8],
+ ["A060",0x651E],
+ ["A061",0x4E78],
+ ["A062",0x6BEA],
+ ["A063",0x6C32],
+ ["A064",0x6C3D],
+ ["A065",0x6C62],
+ ["A066",0x6CB2],
+ ["A067",0x6DF8],
+ ["A068",0x6E29],
+ ["A069",0x6E76],
+ ["A06A",0x6E82],
+ ["A06B",0x6E86],
+ ["A06C",0x6EBB],
+ ["A06D",0x6EDF],
+ ["A06E",0x6EE2],
+ ["A06F",0x6F11],
+ ["A070",0x6F24],
+ ["A071",0x6F74],
+ ["A072",0x6F91],
+ ["A073",0x6FB5],
+ ["A074",0x6FF3],
+ ["A075",0x6FF5],
+ ["A076",0x70BB],
+ ["A077",0x70C0],
+ ["A078",0x710F],
+ ["A079",0x2202],
+ ["A07A",0x7155],
+ ["A07B",0x7173],
+ ["A07C",0x717A],
+ ["A07D",0xEE58],
+ ["A07E",0x5223],
+ ["A0A1",0xEE5A],
+ ["A0A2",0x3451],
+ ["A0A3",0xEE5C],
+ ["A0A4",0x8FCC],
+ ["A0A5",0xEE5E],
+ ["A0A6",0xEE5F],
+ ["A0A7",0x00C0],
+ ["A0A8",0x00C8],
+ ["A0A9",0x00CC],
+ ["A0AA",0x00D2],
+ ["A0AB",0x00D9],
+ ["A0AC",0x00C1],
+ ["A0AD",0x00CD],
+ ["A0AE",0x00D3],
+ ["A0AF",0x00DA],
+ ["A0B0",0x0101],
+ ["A0B1",0x0113],
+ ["A0B2",0x012B],
+ ["A0B3",0x014D],
+ ["A0B4",0x016B],
+ ["A0B5",0x01D6],
+ ["A0B6",0x00C4],
+ ["A0B7",0x00CB],
+ ["A0B8",0x00CF],
+ ["A0B9",0x00D6],
+ ["A0BA",0x00DC],
+ ["A0BB",0x00C6],
+ ["A0BC",0x00C7],
+ ["A0BD",0x00D1],
+ ["A0BE",0x00C3],
+ ["A0BF",0x00D5],
+ ["A0C0",0x00E1],
+ ["A0C1",0x00E9],
+ ["A0C2",0x00ED],
+ ["A0C3",0x00F3],
+ ["A0C4",0x00FA],
+ ["A0C5",0x01D8],
+ ["A0C6",0x00E4],
+ ["A0C7",0x00EB],
+ ["A0C8",0x00EF],
+ ["A0C9",0x00F6],
+ ["A0CA",0x00FC],
+ ["A0CB",0x00E6],
+ ["A0CC",0x00E7],
+ ["A0CD",0x00F1],
+ ["A0CE",0x00E3],
+ ["A0CF",0x00F5],
+ ["A0D0",0x01CE],
+ ["A0D1",0x011B],
+ ["A0D2",0x01D0],
+ ["A0D3",0x01D2],
+ ["A0D4",0x01D4],
+ ["A0D5",0x01DA],
+ ["A0D6",0x00C5],
+ ["A0D7",0x00C9],
+ ["A0D8",0x7188],
+ ["A0D9",0x00D8],
+ ["A0DA",0x00D0],
+ ["A0DB",0x1EF2],
+ ["A0DC",0x00DE],
+ ["A0DD",0x00DF],
+ ["A0DE",0x00AA],
+ ["A0DF",0x00A1],
+ ["A0E0",0x00E0],
+ ["A0E1",0x00E8],
+ ["A0E2",0x00EC],
+ ["A0E3",0x00F2],
+ ["A0E4",0x00F9],
+ ["A0E5",0x01DC],
+ ["A0E6",0x00E5],
+ ["A0E7",0x7198],
+ ["A0E8",0x71D7],
+ ["A0E9",0x00F8],
+ ["A0EA",0x00F0],
+ ["A0EB",0x1EF3],
+ ["A0EC",0x00FE],
+ ["A0ED",0x00FF],
+ ["A0EE",0x00BA],
+ ["A0EF",0x00BF],
+ ["A0F0",0x00E2],
+ ["A0F1",0x00EA],
+ ["A0F2",0x00EE],
+ ["A0F3",0x00F4],
+ ["A0F4",0x00FB],
+ ["A0F5",0x71F5],
+ ["A0F6",0x00C2],
+ ["A0F7",0x00CA],
+ ["A0F8",0x00CE],
+ ["A0F9",0x00D4],
+ ["A0FA",0x00DB],
+ ["A0FB",0x00B8],
+ ["A0FC",0x00A4],
+ ["A0FD",0xEEB6],
+ ["A0FE",0x0192],
+ ["A140",0x3000],
+ ["A141",0xFF0C],
+ ["A142",0x3001],
+ ["A143",0x3002],
+ ["A144",0xFF0E],
+ ["A145",0x2027],
+ ["A146",0xFF1B],
+ ["A147",0xFF1A],
+ ["A148",0xFF1F],
+ ["A149",0xFF01],
+ ["A14A",0xFE30],
+ ["A14B",0x2026],
+ ["A14C",0x2025],
+ ["A14D",0xFE50],
+ ["A14E",0xFE51],
+ ["A14F",0xFE52],
+ ["A150",0x00B7],
+ ["A151",0xFE54],
+ ["A152",0xFE55],
+ ["A153",0xFE56],
+ ["A154",0xFE57],
+ ["A155",0xFF5C],
+ ["A156",0x2013],
+ ["A157",0xFE31],
+ ["A158",0x2014],
+ ["A159",0xFE33],
+ ["A15A",0x2574],
+ ["A15B",0xFE34],
+ ["A15C",0xFE4F],
+ ["A15D",0xFF08],
+ ["A15E",0xFF09],
+ ["A15F",0xFE35],
+ ["A160",0xFE36],
+ ["A161",0xFF5B],
+ ["A162",0xFF5D],
+ ["A163",0xFE37],
+ ["A164",0xFE38],
+ ["A165",0x3014],
+ ["A166",0x3015],
+ ["A167",0xFE39],
+ ["A168",0xFE3A],
+ ["A169",0x3010],
+ ["A16A",0x3011],
+ ["A16B",0xFE3B],
+ ["A16C",0xFE3C],
+ ["A16D",0x300A],
+ ["A16E",0x300B],
+ ["A16F",0xFE3D],
+ ["A170",0xFE3E],
+ ["A171",0x3008],
+ ["A172",0x3009],
+ ["A173",0xFE3F],
+ ["A174",0xFE40],
+ ["A175",0x300C],
+ ["A176",0x300D],
+ ["A177",0xFE41],
+ ["A178",0xFE42],
+ ["A179",0x300E],
+ ["A17A",0x300F],
+ ["A17B",0xFE43],
+ ["A17C",0xFE44],
+ ["A17D",0xFE59],
+ ["A17E",0xFE5A],
+ ["A1A1",0xFE5B],
+ ["A1A2",0xFE5C],
+ ["A1A3",0xFE5D],
+ ["A1A4",0xFE5E],
+ ["A1A5",0x2018],
+ ["A1A6",0x2019],
+ ["A1A7",0x201C],
+ ["A1A8",0x201D],
+ ["A1A9",0x301D],
+ ["A1AA",0x301E],
+ ["A1AB",0x2035],
+ ["A1AC",0x2032],
+ ["A1AD",0xFF03],
+ ["A1AE",0xFF06],
+ ["A1AF",0xFF0A],
+ ["A1B0",0x203B],
+ ["A1B1",0x00A7],
+ ["A1B2",0x3003],
+ ["A1B3",0x25CB],
+ ["A1B4",0x25CF],
+ ["A1B5",0x25B3],
+ ["A1B6",0x25B2],
+ ["A1B7",0x25CE],
+ ["A1B8",0x2606],
+ ["A1B9",0x2605],
+ ["A1BA",0x25C7],
+ ["A1BB",0x25C6],
+ ["A1BC",0x25A1],
+ ["A1BD",0x25A0],
+ ["A1BE",0x25BD],
+ ["A1BF",0x25BC],
+ ["A1C0",0x32A3],
+ ["A1C1",0x2105],
+ ["A1C2",0x00AF],
+ ["A1C3",0xFFE3],
+ ["A1C4",0xFF3F],
+ ["A1C5",0x02CD],
+ ["A1C6",0xFE49],
+ ["A1C7",0xFE4A],
+ ["A1C8",0xFE4D],
+ ["A1C9",0xFE4E],
+ ["A1CA",0xFE4B],
+ ["A1CB",0xFE4C],
+ ["A1CC",0xFE5F],
+ ["A1CD",0xFE60],
+ ["A1CE",0xFE61],
+ ["A1CF",0xFF0B],
+ ["A1D0",0xFF0D],
+ ["A1D1",0x00D7],
+ ["A1D2",0x00F7],
+ ["A1D3",0x00B1],
+ ["A1D4",0x221A],
+ ["A1D5",0xFF1C],
+ ["A1D6",0xFF1E],
+ ["A1D7",0xFF1D],
+ ["A1D8",0x2266],
+ ["A1D9",0x2267],
+ ["A1DA",0x2260],
+ ["A1DB",0x221E],
+ ["A1DC",0x2252],
+ ["A1DD",0x2261],
+ ["A1DE",0xFE62],
+ ["A1DF",0xFE63],
+ ["A1E0",0xFE64],
+ ["A1E1",0xFE65],
+ ["A1E2",0xFE66],
+ ["A1E3",0xFF5E],
+ ["A1E4",0x2229],
+ ["A1E5",0x222A],
+ ["A1E6",0x22A5],
+ ["A1E7",0x2220],
+ ["A1E8",0x221F],
+ ["A1E9",0x22BF],
+ ["A1EA",0x33D2],
+ ["A1EB",0x33D1],
+ ["A1EC",0x222B],
+ ["A1ED",0x222E],
+ ["A1EE",0x2235],
+ ["A1EF",0x2234],
+ ["A1F0",0x2640],
+ ["A1F1",0x2642],
+ ["A1F2",0x2295],
+ ["A1F3",0x2299],
+ ["A1F4",0x2191],
+ ["A1F5",0x2193],
+ ["A1F6",0x2190],
+ ["A1F7",0x2192],
+ ["A1F8",0x2196],
+ ["A1F9",0x2197],
+ ["A1FA",0x2199],
+ ["A1FB",0x2198],
+ ["A1FC",0x2225],
+ ["A1FD",0x2223],
+ ["A1FE",0xFF0F],
+ ["A240",0xFF3C],
+ ["A241",0x2215],
+ ["A242",0xFE68],
+ ["A243",0xFF04],
+ ["A244",0xFFE5],
+ ["A245",0x3012],
+ ["A246",0xFFE0],
+ ["A247",0xFFE1],
+ ["A248",0xFF05],
+ ["A249",0xFF20],
+ ["A24A",0x2103],
+ ["A24B",0x2109],
+ ["A24C",0xFE69],
+ ["A24D",0xFE6A],
+ ["A24E",0xFE6B],
+ ["A24F",0x33D5],
+ ["A250",0x339C],
+ ["A251",0x339D],
+ ["A252",0x339E],
+ ["A253",0x33CE],
+ ["A254",0x33A1],
+ ["A255",0x338E],
+ ["A256",0x338F],
+ ["A257",0x33C4],
+ ["A258",0x00B0],
+ ["A259",0x5159],
+ ["A25A",0x515B],
+ ["A25B",0x515E],
+ ["A25C",0x515D],
+ ["A25D",0x5161],
+ ["A25E",0x5163],
+ ["A25F",0x55E7],
+ ["A260",0x74E9],
+ ["A261",0x7CCE],
+ ["A262",0x2581],
+ ["A263",0x2582],
+ ["A264",0x2583],
+ ["A265",0x2584],
+ ["A266",0x2585],
+ ["A267",0x2586],
+ ["A268",0x2587],
+ ["A269",0x2588],
+ ["A26A",0x258F],
+ ["A26B",0x258E],
+ ["A26C",0x258D],
+ ["A26D",0x258C],
+ ["A26E",0x258B],
+ ["A26F",0x258A],
+ ["A270",0x2589],
+ ["A271",0x253C],
+ ["A272",0x2534],
+ ["A273",0x252C],
+ ["A274",0x2524],
+ ["A275",0x251C],
+ ["A276",0x2594],
+ ["A277",0x2500],
+ ["A278",0x2502],
+ ["A279",0x2595],
+ ["A27A",0x250C],
+ ["A27B",0x2510],
+ ["A27C",0x2514],
+ ["A27D",0x2518],
+ ["A27E",0x256D],
+ ["A2A1",0x256E],
+ ["A2A2",0x2570],
+ ["A2A3",0x256F],
+ ["A2A4",0x2550],
+ ["A2A5",0x255E],
+ ["A2A6",0x256A],
+ ["A2A7",0x2561],
+ ["A2A8",0x25E2],
+ ["A2A9",0x25E3],
+ ["A2AA",0x25E5],
+ ["A2AB",0x25E4],
+ ["A2AC",0x2571],
+ ["A2AD",0x2572],
+ ["A2AE",0x2573],
+ ["A2AF",0xFF10],
+ ["A2B0",0xFF11],
+ ["A2B1",0xFF12],
+ ["A2B2",0xFF13],
+ ["A2B3",0xFF14],
+ ["A2B4",0xFF15],
+ ["A2B5",0xFF16],
+ ["A2B6",0xFF17],
+ ["A2B7",0xFF18],
+ ["A2B8",0xFF19],
+ ["A2B9",0x2160],
+ ["A2BA",0x2161],
+ ["A2BB",0x2162],
+ ["A2BC",0x2163],
+ ["A2BD",0x2164],
+ ["A2BE",0x2165],
+ ["A2BF",0x2166],
+ ["A2C0",0x2167],
+ ["A2C1",0x2168],
+ ["A2C2",0x2169],
+ ["A2C3",0x3021],
+ ["A2C4",0x3022],
+ ["A2C5",0x3023],
+ ["A2C6",0x3024],
+ ["A2C7",0x3025],
+ ["A2C8",0x3026],
+ ["A2C9",0x3027],
+ ["A2CA",0x3028],
+ ["A2CB",0x3029],
+ ["A2CC",0x5341],
+ ["A2CD",0x5344],
+ ["A2CE",0x5345],
+ ["A2CF",0xFF21],
+ ["A2D0",0xFF22],
+ ["A2D1",0xFF23],
+ ["A2D2",0xFF24],
+ ["A2D3",0xFF25],
+ ["A2D4",0xFF26],
+ ["A2D5",0xFF27],
+ ["A2D6",0xFF28],
+ ["A2D7",0xFF29],
+ ["A2D8",0xFF2A],
+ ["A2D9",0xFF2B],
+ ["A2DA",0xFF2C],
+ ["A2DB",0xFF2D],
+ ["A2DC",0xFF2E],
+ ["A2DD",0xFF2F],
+ ["A2DE",0xFF30],
+ ["A2DF",0xFF31],
+ ["A2E0",0xFF32],
+ ["A2E1",0xFF33],
+ ["A2E2",0xFF34],
+ ["A2E3",0xFF35],
+ ["A2E4",0xFF36],
+ ["A2E5",0xFF37],
+ ["A2E6",0xFF38],
+ ["A2E7",0xFF39],
+ ["A2E8",0xFF3A],
+ ["A2E9",0xFF41],
+ ["A2EA",0xFF42],
+ ["A2EB",0xFF43],
+ ["A2EC",0xFF44],
+ ["A2ED",0xFF45],
+ ["A2EE",0xFF46],
+ ["A2EF",0xFF47],
+ ["A2F0",0xFF48],
+ ["A2F1",0xFF49],
+ ["A2F2",0xFF4A],
+ ["A2F3",0xFF4B],
+ ["A2F4",0xFF4C],
+ ["A2F5",0xFF4D],
+ ["A2F6",0xFF4E],
+ ["A2F7",0xFF4F],
+ ["A2F8",0xFF50],
+ ["A2F9",0xFF51],
+ ["A2FA",0xFF52],
+ ["A2FB",0xFF53],
+ ["A2FC",0xFF54],
+ ["A2FD",0xFF55],
+ ["A2FE",0xFF56],
+ ["A340",0xFF57],
+ ["A341",0xFF58],
+ ["A342",0xFF59],
+ ["A343",0xFF5A],
+ ["A344",0x0391],
+ ["A345",0x0392],
+ ["A346",0x0393],
+ ["A347",0x0394],
+ ["A348",0x0395],
+ ["A349",0x0396],
+ ["A34A",0x0397],
+ ["A34B",0x0398],
+ ["A34C",0x0399],
+ ["A34D",0x039A],
+ ["A34E",0x039B],
+ ["A34F",0x039C],
+ ["A350",0x039D],
+ ["A351",0x039E],
+ ["A352",0x039F],
+ ["A353",0x03A0],
+ ["A354",0x03A1],
+ ["A355",0x03A3],
+ ["A356",0x03A4],
+ ["A357",0x03A5],
+ ["A358",0x03A6],
+ ["A359",0x03A7],
+ ["A35A",0x03A8],
+ ["A35B",0x03A9],
+ ["A35C",0x03B1],
+ ["A35D",0x03B2],
+ ["A35E",0x03B3],
+ ["A35F",0x03B4],
+ ["A360",0x03B5],
+ ["A361",0x03B6],
+ ["A362",0x03B7],
+ ["A363",0x03B8],
+ ["A364",0x03B9],
+ ["A365",0x03BA],
+ ["A366",0x03BB],
+ ["A367",0x03BC],
+ ["A368",0x03BD],
+ ["A369",0x03BE],
+ ["A36A",0x03BF],
+ ["A36B",0x03C0],
+ ["A36C",0x03C1],
+ ["A36D",0x03C3],
+ ["A36E",0x03C4],
+ ["A36F",0x03C5],
+ ["A370",0x03C6],
+ ["A371",0x03C7],
+ ["A372",0x03C8],
+ ["A373",0x03C9],
+ ["A374",0x3105],
+ ["A375",0x3106],
+ ["A376",0x3107],
+ ["A377",0x3108],
+ ["A378",0x3109],
+ ["A379",0x310A],
+ ["A37A",0x310B],
+ ["A37B",0x310C],
+ ["A37C",0x310D],
+ ["A37D",0x310E],
+ ["A37E",0x310F],
+ ["A3A1",0x3110],
+ ["A3A2",0x3111],
+ ["A3A3",0x3112],
+ ["A3A4",0x3113],
+ ["A3A5",0x3114],
+ ["A3A6",0x3115],
+ ["A3A7",0x3116],
+ ["A3A8",0x3117],
+ ["A3A9",0x3118],
+ ["A3AA",0x3119],
+ ["A3AB",0x311A],
+ ["A3AC",0x311B],
+ ["A3AD",0x311C],
+ ["A3AE",0x311D],
+ ["A3AF",0x311E],
+ ["A3B0",0x311F],
+ ["A3B1",0x3120],
+ ["A3B2",0x3121],
+ ["A3B3",0x3122],
+ ["A3B4",0x3123],
+ ["A3B5",0x3124],
+ ["A3B6",0x3125],
+ ["A3B7",0x3126],
+ ["A3B8",0x3127],
+ ["A3B9",0x3128],
+ ["A3BA",0x3129],
+ ["A3BB",0x02D9],
+ ["A3BC",0x02C9],
+ ["A3BD",0x02CA],
+ ["A3BE",0x02C7],
+ ["A3BF",0x02CB],
+ ["A3C0",0x2400],
+ ["A3C1",0x2401],
+ ["A3C2",0x2402],
+ ["A3C3",0x2403],
+ ["A3C4",0x2404],
+ ["A3C5",0x2405],
+ ["A3C6",0x2406],
+ ["A3C7",0x2407],
+ ["A3C8",0x2408],
+ ["A3C9",0x2409],
+ ["A3CA",0x240A],
+ ["A3CB",0x240B],
+ ["A3CC",0x240C],
+ ["A3CD",0x240D],
+ ["A3CE",0x240E],
+ ["A3CF",0x240F],
+ ["A3D0",0x2410],
+ ["A3D1",0x2411],
+ ["A3D2",0x2412],
+ ["A3D3",0x2413],
+ ["A3D4",0x2414],
+ ["A3D5",0x2415],
+ ["A3D6",0x2416],
+ ["A3D7",0x2417],
+ ["A3D8",0x2418],
+ ["A3D9",0x2419],
+ ["A3DA",0x241A],
+ ["A3DB",0x241B],
+ ["A3DC",0x241C],
+ ["A3DD",0x241D],
+ ["A3DE",0x241E],
+ ["A3DF",0x241F],
+ ["A3E0",0x2421],
+ ["A3E1",0x20AC],
+ ["A3E2",0xF849],
+ ["A3E3",0xF84A],
+ ["A3E4",0xF84B],
+ ["A3E5",0xF84C],
+ ["A3E6",0xF84D],
+ ["A3E7",0xF84E],
+ ["A3E8",0xF84F],
+ ["A3E9",0xF850],
+ ["A3EA",0xF851],
+ ["A3EB",0xF852],
+ ["A3EC",0xF853],
+ ["A3ED",0xF854],
+ ["A3EE",0xF855],
+ ["A3EF",0xF856],
+ ["A3F0",0xF857],
+ ["A3F1",0xF858],
+ ["A3F2",0xF859],
+ ["A3F3",0xF85A],
+ ["A3F4",0xF85B],
+ ["A3F5",0xF85C],
+ ["A3F6",0xF85D],
+ ["A3F7",0xF85E],
+ ["A3F8",0xF85F],
+ ["A3F9",0xF860],
+ ["A3FA",0xF861],
+ ["A3FB",0xF862],
+ ["A3FC",0xF863],
+ ["A3FD",0xF864],
+ ["A3FE",0xF865],
+ ["A440",0x4E00],
+ ["A441",0x4E59],
+ ["A442",0x4E01],
+ ["A443",0x4E03],
+ ["A444",0x4E43],
+ ["A445",0x4E5D],
+ ["A446",0x4E86],
+ ["A447",0x4E8C],
+ ["A448",0x4EBA],
+ ["A449",0x513F],
+ ["A44A",0x5165],
+ ["A44B",0x516B],
+ ["A44C",0x51E0],
+ ["A44D",0x5200],
+ ["A44E",0x5201],
+ ["A44F",0x529B],
+ ["A450",0x5315],
+ ["A451",0x5341],
+ ["A452",0x535C],
+ ["A453",0x53C8],
+ ["A454",0x4E09],
+ ["A455",0x4E0B],
+ ["A456",0x4E08],
+ ["A457",0x4E0A],
+ ["A458",0x4E2B],
+ ["A459",0x4E38],
+ ["A45A",0x51E1],
+ ["A45B",0x4E45],
+ ["A45C",0x4E48],
+ ["A45D",0x4E5F],
+ ["A45E",0x4E5E],
+ ["A45F",0x4E8E],
+ ["A460",0x4EA1],
+ ["A461",0x5140],
+ ["A462",0x5203],
+ ["A463",0x52FA],
+ ["A464",0x5343],
+ ["A465",0x53C9],
+ ["A466",0x53E3],
+ ["A467",0x571F],
+ ["A468",0x58EB],
+ ["A469",0x5915],
+ ["A46A",0x5927],
+ ["A46B",0x5973],
+ ["A46C",0x5B50],
+ ["A46D",0x5B51],
+ ["A46E",0x5B53],
+ ["A46F",0x5BF8],
+ ["A470",0x5C0F],
+ ["A471",0x5C22],
+ ["A472",0x5C38],
+ ["A473",0x5C71],
+ ["A474",0x5DDD],
+ ["A475",0x5DE5],
+ ["A476",0x5DF1],
+ ["A477",0x5DF2],
+ ["A478",0x5DF3],
+ ["A479",0x5DFE],
+ ["A47A",0x5E72],
+ ["A47B",0x5EFE],
+ ["A47C",0x5F0B],
+ ["A47D",0x5F13],
+ ["A47E",0x624D],
+ ["A4A1",0x4E11],
+ ["A4A2",0x4E10],
+ ["A4A3",0x4E0D],
+ ["A4A4",0x4E2D],
+ ["A4A5",0x4E30],
+ ["A4A6",0x4E39],
+ ["A4A7",0x4E4B],
+ ["A4A8",0x5C39],
+ ["A4A9",0x4E88],
+ ["A4AA",0x4E91],
+ ["A4AB",0x4E95],
+ ["A4AC",0x4E92],
+ ["A4AD",0x4E94],
+ ["A4AE",0x4EA2],
+ ["A4AF",0x4EC1],
+ ["A4B0",0x4EC0],
+ ["A4B1",0x4EC3],
+ ["A4B2",0x4EC6],
+ ["A4B3",0x4EC7],
+ ["A4B4",0x4ECD],
+ ["A4B5",0x4ECA],
+ ["A4B6",0x4ECB],
+ ["A4B7",0x4EC4],
+ ["A4B8",0x5143],
+ ["A4B9",0x5141],
+ ["A4BA",0x5167],
+ ["A4BB",0x516D],
+ ["A4BC",0x516E],
+ ["A4BD",0x516C],
+ ["A4BE",0x5197],
+ ["A4BF",0x51F6],
+ ["A4C0",0x5206],
+ ["A4C1",0x5207],
+ ["A4C2",0x5208],
+ ["A4C3",0x52FB],
+ ["A4C4",0x52FE],
+ ["A4C5",0x52FF],
+ ["A4C6",0x5316],
+ ["A4C7",0x5339],
+ ["A4C8",0x5348],
+ ["A4C9",0x5347],
+ ["A4CA",0x5345],
+ ["A4CB",0x535E],
+ ["A4CC",0x5384],
+ ["A4CD",0x53CB],
+ ["A4CE",0x53CA],
+ ["A4CF",0x53CD],
+ ["A4D0",0x58EC],
+ ["A4D1",0x5929],
+ ["A4D2",0x592B],
+ ["A4D3",0x592A],
+ ["A4D4",0x592D],
+ ["A4D5",0x5B54],
+ ["A4D6",0x5C11],
+ ["A4D7",0x5C24],
+ ["A4D8",0x5C3A],
+ ["A4D9",0x5C6F],
+ ["A4DA",0x5DF4],
+ ["A4DB",0x5E7B],
+ ["A4DC",0x5EFF],
+ ["A4DD",0x5F14],
+ ["A4DE",0x5F15],
+ ["A4DF",0x5FC3],
+ ["A4E0",0x6208],
+ ["A4E1",0x6236],
+ ["A4E2",0x624B],
+ ["A4E3",0x624E],
+ ["A4E4",0x652F],
+ ["A4E5",0x6587],
+ ["A4E6",0x6597],
+ ["A4E7",0x65A4],
+ ["A4E8",0x65B9],
+ ["A4E9",0x65E5],
+ ["A4EA",0x66F0],
+ ["A4EB",0x6708],
+ ["A4EC",0x6728],
+ ["A4ED",0x6B20],
+ ["A4EE",0x6B62],
+ ["A4EF",0x6B79],
+ ["A4F0",0x6BCB],
+ ["A4F1",0x6BD4],
+ ["A4F2",0x6BDB],
+ ["A4F3",0x6C0F],
+ ["A4F4",0x6C34],
+ ["A4F5",0x706B],
+ ["A4F6",0x722A],
+ ["A4F7",0x7236],
+ ["A4F8",0x723B],
+ ["A4F9",0x7247],
+ ["A4FA",0x7259],
+ ["A4FB",0x725B],
+ ["A4FC",0x72AC],
+ ["A4FD",0x738B],
+ ["A4FE",0x4E19],
+ ["A540",0x4E16],
+ ["A541",0x4E15],
+ ["A542",0x4E14],
+ ["A543",0x4E18],
+ ["A544",0x4E3B],
+ ["A545",0x4E4D],
+ ["A546",0x4E4F],
+ ["A547",0x4E4E],
+ ["A548",0x4EE5],
+ ["A549",0x4ED8],
+ ["A54A",0x4ED4],
+ ["A54B",0x4ED5],
+ ["A54C",0x4ED6],
+ ["A54D",0x4ED7],
+ ["A54E",0x4EE3],
+ ["A54F",0x4EE4],
+ ["A550",0x4ED9],
+ ["A551",0x4EDE],
+ ["A552",0x5145],
+ ["A553",0x5144],
+ ["A554",0x5189],
+ ["A555",0x518A],
+ ["A556",0x51AC],
+ ["A557",0x51F9],
+ ["A558",0x51FA],
+ ["A559",0x51F8],
+ ["A55A",0x520A],
+ ["A55B",0x52A0],
+ ["A55C",0x529F],
+ ["A55D",0x5305],
+ ["A55E",0x5306],
+ ["A55F",0x5317],
+ ["A560",0x531D],
+ ["A561",0x4EDF],
+ ["A562",0x534A],
+ ["A563",0x5349],
+ ["A564",0x5361],
+ ["A565",0x5360],
+ ["A566",0x536F],
+ ["A567",0x536E],
+ ["A568",0x53BB],
+ ["A569",0x53EF],
+ ["A56A",0x53E4],
+ ["A56B",0x53F3],
+ ["A56C",0x53EC],
+ ["A56D",0x53EE],
+ ["A56E",0x53E9],
+ ["A56F",0x53E8],
+ ["A570",0x53FC],
+ ["A571",0x53F8],
+ ["A572",0x53F5],
+ ["A573",0x53EB],
+ ["A574",0x53E6],
+ ["A575",0x53EA],
+ ["A576",0x53F2],
+ ["A577",0x53F1],
+ ["A578",0x53F0],
+ ["A579",0x53E5],
+ ["A57A",0x53ED],
+ ["A57B",0x53FB],
+ ["A57C",0x56DB],
+ ["A57D",0x56DA],
+ ["A57E",0x5916],
+ ["A5A1",0x592E],
+ ["A5A2",0x5931],
+ ["A5A3",0x5974],
+ ["A5A4",0x5976],
+ ["A5A5",0x5B55],
+ ["A5A6",0x5B83],
+ ["A5A7",0x5C3C],
+ ["A5A8",0x5DE8],
+ ["A5A9",0x5DE7],
+ ["A5AA",0x5DE6],
+ ["A5AB",0x5E02],
+ ["A5AC",0x5E03],
+ ["A5AD",0x5E73],
+ ["A5AE",0x5E7C],
+ ["A5AF",0x5F01],
+ ["A5B0",0x5F18],
+ ["A5B1",0x5F17],
+ ["A5B2",0x5FC5],
+ ["A5B3",0x620A],
+ ["A5B4",0x6253],
+ ["A5B5",0x6254],
+ ["A5B6",0x6252],
+ ["A5B7",0x6251],
+ ["A5B8",0x65A5],
+ ["A5B9",0x65E6],
+ ["A5BA",0x672E],
+ ["A5BB",0x672C],
+ ["A5BC",0x672A],
+ ["A5BD",0x672B],
+ ["A5BE",0x672D],
+ ["A5BF",0x6B63],
+ ["A5C0",0x6BCD],
+ ["A5C1",0x6C11],
+ ["A5C2",0x6C10],
+ ["A5C3",0x6C38],
+ ["A5C4",0x6C41],
+ ["A5C5",0x6C40],
+ ["A5C6",0x6C3E],
+ ["A5C7",0x72AF],
+ ["A5C8",0x7384],
+ ["A5C9",0x7389],
+ ["A5CA",0x74DC],
+ ["A5CB",0x74E6],
+ ["A5CC",0x7518],
+ ["A5CD",0x751F],
+ ["A5CE",0x7528],
+ ["A5CF",0x7529],
+ ["A5D0",0x7530],
+ ["A5D1",0x7531],
+ ["A5D2",0x7532],
+ ["A5D3",0x7533],
+ ["A5D4",0x758B],
+ ["A5D5",0x767D],
+ ["A5D6",0x76AE],
+ ["A5D7",0x76BF],
+ ["A5D8",0x76EE],
+ ["A5D9",0x77DB],
+ ["A5DA",0x77E2],
+ ["A5DB",0x77F3],
+ ["A5DC",0x793A],
+ ["A5DD",0x79BE],
+ ["A5DE",0x7A74],
+ ["A5DF",0x7ACB],
+ ["A5E0",0x4E1E],
+ ["A5E1",0x4E1F],
+ ["A5E2",0x4E52],
+ ["A5E3",0x4E53],
+ ["A5E4",0x4E69],
+ ["A5E5",0x4E99],
+ ["A5E6",0x4EA4],
+ ["A5E7",0x4EA6],
+ ["A5E8",0x4EA5],
+ ["A5E9",0x4EFF],
+ ["A5EA",0x4F09],
+ ["A5EB",0x4F19],
+ ["A5EC",0x4F0A],
+ ["A5ED",0x4F15],
+ ["A5EE",0x4F0D],
+ ["A5EF",0x4F10],
+ ["A5F0",0x4F11],
+ ["A5F1",0x4F0F],
+ ["A5F2",0x4EF2],
+ ["A5F3",0x4EF6],
+ ["A5F4",0x4EFB],
+ ["A5F5",0x4EF0],
+ ["A5F6",0x4EF3],
+ ["A5F7",0x4EFD],
+ ["A5F8",0x4F01],
+ ["A5F9",0x4F0B],
+ ["A5FA",0x5149],
+ ["A5FB",0x5147],
+ ["A5FC",0x5146],
+ ["A5FD",0x5148],
+ ["A5FE",0x5168],
+ ["A640",0x5171],
+ ["A641",0x518D],
+ ["A642",0x51B0],
+ ["A643",0x5217],
+ ["A644",0x5211],
+ ["A645",0x5212],
+ ["A646",0x520E],
+ ["A647",0x5216],
+ ["A648",0x52A3],
+ ["A649",0x5308],
+ ["A64A",0x5321],
+ ["A64B",0x5320],
+ ["A64C",0x5370],
+ ["A64D",0x5371],
+ ["A64E",0x5409],
+ ["A64F",0x540F],
+ ["A650",0x540C],
+ ["A651",0x540A],
+ ["A652",0x5410],
+ ["A653",0x5401],
+ ["A654",0x540B],
+ ["A655",0x5404],
+ ["A656",0x5411],
+ ["A657",0x540D],
+ ["A658",0x5408],
+ ["A659",0x5403],
+ ["A65A",0x540E],
+ ["A65B",0x5406],
+ ["A65C",0x5412],
+ ["A65D",0x56E0],
+ ["A65E",0x56DE],
+ ["A65F",0x56DD],
+ ["A660",0x5733],
+ ["A661",0x5730],
+ ["A662",0x5728],
+ ["A663",0x572D],
+ ["A664",0x572C],
+ ["A665",0x572F],
+ ["A666",0x5729],
+ ["A667",0x5919],
+ ["A668",0x591A],
+ ["A669",0x5937],
+ ["A66A",0x5938],
+ ["A66B",0x5984],
+ ["A66C",0x5978],
+ ["A66D",0x5983],
+ ["A66E",0x597D],
+ ["A66F",0x5979],
+ ["A670",0x5982],
+ ["A671",0x5981],
+ ["A672",0x5B57],
+ ["A673",0x5B58],
+ ["A674",0x5B87],
+ ["A675",0x5B88],
+ ["A676",0x5B85],
+ ["A677",0x5B89],
+ ["A678",0x5BFA],
+ ["A679",0x5C16],
+ ["A67A",0x5C79],
+ ["A67B",0x5DDE],
+ ["A67C",0x5E06],
+ ["A67D",0x5E76],
+ ["A67E",0x5E74],
+ ["A6A1",0x5F0F],
+ ["A6A2",0x5F1B],
+ ["A6A3",0x5FD9],
+ ["A6A4",0x5FD6],
+ ["A6A5",0x620E],
+ ["A6A6",0x620C],
+ ["A6A7",0x620D],
+ ["A6A8",0x6210],
+ ["A6A9",0x6263],
+ ["A6AA",0x625B],
+ ["A6AB",0x6258],
+ ["A6AC",0x6536],
+ ["A6AD",0x65E9],
+ ["A6AE",0x65E8],
+ ["A6AF",0x65EC],
+ ["A6B0",0x65ED],
+ ["A6B1",0x66F2],
+ ["A6B2",0x66F3],
+ ["A6B3",0x6709],
+ ["A6B4",0x673D],
+ ["A6B5",0x6734],
+ ["A6B6",0x6731],
+ ["A6B7",0x6735],
+ ["A6B8",0x6B21],
+ ["A6B9",0x6B64],
+ ["A6BA",0x6B7B],
+ ["A6BB",0x6C16],
+ ["A6BC",0x6C5D],
+ ["A6BD",0x6C57],
+ ["A6BE",0x6C59],
+ ["A6BF",0x6C5F],
+ ["A6C0",0x6C60],
+ ["A6C1",0x6C50],
+ ["A6C2",0x6C55],
+ ["A6C3",0x6C61],
+ ["A6C4",0x6C5B],
+ ["A6C5",0x6C4D],
+ ["A6C6",0x6C4E],
+ ["A6C7",0x7070],
+ ["A6C8",0x725F],
+ ["A6C9",0x725D],
+ ["A6CA",0x767E],
+ ["A6CB",0x7AF9],
+ ["A6CC",0x7C73],
+ ["A6CD",0x7CF8],
+ ["A6CE",0x7F36],
+ ["A6CF",0x7F8A],
+ ["A6D0",0x7FBD],
+ ["A6D1",0x8001],
+ ["A6D2",0x8003],
+ ["A6D3",0x800C],
+ ["A6D4",0x8012],
+ ["A6D5",0x8033],
+ ["A6D6",0x807F],
+ ["A6D7",0x8089],
+ ["A6D8",0x808B],
+ ["A6D9",0x808C],
+ ["A6DA",0x81E3],
+ ["A6DB",0x81EA],
+ ["A6DC",0x81F3],
+ ["A6DD",0x81FC],
+ ["A6DE",0x820C],
+ ["A6DF",0x821B],
+ ["A6E0",0x821F],
+ ["A6E1",0x826E],
+ ["A6E2",0x8272],
+ ["A6E3",0x827E],
+ ["A6E4",0x866B],
+ ["A6E5",0x8840],
+ ["A6E6",0x884C],
+ ["A6E7",0x8863],
+ ["A6E8",0x897F],
+ ["A6E9",0x9621],
+ ["A6EA",0x4E32],
+ ["A6EB",0x4EA8],
+ ["A6EC",0x4F4D],
+ ["A6ED",0x4F4F],
+ ["A6EE",0x4F47],
+ ["A6EF",0x4F57],
+ ["A6F0",0x4F5E],
+ ["A6F1",0x4F34],
+ ["A6F2",0x4F5B],
+ ["A6F3",0x4F55],
+ ["A6F4",0x4F30],
+ ["A6F5",0x4F50],
+ ["A6F6",0x4F51],
+ ["A6F7",0x4F3D],
+ ["A6F8",0x4F3A],
+ ["A6F9",0x4F38],
+ ["A6FA",0x4F43],
+ ["A6FB",0x4F54],
+ ["A6FC",0x4F3C],
+ ["A6FD",0x4F46],
+ ["A6FE",0x4F63],
+ ["A740",0x4F5C],
+ ["A741",0x4F60],
+ ["A742",0x4F2F],
+ ["A743",0x4F4E],
+ ["A744",0x4F36],
+ ["A745",0x4F59],
+ ["A746",0x4F5D],
+ ["A747",0x4F48],
+ ["A748",0x4F5A],
+ ["A749",0x514C],
+ ["A74A",0x514B],
+ ["A74B",0x514D],
+ ["A74C",0x5175],
+ ["A74D",0x51B6],
+ ["A74E",0x51B7],
+ ["A74F",0x5225],
+ ["A750",0x5224],
+ ["A751",0x5229],
+ ["A752",0x522A],
+ ["A753",0x5228],
+ ["A754",0x52AB],
+ ["A755",0x52A9],
+ ["A756",0x52AA],
+ ["A757",0x52AC],
+ ["A758",0x5323],
+ ["A759",0x5373],
+ ["A75A",0x5375],
+ ["A75B",0x541D],
+ ["A75C",0x542D],
+ ["A75D",0x541E],
+ ["A75E",0x543E],
+ ["A75F",0x5426],
+ ["A760",0x544E],
+ ["A761",0x5427],
+ ["A762",0x5446],
+ ["A763",0x5443],
+ ["A764",0x5433],
+ ["A765",0x5448],
+ ["A766",0x5442],
+ ["A767",0x541B],
+ ["A768",0x5429],
+ ["A769",0x544A],
+ ["A76A",0x5439],
+ ["A76B",0x543B],
+ ["A76C",0x5438],
+ ["A76D",0x542E],
+ ["A76E",0x5435],
+ ["A76F",0x5436],
+ ["A770",0x5420],
+ ["A771",0x543C],
+ ["A772",0x5440],
+ ["A773",0x5431],
+ ["A774",0x542B],
+ ["A775",0x541F],
+ ["A776",0x542C],
+ ["A777",0x56EA],
+ ["A778",0x56F0],
+ ["A779",0x56E4],
+ ["A77A",0x56EB],
+ ["A77B",0x574A],
+ ["A77C",0x5751],
+ ["A77D",0x5740],
+ ["A77E",0x574D],
+ ["A7A1",0x5747],
+ ["A7A2",0x574E],
+ ["A7A3",0x573E],
+ ["A7A4",0x5750],
+ ["A7A5",0x574F],
+ ["A7A6",0x573B],
+ ["A7A7",0x58EF],
+ ["A7A8",0x593E],
+ ["A7A9",0x599D],
+ ["A7AA",0x5992],
+ ["A7AB",0x59A8],
+ ["A7AC",0x599E],
+ ["A7AD",0x59A3],
+ ["A7AE",0x5999],
+ ["A7AF",0x5996],
+ ["A7B0",0x598D],
+ ["A7B1",0x59A4],
+ ["A7B2",0x5993],
+ ["A7B3",0x598A],
+ ["A7B4",0x59A5],
+ ["A7B5",0x5B5D],
+ ["A7B6",0x5B5C],
+ ["A7B7",0x5B5A],
+ ["A7B8",0x5B5B],
+ ["A7B9",0x5B8C],
+ ["A7BA",0x5B8B],
+ ["A7BB",0x5B8F],
+ ["A7BC",0x5C2C],
+ ["A7BD",0x5C40],
+ ["A7BE",0x5C41],
+ ["A7BF",0x5C3F],
+ ["A7C0",0x5C3E],
+ ["A7C1",0x5C90],
+ ["A7C2",0x5C91],
+ ["A7C3",0x5C94],
+ ["A7C4",0x5C8C],
+ ["A7C5",0x5DEB],
+ ["A7C6",0x5E0C],
+ ["A7C7",0x5E8F],
+ ["A7C8",0x5E87],
+ ["A7C9",0x5E8A],
+ ["A7CA",0x5EF7],
+ ["A7CB",0x5F04],
+ ["A7CC",0x5F1F],
+ ["A7CD",0x5F64],
+ ["A7CE",0x5F62],
+ ["A7CF",0x5F77],
+ ["A7D0",0x5F79],
+ ["A7D1",0x5FD8],
+ ["A7D2",0x5FCC],
+ ["A7D3",0x5FD7],
+ ["A7D4",0x5FCD],
+ ["A7D5",0x5FF1],
+ ["A7D6",0x5FEB],
+ ["A7D7",0x5FF8],
+ ["A7D8",0x5FEA],
+ ["A7D9",0x6212],
+ ["A7DA",0x6211],
+ ["A7DB",0x6284],
+ ["A7DC",0x6297],
+ ["A7DD",0x6296],
+ ["A7DE",0x6280],
+ ["A7DF",0x6276],
+ ["A7E0",0x6289],
+ ["A7E1",0x626D],
+ ["A7E2",0x628A],
+ ["A7E3",0x627C],
+ ["A7E4",0x627E],
+ ["A7E5",0x6279],
+ ["A7E6",0x6273],
+ ["A7E7",0x6292],
+ ["A7E8",0x626F],
+ ["A7E9",0x6298],
+ ["A7EA",0x626E],
+ ["A7EB",0x6295],
+ ["A7EC",0x6293],
+ ["A7ED",0x6291],
+ ["A7EE",0x6286],
+ ["A7EF",0x6539],
+ ["A7F0",0x653B],
+ ["A7F1",0x6538],
+ ["A7F2",0x65F1],
+ ["A7F3",0x66F4],
+ ["A7F4",0x675F],
+ ["A7F5",0x674E],
+ ["A7F6",0x674F],
+ ["A7F7",0x6750],
+ ["A7F8",0x6751],
+ ["A7F9",0x675C],
+ ["A7FA",0x6756],
+ ["A7FB",0x675E],
+ ["A7FC",0x6749],
+ ["A7FD",0x6746],
+ ["A7FE",0x6760],
+ ["A840",0x6753],
+ ["A841",0x6757],
+ ["A842",0x6B65],
+ ["A843",0x6BCF],
+ ["A844",0x6C42],
+ ["A845",0x6C5E],
+ ["A846",0x6C99],
+ ["A847",0x6C81],
+ ["A848",0x6C88],
+ ["A849",0x6C89],
+ ["A84A",0x6C85],
+ ["A84B",0x6C9B],
+ ["A84C",0x6C6A],
+ ["A84D",0x6C7A],
+ ["A84E",0x6C90],
+ ["A84F",0x6C70],
+ ["A850",0x6C8C],
+ ["A851",0x6C68],
+ ["A852",0x6C96],
+ ["A853",0x6C92],
+ ["A854",0x6C7D],
+ ["A855",0x6C83],
+ ["A856",0x6C72],
+ ["A857",0x6C7E],
+ ["A858",0x6C74],
+ ["A859",0x6C86],
+ ["A85A",0x6C76],
+ ["A85B",0x6C8D],
+ ["A85C",0x6C94],
+ ["A85D",0x6C98],
+ ["A85E",0x6C82],
+ ["A85F",0x7076],
+ ["A860",0x707C],
+ ["A861",0x707D],
+ ["A862",0x7078],
+ ["A863",0x7262],
+ ["A864",0x7261],
+ ["A865",0x7260],
+ ["A866",0x72C4],
+ ["A867",0x72C2],
+ ["A868",0x7396],
+ ["A869",0x752C],
+ ["A86A",0x752B],
+ ["A86B",0x7537],
+ ["A86C",0x7538],
+ ["A86D",0x7682],
+ ["A86E",0x76EF],
+ ["A86F",0x77E3],
+ ["A870",0x79C1],
+ ["A871",0x79C0],
+ ["A872",0x79BF],
+ ["A873",0x7A76],
+ ["A874",0x7CFB],
+ ["A875",0x7F55],
+ ["A876",0x8096],
+ ["A877",0x8093],
+ ["A878",0x809D],
+ ["A879",0x8098],
+ ["A87A",0x809B],
+ ["A87B",0x809A],
+ ["A87C",0x80B2],
+ ["A87D",0x826F],
+ ["A87E",0x8292],
+ ["A8A1",0x828B],
+ ["A8A2",0x828D],
+ ["A8A3",0x898B],
+ ["A8A4",0x89D2],
+ ["A8A5",0x8A00],
+ ["A8A6",0x8C37],
+ ["A8A7",0x8C46],
+ ["A8A8",0x8C55],
+ ["A8A9",0x8C9D],
+ ["A8AA",0x8D64],
+ ["A8AB",0x8D70],
+ ["A8AC",0x8DB3],
+ ["A8AD",0x8EAB],
+ ["A8AE",0x8ECA],
+ ["A8AF",0x8F9B],
+ ["A8B0",0x8FB0],
+ ["A8B1",0x8FC2],
+ ["A8B2",0x8FC6],
+ ["A8B3",0x8FC5],
+ ["A8B4",0x8FC4],
+ ["A8B5",0x5DE1],
+ ["A8B6",0x9091],
+ ["A8B7",0x90A2],
+ ["A8B8",0x90AA],
+ ["A8B9",0x90A6],
+ ["A8BA",0x90A3],
+ ["A8BB",0x9149],
+ ["A8BC",0x91C6],
+ ["A8BD",0x91CC],
+ ["A8BE",0x9632],
+ ["A8BF",0x962E],
+ ["A8C0",0x9631],
+ ["A8C1",0x962A],
+ ["A8C2",0x962C],
+ ["A8C3",0x4E26],
+ ["A8C4",0x4E56],
+ ["A8C5",0x4E73],
+ ["A8C6",0x4E8B],
+ ["A8C7",0x4E9B],
+ ["A8C8",0x4E9E],
+ ["A8C9",0x4EAB],
+ ["A8CA",0x4EAC],
+ ["A8CB",0x4F6F],
+ ["A8CC",0x4F9D],
+ ["A8CD",0x4F8D],
+ ["A8CE",0x4F73],
+ ["A8CF",0x4F7F],
+ ["A8D0",0x4F6C],
+ ["A8D1",0x4F9B],
+ ["A8D2",0x4F8B],
+ ["A8D3",0x4F86],
+ ["A8D4",0x4F83],
+ ["A8D5",0x4F70],
+ ["A8D6",0x4F75],
+ ["A8D7",0x4F88],
+ ["A8D8",0x4F69],
+ ["A8D9",0x4F7B],
+ ["A8DA",0x4F96],
+ ["A8DB",0x4F7E],
+ ["A8DC",0x4F8F],
+ ["A8DD",0x4F91],
+ ["A8DE",0x4F7A],
+ ["A8DF",0x5154],
+ ["A8E0",0x5152],
+ ["A8E1",0x5155],
+ ["A8E2",0x5169],
+ ["A8E3",0x5177],
+ ["A8E4",0x5176],
+ ["A8E5",0x5178],
+ ["A8E6",0x51BD],
+ ["A8E7",0x51FD],
+ ["A8E8",0x523B],
+ ["A8E9",0x5238],
+ ["A8EA",0x5237],
+ ["A8EB",0x523A],
+ ["A8EC",0x5230],
+ ["A8ED",0x522E],
+ ["A8EE",0x5236],
+ ["A8EF",0x5241],
+ ["A8F0",0x52BE],
+ ["A8F1",0x52BB],
+ ["A8F2",0x5352],
+ ["A8F3",0x5354],
+ ["A8F4",0x5353],
+ ["A8F5",0x5351],
+ ["A8F6",0x5366],
+ ["A8F7",0x5377],
+ ["A8F8",0x5378],
+ ["A8F9",0x5379],
+ ["A8FA",0x53D6],
+ ["A8FB",0x53D4],
+ ["A8FC",0x53D7],
+ ["A8FD",0x5473],
+ ["A8FE",0x5475],
+ ["A940",0x5496],
+ ["A941",0x5478],
+ ["A942",0x5495],
+ ["A943",0x5480],
+ ["A944",0x547B],
+ ["A945",0x5477],
+ ["A946",0x5484],
+ ["A947",0x5492],
+ ["A948",0x5486],
+ ["A949",0x547C],
+ ["A94A",0x5490],
+ ["A94B",0x5471],
+ ["A94C",0x5476],
+ ["A94D",0x548C],
+ ["A94E",0x549A],
+ ["A94F",0x5462],
+ ["A950",0x5468],
+ ["A951",0x548B],
+ ["A952",0x547D],
+ ["A953",0x548E],
+ ["A954",0x56FA],
+ ["A955",0x5783],
+ ["A956",0x5777],
+ ["A957",0x576A],
+ ["A958",0x5769],
+ ["A959",0x5761],
+ ["A95A",0x5766],
+ ["A95B",0x5764],
+ ["A95C",0x577C],
+ ["A95D",0x591C],
+ ["A95E",0x5949],
+ ["A95F",0x5947],
+ ["A960",0x5948],
+ ["A961",0x5944],
+ ["A962",0x5954],
+ ["A963",0x59BE],
+ ["A964",0x59BB],
+ ["A965",0x59D4],
+ ["A966",0x59B9],
+ ["A967",0x59AE],
+ ["A968",0x59D1],
+ ["A969",0x59C6],
+ ["A96A",0x59D0],
+ ["A96B",0x59CD],
+ ["A96C",0x59CB],
+ ["A96D",0x59D3],
+ ["A96E",0x59CA],
+ ["A96F",0x59AF],
+ ["A970",0x59B3],
+ ["A971",0x59D2],
+ ["A972",0x59C5],
+ ["A973",0x5B5F],
+ ["A974",0x5B64],
+ ["A975",0x5B63],
+ ["A976",0x5B97],
+ ["A977",0x5B9A],
+ ["A978",0x5B98],
+ ["A979",0x5B9C],
+ ["A97A",0x5B99],
+ ["A97B",0x5B9B],
+ ["A97C",0x5C1A],
+ ["A97D",0x5C48],
+ ["A97E",0x5C45],
+ ["A9A1",0x5C46],
+ ["A9A2",0x5CB7],
+ ["A9A3",0x5CA1],
+ ["A9A4",0x5CB8],
+ ["A9A5",0x5CA9],
+ ["A9A6",0x5CAB],
+ ["A9A7",0x5CB1],
+ ["A9A8",0x5CB3],
+ ["A9A9",0x5E18],
+ ["A9AA",0x5E1A],
+ ["A9AB",0x5E16],
+ ["A9AC",0x5E15],
+ ["A9AD",0x5E1B],
+ ["A9AE",0x5E11],
+ ["A9AF",0x5E78],
+ ["A9B0",0x5E9A],
+ ["A9B1",0x5E97],
+ ["A9B2",0x5E9C],
+ ["A9B3",0x5E95],
+ ["A9B4",0x5E96],
+ ["A9B5",0x5EF6],
+ ["A9B6",0x5F26],
+ ["A9B7",0x5F27],
+ ["A9B8",0x5F29],
+ ["A9B9",0x5F80],
+ ["A9BA",0x5F81],
+ ["A9BB",0x5F7F],
+ ["A9BC",0x5F7C],
+ ["A9BD",0x5FDD],
+ ["A9BE",0x5FE0],
+ ["A9BF",0x5FFD],
+ ["A9C0",0x5FF5],
+ ["A9C1",0x5FFF],
+ ["A9C2",0x600F],
+ ["A9C3",0x6014],
+ ["A9C4",0x602F],
+ ["A9C5",0x6035],
+ ["A9C6",0x6016],
+ ["A9C7",0x602A],
+ ["A9C8",0x6015],
+ ["A9C9",0x6021],
+ ["A9CA",0x6027],
+ ["A9CB",0x6029],
+ ["A9CC",0x602B],
+ ["A9CD",0x601B],
+ ["A9CE",0x6216],
+ ["A9CF",0x6215],
+ ["A9D0",0x623F],
+ ["A9D1",0x623E],
+ ["A9D2",0x6240],
+ ["A9D3",0x627F],
+ ["A9D4",0x62C9],
+ ["A9D5",0x62CC],
+ ["A9D6",0x62C4],
+ ["A9D7",0x62BF],
+ ["A9D8",0x62C2],
+ ["A9D9",0x62B9],
+ ["A9DA",0x62D2],
+ ["A9DB",0x62DB],
+ ["A9DC",0x62AB],
+ ["A9DD",0x62D3],
+ ["A9DE",0x62D4],
+ ["A9DF",0x62CB],
+ ["A9E0",0x62C8],
+ ["A9E1",0x62A8],
+ ["A9E2",0x62BD],
+ ["A9E3",0x62BC],
+ ["A9E4",0x62D0],
+ ["A9E5",0x62D9],
+ ["A9E6",0x62C7],
+ ["A9E7",0x62CD],
+ ["A9E8",0x62B5],
+ ["A9E9",0x62DA],
+ ["A9EA",0x62B1],
+ ["A9EB",0x62D8],
+ ["A9EC",0x62D6],
+ ["A9ED",0x62D7],
+ ["A9EE",0x62C6],
+ ["A9EF",0x62AC],
+ ["A9F0",0x62CE],
+ ["A9F1",0x653E],
+ ["A9F2",0x65A7],
+ ["A9F3",0x65BC],
+ ["A9F4",0x65FA],
+ ["A9F5",0x6614],
+ ["A9F6",0x6613],
+ ["A9F7",0x660C],
+ ["A9F8",0x6606],
+ ["A9F9",0x6602],
+ ["A9FA",0x660E],
+ ["A9FB",0x6600],
+ ["A9FC",0x660F],
+ ["A9FD",0x6615],
+ ["A9FE",0x660A],
+ ["AA40",0x6607],
+ ["AA41",0x670D],
+ ["AA42",0x670B],
+ ["AA43",0x676D],
+ ["AA44",0x678B],
+ ["AA45",0x6795],
+ ["AA46",0x6771],
+ ["AA47",0x679C],
+ ["AA48",0x6773],
+ ["AA49",0x6777],
+ ["AA4A",0x6787],
+ ["AA4B",0x679D],
+ ["AA4C",0x6797],
+ ["AA4D",0x676F],
+ ["AA4E",0x6770],
+ ["AA4F",0x677F],
+ ["AA50",0x6789],
+ ["AA51",0x677E],
+ ["AA52",0x6790],
+ ["AA53",0x6775],
+ ["AA54",0x679A],
+ ["AA55",0x6793],
+ ["AA56",0x677C],
+ ["AA57",0x676A],
+ ["AA58",0x6772],
+ ["AA59",0x6B23],
+ ["AA5A",0x6B66],
+ ["AA5B",0x6B67],
+ ["AA5C",0x6B7F],
+ ["AA5D",0x6C13],
+ ["AA5E",0x6C1B],
+ ["AA5F",0x6CE3],
+ ["AA60",0x6CE8],
+ ["AA61",0x6CF3],
+ ["AA62",0x6CB1],
+ ["AA63",0x6CCC],
+ ["AA64",0x6CE5],
+ ["AA65",0x6CB3],
+ ["AA66",0x6CBD],
+ ["AA67",0x6CBE],
+ ["AA68",0x6CBC],
+ ["AA69",0x6CE2],
+ ["AA6A",0x6CAB],
+ ["AA6B",0x6CD5],
+ ["AA6C",0x6CD3],
+ ["AA6D",0x6CB8],
+ ["AA6E",0x6CC4],
+ ["AA6F",0x6CB9],
+ ["AA70",0x6CC1],
+ ["AA71",0x6CAE],
+ ["AA72",0x6CD7],
+ ["AA73",0x6CC5],
+ ["AA74",0x6CF1],
+ ["AA75",0x6CBF],
+ ["AA76",0x6CBB],
+ ["AA77",0x6CE1],
+ ["AA78",0x6CDB],
+ ["AA79",0x6CCA],
+ ["AA7A",0x6CAC],
+ ["AA7B",0x6CEF],
+ ["AA7C",0x6CDC],
+ ["AA7D",0x6CD6],
+ ["AA7E",0x6CE0],
+ ["AAA1",0x7095],
+ ["AAA2",0x708E],
+ ["AAA3",0x7092],
+ ["AAA4",0x708A],
+ ["AAA5",0x7099],
+ ["AAA6",0x722C],
+ ["AAA7",0x722D],
+ ["AAA8",0x7238],
+ ["AAA9",0x7248],
+ ["AAAA",0x7267],
+ ["AAAB",0x7269],
+ ["AAAC",0x72C0],
+ ["AAAD",0x72CE],
+ ["AAAE",0x72D9],
+ ["AAAF",0x72D7],
+ ["AAB0",0x72D0],
+ ["AAB1",0x73A9],
+ ["AAB2",0x73A8],
+ ["AAB3",0x739F],
+ ["AAB4",0x73AB],
+ ["AAB5",0x73A5],
+ ["AAB6",0x753D],
+ ["AAB7",0x759D],
+ ["AAB8",0x7599],
+ ["AAB9",0x759A],
+ ["AABA",0x7684],
+ ["AABB",0x76C2],
+ ["AABC",0x76F2],
+ ["AABD",0x76F4],
+ ["AABE",0x77E5],
+ ["AABF",0x77FD],
+ ["AAC0",0x793E],
+ ["AAC1",0x7940],
+ ["AAC2",0x7941],
+ ["AAC3",0x79C9],
+ ["AAC4",0x79C8],
+ ["AAC5",0x7A7A],
+ ["AAC6",0x7A79],
+ ["AAC7",0x7AFA],
+ ["AAC8",0x7CFE],
+ ["AAC9",0x7F54],
+ ["AACA",0x7F8C],
+ ["AACB",0x7F8B],
+ ["AACC",0x8005],
+ ["AACD",0x80BA],
+ ["AACE",0x80A5],
+ ["AACF",0x80A2],
+ ["AAD0",0x80B1],
+ ["AAD1",0x80A1],
+ ["AAD2",0x80AB],
+ ["AAD3",0x80A9],
+ ["AAD4",0x80B4],
+ ["AAD5",0x80AA],
+ ["AAD6",0x80AF],
+ ["AAD7",0x81E5],
+ ["AAD8",0x81FE],
+ ["AAD9",0x820D],
+ ["AADA",0x82B3],
+ ["AADB",0x829D],
+ ["AADC",0x8299],
+ ["AADD",0x82AD],
+ ["AADE",0x82BD],
+ ["AADF",0x829F],
+ ["AAE0",0x82B9],
+ ["AAE1",0x82B1],
+ ["AAE2",0x82AC],
+ ["AAE3",0x82A5],
+ ["AAE4",0x82AF],
+ ["AAE5",0x82B8],
+ ["AAE6",0x82A3],
+ ["AAE7",0x82B0],
+ ["AAE8",0x82BE],
+ ["AAE9",0x82B7],
+ ["AAEA",0x864E],
+ ["AAEB",0x8671],
+ ["AAEC",0x521D],
+ ["AAED",0x8868],
+ ["AAEE",0x8ECB],
+ ["AAEF",0x8FCE],
+ ["AAF0",0x8FD4],
+ ["AAF1",0x8FD1],
+ ["AAF2",0x90B5],
+ ["AAF3",0x90B8],
+ ["AAF4",0x90B1],
+ ["AAF5",0x90B6],
+ ["AAF6",0x91C7],
+ ["AAF7",0x91D1],
+ ["AAF8",0x9577],
+ ["AAF9",0x9580],
+ ["AAFA",0x961C],
+ ["AAFB",0x9640],
+ ["AAFC",0x963F],
+ ["AAFD",0x963B],
+ ["AAFE",0x9644],
+ ["AB40",0x9642],
+ ["AB41",0x96B9],
+ ["AB42",0x96E8],
+ ["AB43",0x9752],
+ ["AB44",0x975E],
+ ["AB45",0x4E9F],
+ ["AB46",0x4EAD],
+ ["AB47",0x4EAE],
+ ["AB48",0x4FE1],
+ ["AB49",0x4FB5],
+ ["AB4A",0x4FAF],
+ ["AB4B",0x4FBF],
+ ["AB4C",0x4FE0],
+ ["AB4D",0x4FD1],
+ ["AB4E",0x4FCF],
+ ["AB4F",0x4FDD],
+ ["AB50",0x4FC3],
+ ["AB51",0x4FB6],
+ ["AB52",0x4FD8],
+ ["AB53",0x4FDF],
+ ["AB54",0x4FCA],
+ ["AB55",0x4FD7],
+ ["AB56",0x4FAE],
+ ["AB57",0x4FD0],
+ ["AB58",0x4FC4],
+ ["AB59",0x4FC2],
+ ["AB5A",0x4FDA],
+ ["AB5B",0x4FCE],
+ ["AB5C",0x4FDE],
+ ["AB5D",0x4FB7],
+ ["AB5E",0x5157],
+ ["AB5F",0x5192],
+ ["AB60",0x5191],
+ ["AB61",0x51A0],
+ ["AB62",0x524E],
+ ["AB63",0x5243],
+ ["AB64",0x524A],
+ ["AB65",0x524D],
+ ["AB66",0x524C],
+ ["AB67",0x524B],
+ ["AB68",0x5247],
+ ["AB69",0x52C7],
+ ["AB6A",0x52C9],
+ ["AB6B",0x52C3],
+ ["AB6C",0x52C1],
+ ["AB6D",0x530D],
+ ["AB6E",0x5357],
+ ["AB6F",0x537B],
+ ["AB70",0x539A],
+ ["AB71",0x53DB],
+ ["AB72",0x54AC],
+ ["AB73",0x54C0],
+ ["AB74",0x54A8],
+ ["AB75",0x54CE],
+ ["AB76",0x54C9],
+ ["AB77",0x54B8],
+ ["AB78",0x54A6],
+ ["AB79",0x54B3],
+ ["AB7A",0x54C7],
+ ["AB7B",0x54C2],
+ ["AB7C",0x54BD],
+ ["AB7D",0x54AA],
+ ["AB7E",0x54C1],
+ ["ABA1",0x54C4],
+ ["ABA2",0x54C8],
+ ["ABA3",0x54AF],
+ ["ABA4",0x54AB],
+ ["ABA5",0x54B1],
+ ["ABA6",0x54BB],
+ ["ABA7",0x54A9],
+ ["ABA8",0x54A7],
+ ["ABA9",0x54BF],
+ ["ABAA",0x56FF],
+ ["ABAB",0x5782],
+ ["ABAC",0x578B],
+ ["ABAD",0x57A0],
+ ["ABAE",0x57A3],
+ ["ABAF",0x57A2],
+ ["ABB0",0x57CE],
+ ["ABB1",0x57AE],
+ ["ABB2",0x5793],
+ ["ABB3",0x5955],
+ ["ABB4",0x5951],
+ ["ABB5",0x594F],
+ ["ABB6",0x594E],
+ ["ABB7",0x5950],
+ ["ABB8",0x59DC],
+ ["ABB9",0x59D8],
+ ["ABBA",0x59FF],
+ ["ABBB",0x59E3],
+ ["ABBC",0x59E8],
+ ["ABBD",0x5A03],
+ ["ABBE",0x59E5],
+ ["ABBF",0x59EA],
+ ["ABC0",0x59DA],
+ ["ABC1",0x59E6],
+ ["ABC2",0x5A01],
+ ["ABC3",0x59FB],
+ ["ABC4",0x5B69],
+ ["ABC5",0x5BA3],
+ ["ABC6",0x5BA6],
+ ["ABC7",0x5BA4],
+ ["ABC8",0x5BA2],
+ ["ABC9",0x5BA5],
+ ["ABCA",0x5C01],
+ ["ABCB",0x5C4E],
+ ["ABCC",0x5C4F],
+ ["ABCD",0x5C4D],
+ ["ABCE",0x5C4B],
+ ["ABCF",0x5CD9],
+ ["ABD0",0x5CD2],
+ ["ABD1",0x5DF7],
+ ["ABD2",0x5E1D],
+ ["ABD3",0x5E25],
+ ["ABD4",0x5E1F],
+ ["ABD5",0x5E7D],
+ ["ABD6",0x5EA0],
+ ["ABD7",0x5EA6],
+ ["ABD8",0x5EFA],
+ ["ABD9",0x5F08],
+ ["ABDA",0x5F2D],
+ ["ABDB",0x5F65],
+ ["ABDC",0x5F88],
+ ["ABDD",0x5F85],
+ ["ABDE",0x5F8A],
+ ["ABDF",0x5F8B],
+ ["ABE0",0x5F87],
+ ["ABE1",0x5F8C],
+ ["ABE2",0x5F89],
+ ["ABE3",0x6012],
+ ["ABE4",0x601D],
+ ["ABE5",0x6020],
+ ["ABE6",0x6025],
+ ["ABE7",0x600E],
+ ["ABE8",0x6028],
+ ["ABE9",0x604D],
+ ["ABEA",0x6070],
+ ["ABEB",0x6068],
+ ["ABEC",0x6062],
+ ["ABED",0x6046],
+ ["ABEE",0x6043],
+ ["ABEF",0x606C],
+ ["ABF0",0x606B],
+ ["ABF1",0x606A],
+ ["ABF2",0x6064],
+ ["ABF3",0x6241],
+ ["ABF4",0x62DC],
+ ["ABF5",0x6316],
+ ["ABF6",0x6309],
+ ["ABF7",0x62FC],
+ ["ABF8",0x62ED],
+ ["ABF9",0x6301],
+ ["ABFA",0x62EE],
+ ["ABFB",0x62FD],
+ ["ABFC",0x6307],
+ ["ABFD",0x62F1],
+ ["ABFE",0x62F7],
+ ["AC40",0x62EF],
+ ["AC41",0x62EC],
+ ["AC42",0x62FE],
+ ["AC43",0x62F4],
+ ["AC44",0x6311],
+ ["AC45",0x6302],
+ ["AC46",0x653F],
+ ["AC47",0x6545],
+ ["AC48",0x65AB],
+ ["AC49",0x65BD],
+ ["AC4A",0x65E2],
+ ["AC4B",0x6625],
+ ["AC4C",0x662D],
+ ["AC4D",0x6620],
+ ["AC4E",0x6627],
+ ["AC4F",0x662F],
+ ["AC50",0x661F],
+ ["AC51",0x6628],
+ ["AC52",0x6631],
+ ["AC53",0x6624],
+ ["AC54",0x66F7],
+ ["AC55",0x67FF],
+ ["AC56",0x67D3],
+ ["AC57",0x67F1],
+ ["AC58",0x67D4],
+ ["AC59",0x67D0],
+ ["AC5A",0x67EC],
+ ["AC5B",0x67B6],
+ ["AC5C",0x67AF],
+ ["AC5D",0x67F5],
+ ["AC5E",0x67E9],
+ ["AC5F",0x67EF],
+ ["AC60",0x67C4],
+ ["AC61",0x67D1],
+ ["AC62",0x67B4],
+ ["AC63",0x67DA],
+ ["AC64",0x67E5],
+ ["AC65",0x67B8],
+ ["AC66",0x67CF],
+ ["AC67",0x67DE],
+ ["AC68",0x67F3],
+ ["AC69",0x67B0],
+ ["AC6A",0x67D9],
+ ["AC6B",0x67E2],
+ ["AC6C",0x67DD],
+ ["AC6D",0x67D2],
+ ["AC6E",0x6B6A],
+ ["AC6F",0x6B83],
+ ["AC70",0x6B86],
+ ["AC71",0x6BB5],
+ ["AC72",0x6BD2],
+ ["AC73",0x6BD7],
+ ["AC74",0x6C1F],
+ ["AC75",0x6CC9],
+ ["AC76",0x6D0B],
+ ["AC77",0x6D32],
+ ["AC78",0x6D2A],
+ ["AC79",0x6D41],
+ ["AC7A",0x6D25],
+ ["AC7B",0x6D0C],
+ ["AC7C",0x6D31],
+ ["AC7D",0x6D1E],
+ ["AC7E",0x6D17],
+ ["ACA1",0x6D3B],
+ ["ACA2",0x6D3D],
+ ["ACA3",0x6D3E],
+ ["ACA4",0x6D36],
+ ["ACA5",0x6D1B],
+ ["ACA6",0x6CF5],
+ ["ACA7",0x6D39],
+ ["ACA8",0x6D27],
+ ["ACA9",0x6D38],
+ ["ACAA",0x6D29],
+ ["ACAB",0x6D2E],
+ ["ACAC",0x6D35],
+ ["ACAD",0x6D0E],
+ ["ACAE",0x6D2B],
+ ["ACAF",0x70AB],
+ ["ACB0",0x70BA],
+ ["ACB1",0x70B3],
+ ["ACB2",0x70AC],
+ ["ACB3",0x70AF],
+ ["ACB4",0x70AD],
+ ["ACB5",0x70B8],
+ ["ACB6",0x70AE],
+ ["ACB7",0x70A4],
+ ["ACB8",0x7230],
+ ["ACB9",0x7272],
+ ["ACBA",0x726F],
+ ["ACBB",0x7274],
+ ["ACBC",0x72E9],
+ ["ACBD",0x72E0],
+ ["ACBE",0x72E1],
+ ["ACBF",0x73B7],
+ ["ACC0",0x73CA],
+ ["ACC1",0x73BB],
+ ["ACC2",0x73B2],
+ ["ACC3",0x73CD],
+ ["ACC4",0x73C0],
+ ["ACC5",0x73B3],
+ ["ACC6",0x751A],
+ ["ACC7",0x752D],
+ ["ACC8",0x754F],
+ ["ACC9",0x754C],
+ ["ACCA",0x754E],
+ ["ACCB",0x754B],
+ ["ACCC",0x75AB],
+ ["ACCD",0x75A4],
+ ["ACCE",0x75A5],
+ ["ACCF",0x75A2],
+ ["ACD0",0x75A3],
+ ["ACD1",0x7678],
+ ["ACD2",0x7686],
+ ["ACD3",0x7687],
+ ["ACD4",0x7688],
+ ["ACD5",0x76C8],
+ ["ACD6",0x76C6],
+ ["ACD7",0x76C3],
+ ["ACD8",0x76C5],
+ ["ACD9",0x7701],
+ ["ACDA",0x76F9],
+ ["ACDB",0x76F8],
+ ["ACDC",0x7709],
+ ["ACDD",0x770B],
+ ["ACDE",0x76FE],
+ ["ACDF",0x76FC],
+ ["ACE0",0x7707],
+ ["ACE1",0x77DC],
+ ["ACE2",0x7802],
+ ["ACE3",0x7814],
+ ["ACE4",0x780C],
+ ["ACE5",0x780D],
+ ["ACE6",0x7946],
+ ["ACE7",0x7949],
+ ["ACE8",0x7948],
+ ["ACE9",0x7947],
+ ["ACEA",0x79B9],
+ ["ACEB",0x79BA],
+ ["ACEC",0x79D1],
+ ["ACED",0x79D2],
+ ["ACEE",0x79CB],
+ ["ACEF",0x7A7F],
+ ["ACF0",0x7A81],
+ ["ACF1",0x7AFF],
+ ["ACF2",0x7AFD],
+ ["ACF3",0x7C7D],
+ ["ACF4",0x7D02],
+ ["ACF5",0x7D05],
+ ["ACF6",0x7D00],
+ ["ACF7",0x7D09],
+ ["ACF8",0x7D07],
+ ["ACF9",0x7D04],
+ ["ACFA",0x7D06],
+ ["ACFB",0x7F38],
+ ["ACFC",0x7F8E],
+ ["ACFD",0x7FBF],
+ ["ACFE",0x8004],
+ ["AD40",0x8010],
+ ["AD41",0x800D],
+ ["AD42",0x8011],
+ ["AD43",0x8036],
+ ["AD44",0x80D6],
+ ["AD45",0x80E5],
+ ["AD46",0x80DA],
+ ["AD47",0x80C3],
+ ["AD48",0x80C4],
+ ["AD49",0x80CC],
+ ["AD4A",0x80E1],
+ ["AD4B",0x80DB],
+ ["AD4C",0x80CE],
+ ["AD4D",0x80DE],
+ ["AD4E",0x80E4],
+ ["AD4F",0x80DD],
+ ["AD50",0x81F4],
+ ["AD51",0x8222],
+ ["AD52",0x82E7],
+ ["AD53",0x8303],
+ ["AD54",0x8305],
+ ["AD55",0x82E3],
+ ["AD56",0x82DB],
+ ["AD57",0x82E6],
+ ["AD58",0x8304],
+ ["AD59",0x82E5],
+ ["AD5A",0x8302],
+ ["AD5B",0x8309],
+ ["AD5C",0x82D2],
+ ["AD5D",0x82D7],
+ ["AD5E",0x82F1],
+ ["AD5F",0x8301],
+ ["AD60",0x82DC],
+ ["AD61",0x82D4],
+ ["AD62",0x82D1],
+ ["AD63",0x82DE],
+ ["AD64",0x82D3],
+ ["AD65",0x82DF],
+ ["AD66",0x82EF],
+ ["AD67",0x8306],
+ ["AD68",0x8650],
+ ["AD69",0x8679],
+ ["AD6A",0x867B],
+ ["AD6B",0x867A],
+ ["AD6C",0x884D],
+ ["AD6D",0x886B],
+ ["AD6E",0x8981],
+ ["AD6F",0x89D4],
+ ["AD70",0x8A08],
+ ["AD71",0x8A02],
+ ["AD72",0x8A03],
+ ["AD73",0x8C9E],
+ ["AD74",0x8CA0],
+ ["AD75",0x8D74],
+ ["AD76",0x8D73],
+ ["AD77",0x8DB4],
+ ["AD78",0x8ECD],
+ ["AD79",0x8ECC],
+ ["AD7A",0x8FF0],
+ ["AD7B",0x8FE6],
+ ["AD7C",0x8FE2],
+ ["AD7D",0x8FEA],
+ ["AD7E",0x8FE5],
+ ["ADA1",0x8FED],
+ ["ADA2",0x8FEB],
+ ["ADA3",0x8FE4],
+ ["ADA4",0x8FE8],
+ ["ADA5",0x90CA],
+ ["ADA6",0x90CE],
+ ["ADA7",0x90C1],
+ ["ADA8",0x90C3],
+ ["ADA9",0x914B],
+ ["ADAA",0x914A],
+ ["ADAB",0x91CD],
+ ["ADAC",0x9582],
+ ["ADAD",0x9650],
+ ["ADAE",0x964B],
+ ["ADAF",0x964C],
+ ["ADB0",0x964D],
+ ["ADB1",0x9762],
+ ["ADB2",0x9769],
+ ["ADB3",0x97CB],
+ ["ADB4",0x97ED],
+ ["ADB5",0x97F3],
+ ["ADB6",0x9801],
+ ["ADB7",0x98A8],
+ ["ADB8",0x98DB],
+ ["ADB9",0x98DF],
+ ["ADBA",0x9996],
+ ["ADBB",0x9999],
+ ["ADBC",0x4E58],
+ ["ADBD",0x4EB3],
+ ["ADBE",0x500C],
+ ["ADBF",0x500D],
+ ["ADC0",0x5023],
+ ["ADC1",0x4FEF],
+ ["ADC2",0x5026],
+ ["ADC3",0x5025],
+ ["ADC4",0x4FF8],
+ ["ADC5",0x5029],
+ ["ADC6",0x5016],
+ ["ADC7",0x5006],
+ ["ADC8",0x503C],
+ ["ADC9",0x501F],
+ ["ADCA",0x501A],
+ ["ADCB",0x5012],
+ ["ADCC",0x5011],
+ ["ADCD",0x4FFA],
+ ["ADCE",0x5000],
+ ["ADCF",0x5014],
+ ["ADD0",0x5028],
+ ["ADD1",0x4FF1],
+ ["ADD2",0x5021],
+ ["ADD3",0x500B],
+ ["ADD4",0x5019],
+ ["ADD5",0x5018],
+ ["ADD6",0x4FF3],
+ ["ADD7",0x4FEE],
+ ["ADD8",0x502D],
+ ["ADD9",0x502A],
+ ["ADDA",0x4FFE],
+ ["ADDB",0x502B],
+ ["ADDC",0x5009],
+ ["ADDD",0x517C],
+ ["ADDE",0x51A4],
+ ["ADDF",0x51A5],
+ ["ADE0",0x51A2],
+ ["ADE1",0x51CD],
+ ["ADE2",0x51CC],
+ ["ADE3",0x51C6],
+ ["ADE4",0x51CB],
+ ["ADE5",0x5256],
+ ["ADE6",0x525C],
+ ["ADE7",0x5254],
+ ["ADE8",0x525B],
+ ["ADE9",0x525D],
+ ["ADEA",0x532A],
+ ["ADEB",0x537F],
+ ["ADEC",0x539F],
+ ["ADED",0x539D],
+ ["ADEE",0x53DF],
+ ["ADEF",0x54E8],
+ ["ADF0",0x5510],
+ ["ADF1",0x5501],
+ ["ADF2",0x5537],
+ ["ADF3",0x54FC],
+ ["ADF4",0x54E5],
+ ["ADF5",0x54F2],
+ ["ADF6",0x5506],
+ ["ADF7",0x54FA],
+ ["ADF8",0x5514],
+ ["ADF9",0x54E9],
+ ["ADFA",0x54ED],
+ ["ADFB",0x54E1],
+ ["ADFC",0x5509],
+ ["ADFD",0x54EE],
+ ["ADFE",0x54EA],
+ ["AE40",0x54E6],
+ ["AE41",0x5527],
+ ["AE42",0x5507],
+ ["AE43",0x54FD],
+ ["AE44",0x550F],
+ ["AE45",0x5703],
+ ["AE46",0x5704],
+ ["AE47",0x57C2],
+ ["AE48",0x57D4],
+ ["AE49",0x57CB],
+ ["AE4A",0x57C3],
+ ["AE4B",0x5809],
+ ["AE4C",0x590F],
+ ["AE4D",0x5957],
+ ["AE4E",0x5958],
+ ["AE4F",0x595A],
+ ["AE50",0x5A11],
+ ["AE51",0x5A18],
+ ["AE52",0x5A1C],
+ ["AE53",0x5A1F],
+ ["AE54",0x5A1B],
+ ["AE55",0x5A13],
+ ["AE56",0x59EC],
+ ["AE57",0x5A20],
+ ["AE58",0x5A23],
+ ["AE59",0x5A29],
+ ["AE5A",0x5A25],
+ ["AE5B",0x5A0C],
+ ["AE5C",0x5A09],
+ ["AE5D",0x5B6B],
+ ["AE5E",0x5C58],
+ ["AE5F",0x5BB0],
+ ["AE60",0x5BB3],
+ ["AE61",0x5BB6],
+ ["AE62",0x5BB4],
+ ["AE63",0x5BAE],
+ ["AE64",0x5BB5],
+ ["AE65",0x5BB9],
+ ["AE66",0x5BB8],
+ ["AE67",0x5C04],
+ ["AE68",0x5C51],
+ ["AE69",0x5C55],
+ ["AE6A",0x5C50],
+ ["AE6B",0x5CED],
+ ["AE6C",0x5CFD],
+ ["AE6D",0x5CFB],
+ ["AE6E",0x5CEA],
+ ["AE6F",0x5CE8],
+ ["AE70",0x5CF0],
+ ["AE71",0x5CF6],
+ ["AE72",0x5D01],
+ ["AE73",0x5CF4],
+ ["AE74",0x5DEE],
+ ["AE75",0x5E2D],
+ ["AE76",0x5E2B],
+ ["AE77",0x5EAB],
+ ["AE78",0x5EAD],
+ ["AE79",0x5EA7],
+ ["AE7A",0x5F31],
+ ["AE7B",0x5F92],
+ ["AE7C",0x5F91],
+ ["AE7D",0x5F90],
+ ["AE7E",0x6059],
+ ["AEA1",0x6063],
+ ["AEA2",0x6065],
+ ["AEA3",0x6050],
+ ["AEA4",0x6055],
+ ["AEA5",0x606D],
+ ["AEA6",0x6069],
+ ["AEA7",0x606F],
+ ["AEA8",0x6084],
+ ["AEA9",0x609F],
+ ["AEAA",0x609A],
+ ["AEAB",0x608D],
+ ["AEAC",0x6094],
+ ["AEAD",0x608C],
+ ["AEAE",0x6085],
+ ["AEAF",0x6096],
+ ["AEB0",0x6247],
+ ["AEB1",0x62F3],
+ ["AEB2",0x6308],
+ ["AEB3",0x62FF],
+ ["AEB4",0x634E],
+ ["AEB5",0x633E],
+ ["AEB6",0x632F],
+ ["AEB7",0x6355],
+ ["AEB8",0x6342],
+ ["AEB9",0x6346],
+ ["AEBA",0x634F],
+ ["AEBB",0x6349],
+ ["AEBC",0x633A],
+ ["AEBD",0x6350],
+ ["AEBE",0x633D],
+ ["AEBF",0x632A],
+ ["AEC0",0x632B],
+ ["AEC1",0x6328],
+ ["AEC2",0x634D],
+ ["AEC3",0x634C],
+ ["AEC4",0x6548],
+ ["AEC5",0x6549],
+ ["AEC6",0x6599],
+ ["AEC7",0x65C1],
+ ["AEC8",0x65C5],
+ ["AEC9",0x6642],
+ ["AECA",0x6649],
+ ["AECB",0x664F],
+ ["AECC",0x6643],
+ ["AECD",0x6652],
+ ["AECE",0x664C],
+ ["AECF",0x6645],
+ ["AED0",0x6641],
+ ["AED1",0x66F8],
+ ["AED2",0x6714],
+ ["AED3",0x6715],
+ ["AED4",0x6717],
+ ["AED5",0x6821],
+ ["AED6",0x6838],
+ ["AED7",0x6848],
+ ["AED8",0x6846],
+ ["AED9",0x6853],
+ ["AEDA",0x6839],
+ ["AEDB",0x6842],
+ ["AEDC",0x6854],
+ ["AEDD",0x6829],
+ ["AEDE",0x68B3],
+ ["AEDF",0x6817],
+ ["AEE0",0x684C],
+ ["AEE1",0x6851],
+ ["AEE2",0x683D],
+ ["AEE3",0x67F4],
+ ["AEE4",0x6850],
+ ["AEE5",0x6840],
+ ["AEE6",0x683C],
+ ["AEE7",0x6843],
+ ["AEE8",0x682A],
+ ["AEE9",0x6845],
+ ["AEEA",0x6813],
+ ["AEEB",0x6818],
+ ["AEEC",0x6841],
+ ["AEED",0x6B8A],
+ ["AEEE",0x6B89],
+ ["AEEF",0x6BB7],
+ ["AEF0",0x6C23],
+ ["AEF1",0x6C27],
+ ["AEF2",0x6C28],
+ ["AEF3",0x6C26],
+ ["AEF4",0x6C24],
+ ["AEF5",0x6CF0],
+ ["AEF6",0x6D6A],
+ ["AEF7",0x6D95],
+ ["AEF8",0x6D88],
+ ["AEF9",0x6D87],
+ ["AEFA",0x6D66],
+ ["AEFB",0x6D78],
+ ["AEFC",0x6D77],
+ ["AEFD",0x6D59],
+ ["AEFE",0x6D93],
+ ["AF40",0x6D6C],
+ ["AF41",0x6D89],
+ ["AF42",0x6D6E],
+ ["AF43",0x6D5A],
+ ["AF44",0x6D74],
+ ["AF45",0x6D69],
+ ["AF46",0x6D8C],
+ ["AF47",0x6D8A],
+ ["AF48",0x6D79],
+ ["AF49",0x6D85],
+ ["AF4A",0x6D65],
+ ["AF4B",0x6D94],
+ ["AF4C",0x70CA],
+ ["AF4D",0x70D8],
+ ["AF4E",0x70E4],
+ ["AF4F",0x70D9],
+ ["AF50",0x70C8],
+ ["AF51",0x70CF],
+ ["AF52",0x7239],
+ ["AF53",0x7279],
+ ["AF54",0x72FC],
+ ["AF55",0x72F9],
+ ["AF56",0x72FD],
+ ["AF57",0x72F8],
+ ["AF58",0x72F7],
+ ["AF59",0x7386],
+ ["AF5A",0x73ED],
+ ["AF5B",0x7409],
+ ["AF5C",0x73EE],
+ ["AF5D",0x73E0],
+ ["AF5E",0x73EA],
+ ["AF5F",0x73DE],
+ ["AF60",0x7554],
+ ["AF61",0x755D],
+ ["AF62",0x755C],
+ ["AF63",0x755A],
+ ["AF64",0x7559],
+ ["AF65",0x75BE],
+ ["AF66",0x75C5],
+ ["AF67",0x75C7],
+ ["AF68",0x75B2],
+ ["AF69",0x75B3],
+ ["AF6A",0x75BD],
+ ["AF6B",0x75BC],
+ ["AF6C",0x75B9],
+ ["AF6D",0x75C2],
+ ["AF6E",0x75B8],
+ ["AF6F",0x768B],
+ ["AF70",0x76B0],
+ ["AF71",0x76CA],
+ ["AF72",0x76CD],
+ ["AF73",0x76CE],
+ ["AF74",0x7729],
+ ["AF75",0x771F],
+ ["AF76",0x7720],
+ ["AF77",0x7728],
+ ["AF78",0x77E9],
+ ["AF79",0x7830],
+ ["AF7A",0x7827],
+ ["AF7B",0x7838],
+ ["AF7C",0x781D],
+ ["AF7D",0x7834],
+ ["AF7E",0x7837],
+ ["AFA1",0x7825],
+ ["AFA2",0x782D],
+ ["AFA3",0x7820],
+ ["AFA4",0x781F],
+ ["AFA5",0x7832],
+ ["AFA6",0x7955],
+ ["AFA7",0x7950],
+ ["AFA8",0x7960],
+ ["AFA9",0x795F],
+ ["AFAA",0x7956],
+ ["AFAB",0x795E],
+ ["AFAC",0x795D],
+ ["AFAD",0x7957],
+ ["AFAE",0x795A],
+ ["AFAF",0x79E4],
+ ["AFB0",0x79E3],
+ ["AFB1",0x79E7],
+ ["AFB2",0x79DF],
+ ["AFB3",0x79E6],
+ ["AFB4",0x79E9],
+ ["AFB5",0x79D8],
+ ["AFB6",0x7A84],
+ ["AFB7",0x7A88],
+ ["AFB8",0x7AD9],
+ ["AFB9",0x7B06],
+ ["AFBA",0x7B11],
+ ["AFBB",0x7C89],
+ ["AFBC",0x7D21],
+ ["AFBD",0x7D17],
+ ["AFBE",0x7D0B],
+ ["AFBF",0x7D0A],
+ ["AFC0",0x7D20],
+ ["AFC1",0x7D22],
+ ["AFC2",0x7D14],
+ ["AFC3",0x7D10],
+ ["AFC4",0x7D15],
+ ["AFC5",0x7D1A],
+ ["AFC6",0x7D1C],
+ ["AFC7",0x7D0D],
+ ["AFC8",0x7D19],
+ ["AFC9",0x7D1B],
+ ["AFCA",0x7F3A],
+ ["AFCB",0x7F5F],
+ ["AFCC",0x7F94],
+ ["AFCD",0x7FC5],
+ ["AFCE",0x7FC1],
+ ["AFCF",0x8006],
+ ["AFD0",0x8018],
+ ["AFD1",0x8015],
+ ["AFD2",0x8019],
+ ["AFD3",0x8017],
+ ["AFD4",0x803D],
+ ["AFD5",0x803F],
+ ["AFD6",0x80F1],
+ ["AFD7",0x8102],
+ ["AFD8",0x80F0],
+ ["AFD9",0x8105],
+ ["AFDA",0x80ED],
+ ["AFDB",0x80F4],
+ ["AFDC",0x8106],
+ ["AFDD",0x80F8],
+ ["AFDE",0x80F3],
+ ["AFDF",0x8108],
+ ["AFE0",0x80FD],
+ ["AFE1",0x810A],
+ ["AFE2",0x80FC],
+ ["AFE3",0x80EF],
+ ["AFE4",0x81ED],
+ ["AFE5",0x81EC],
+ ["AFE6",0x8200],
+ ["AFE7",0x8210],
+ ["AFE8",0x822A],
+ ["AFE9",0x822B],
+ ["AFEA",0x8228],
+ ["AFEB",0x822C],
+ ["AFEC",0x82BB],
+ ["AFED",0x832B],
+ ["AFEE",0x8352],
+ ["AFEF",0x8354],
+ ["AFF0",0x834A],
+ ["AFF1",0x8338],
+ ["AFF2",0x8350],
+ ["AFF3",0x8349],
+ ["AFF4",0x8335],
+ ["AFF5",0x8334],
+ ["AFF6",0x834F],
+ ["AFF7",0x8332],
+ ["AFF8",0x8339],
+ ["AFF9",0x8336],
+ ["AFFA",0x8317],
+ ["AFFB",0x8340],
+ ["AFFC",0x8331],
+ ["AFFD",0x8328],
+ ["AFFE",0x8343],
+ ["B040",0x8654],
+ ["B041",0x868A],
+ ["B042",0x86AA],
+ ["B043",0x8693],
+ ["B044",0x86A4],
+ ["B045",0x86A9],
+ ["B046",0x868C],
+ ["B047",0x86A3],
+ ["B048",0x869C],
+ ["B049",0x8870],
+ ["B04A",0x8877],
+ ["B04B",0x8881],
+ ["B04C",0x8882],
+ ["B04D",0x887D],
+ ["B04E",0x8879],
+ ["B04F",0x8A18],
+ ["B050",0x8A10],
+ ["B051",0x8A0E],
+ ["B052",0x8A0C],
+ ["B053",0x8A15],
+ ["B054",0x8A0A],
+ ["B055",0x8A17],
+ ["B056",0x8A13],
+ ["B057",0x8A16],
+ ["B058",0x8A0F],
+ ["B059",0x8A11],
+ ["B05A",0x8C48],
+ ["B05B",0x8C7A],
+ ["B05C",0x8C79],
+ ["B05D",0x8CA1],
+ ["B05E",0x8CA2],
+ ["B05F",0x8D77],
+ ["B060",0x8EAC],
+ ["B061",0x8ED2],
+ ["B062",0x8ED4],
+ ["B063",0x8ECF],
+ ["B064",0x8FB1],
+ ["B065",0x9001],
+ ["B066",0x9006],
+ ["B067",0x8FF7],
+ ["B068",0x9000],
+ ["B069",0x8FFA],
+ ["B06A",0x8FF4],
+ ["B06B",0x9003],
+ ["B06C",0x8FFD],
+ ["B06D",0x9005],
+ ["B06E",0x8FF8],
+ ["B06F",0x9095],
+ ["B070",0x90E1],
+ ["B071",0x90DD],
+ ["B072",0x90E2],
+ ["B073",0x9152],
+ ["B074",0x914D],
+ ["B075",0x914C],
+ ["B076",0x91D8],
+ ["B077",0x91DD],
+ ["B078",0x91D7],
+ ["B079",0x91DC],
+ ["B07A",0x91D9],
+ ["B07B",0x9583],
+ ["B07C",0x9662],
+ ["B07D",0x9663],
+ ["B07E",0x9661],
+ ["B0A1",0x965B],
+ ["B0A2",0x965D],
+ ["B0A3",0x9664],
+ ["B0A4",0x9658],
+ ["B0A5",0x965E],
+ ["B0A6",0x96BB],
+ ["B0A7",0x98E2],
+ ["B0A8",0x99AC],
+ ["B0A9",0x9AA8],
+ ["B0AA",0x9AD8],
+ ["B0AB",0x9B25],
+ ["B0AC",0x9B32],
+ ["B0AD",0x9B3C],
+ ["B0AE",0x4E7E],
+ ["B0AF",0x507A],
+ ["B0B0",0x507D],
+ ["B0B1",0x505C],
+ ["B0B2",0x5047],
+ ["B0B3",0x5043],
+ ["B0B4",0x504C],
+ ["B0B5",0x505A],
+ ["B0B6",0x5049],
+ ["B0B7",0x5065],
+ ["B0B8",0x5076],
+ ["B0B9",0x504E],
+ ["B0BA",0x5055],
+ ["B0BB",0x5075],
+ ["B0BC",0x5074],
+ ["B0BD",0x5077],
+ ["B0BE",0x504F],
+ ["B0BF",0x500F],
+ ["B0C0",0x506F],
+ ["B0C1",0x506D],
+ ["B0C2",0x515C],
+ ["B0C3",0x5195],
+ ["B0C4",0x51F0],
+ ["B0C5",0x526A],
+ ["B0C6",0x526F],
+ ["B0C7",0x52D2],
+ ["B0C8",0x52D9],
+ ["B0C9",0x52D8],
+ ["B0CA",0x52D5],
+ ["B0CB",0x5310],
+ ["B0CC",0x530F],
+ ["B0CD",0x5319],
+ ["B0CE",0x533F],
+ ["B0CF",0x5340],
+ ["B0D0",0x533E],
+ ["B0D1",0x53C3],
+ ["B0D2",0x66FC],
+ ["B0D3",0x5546],
+ ["B0D4",0x556A],
+ ["B0D5",0x5566],
+ ["B0D6",0x5544],
+ ["B0D7",0x555E],
+ ["B0D8",0x5561],
+ ["B0D9",0x5543],
+ ["B0DA",0x554A],
+ ["B0DB",0x5531],
+ ["B0DC",0x5556],
+ ["B0DD",0x554F],
+ ["B0DE",0x5555],
+ ["B0DF",0x552F],
+ ["B0E0",0x5564],
+ ["B0E1",0x5538],
+ ["B0E2",0x552E],
+ ["B0E3",0x555C],
+ ["B0E4",0x552C],
+ ["B0E5",0x5563],
+ ["B0E6",0x5533],
+ ["B0E7",0x5541],
+ ["B0E8",0x5557],
+ ["B0E9",0x5708],
+ ["B0EA",0x570B],
+ ["B0EB",0x5709],
+ ["B0EC",0x57DF],
+ ["B0ED",0x5805],
+ ["B0EE",0x580A],
+ ["B0EF",0x5806],
+ ["B0F0",0x57E0],
+ ["B0F1",0x57E4],
+ ["B0F2",0x57FA],
+ ["B0F3",0x5802],
+ ["B0F4",0x5835],
+ ["B0F5",0x57F7],
+ ["B0F6",0x57F9],
+ ["B0F7",0x5920],
+ ["B0F8",0x5962],
+ ["B0F9",0x5A36],
+ ["B0FA",0x5A41],
+ ["B0FB",0x5A49],
+ ["B0FC",0x5A66],
+ ["B0FD",0x5A6A],
+ ["B0FE",0x5A40],
+ ["B140",0x5A3C],
+ ["B141",0x5A62],
+ ["B142",0x5A5A],
+ ["B143",0x5A46],
+ ["B144",0x5A4A],
+ ["B145",0x5B70],
+ ["B146",0x5BC7],
+ ["B147",0x5BC5],
+ ["B148",0x5BC4],
+ ["B149",0x5BC2],
+ ["B14A",0x5BBF],
+ ["B14B",0x5BC6],
+ ["B14C",0x5C09],
+ ["B14D",0x5C08],
+ ["B14E",0x5C07],
+ ["B14F",0x5C60],
+ ["B150",0x5C5C],
+ ["B151",0x5C5D],
+ ["B152",0x5D07],
+ ["B153",0x5D06],
+ ["B154",0x5D0E],
+ ["B155",0x5D1B],
+ ["B156",0x5D16],
+ ["B157",0x5D22],
+ ["B158",0x5D11],
+ ["B159",0x5D29],
+ ["B15A",0x5D14],
+ ["B15B",0x5D19],
+ ["B15C",0x5D24],
+ ["B15D",0x5D27],
+ ["B15E",0x5D17],
+ ["B15F",0x5DE2],
+ ["B160",0x5E38],
+ ["B161",0x5E36],
+ ["B162",0x5E33],
+ ["B163",0x5E37],
+ ["B164",0x5EB7],
+ ["B165",0x5EB8],
+ ["B166",0x5EB6],
+ ["B167",0x5EB5],
+ ["B168",0x5EBE],
+ ["B169",0x5F35],
+ ["B16A",0x5F37],
+ ["B16B",0x5F57],
+ ["B16C",0x5F6C],
+ ["B16D",0x5F69],
+ ["B16E",0x5F6B],
+ ["B16F",0x5F97],
+ ["B170",0x5F99],
+ ["B171",0x5F9E],
+ ["B172",0x5F98],
+ ["B173",0x5FA1],
+ ["B174",0x5FA0],
+ ["B175",0x5F9C],
+ ["B176",0x607F],
+ ["B177",0x60A3],
+ ["B178",0x6089],
+ ["B179",0x60A0],
+ ["B17A",0x60A8],
+ ["B17B",0x60CB],
+ ["B17C",0x60B4],
+ ["B17D",0x60E6],
+ ["B17E",0x60BD],
+ ["B1A1",0x60C5],
+ ["B1A2",0x60BB],
+ ["B1A3",0x60B5],
+ ["B1A4",0x60DC],
+ ["B1A5",0x60BC],
+ ["B1A6",0x60D8],
+ ["B1A7",0x60D5],
+ ["B1A8",0x60C6],
+ ["B1A9",0x60DF],
+ ["B1AA",0x60B8],
+ ["B1AB",0x60DA],
+ ["B1AC",0x60C7],
+ ["B1AD",0x621A],
+ ["B1AE",0x621B],
+ ["B1AF",0x6248],
+ ["B1B0",0x63A0],
+ ["B1B1",0x63A7],
+ ["B1B2",0x6372],
+ ["B1B3",0x6396],
+ ["B1B4",0x63A2],
+ ["B1B5",0x63A5],
+ ["B1B6",0x6377],
+ ["B1B7",0x6367],
+ ["B1B8",0x6398],
+ ["B1B9",0x63AA],
+ ["B1BA",0x6371],
+ ["B1BB",0x63A9],
+ ["B1BC",0x6389],
+ ["B1BD",0x6383],
+ ["B1BE",0x639B],
+ ["B1BF",0x636B],
+ ["B1C0",0x63A8],
+ ["B1C1",0x6384],
+ ["B1C2",0x6388],
+ ["B1C3",0x6399],
+ ["B1C4",0x63A1],
+ ["B1C5",0x63AC],
+ ["B1C6",0x6392],
+ ["B1C7",0x638F],
+ ["B1C8",0x6380],
+ ["B1C9",0x637B],
+ ["B1CA",0x6369],
+ ["B1CB",0x6368],
+ ["B1CC",0x637A],
+ ["B1CD",0x655D],
+ ["B1CE",0x6556],
+ ["B1CF",0x6551],
+ ["B1D0",0x6559],
+ ["B1D1",0x6557],
+ ["B1D2",0x555F],
+ ["B1D3",0x654F],
+ ["B1D4",0x6558],
+ ["B1D5",0x6555],
+ ["B1D6",0x6554],
+ ["B1D7",0x659C],
+ ["B1D8",0x659B],
+ ["B1D9",0x65AC],
+ ["B1DA",0x65CF],
+ ["B1DB",0x65CB],
+ ["B1DC",0x65CC],
+ ["B1DD",0x65CE],
+ ["B1DE",0x665D],
+ ["B1DF",0x665A],
+ ["B1E0",0x6664],
+ ["B1E1",0x6668],
+ ["B1E2",0x6666],
+ ["B1E3",0x665E],
+ ["B1E4",0x66F9],
+ ["B1E5",0x52D7],
+ ["B1E6",0x671B],
+ ["B1E7",0x6881],
+ ["B1E8",0x68AF],
+ ["B1E9",0x68A2],
+ ["B1EA",0x6893],
+ ["B1EB",0x68B5],
+ ["B1EC",0x687F],
+ ["B1ED",0x6876],
+ ["B1EE",0x68B1],
+ ["B1EF",0x68A7],
+ ["B1F0",0x6897],
+ ["B1F1",0x68B0],
+ ["B1F2",0x6883],
+ ["B1F3",0x68C4],
+ ["B1F4",0x68AD],
+ ["B1F5",0x6886],
+ ["B1F6",0x6885],
+ ["B1F7",0x6894],
+ ["B1F8",0x689D],
+ ["B1F9",0x68A8],
+ ["B1FA",0x689F],
+ ["B1FB",0x68A1],
+ ["B1FC",0x6882],
+ ["B1FD",0x6B32],
+ ["B1FE",0x6BBA],
+ ["B240",0x6BEB],
+ ["B241",0x6BEC],
+ ["B242",0x6C2B],
+ ["B243",0x6D8E],
+ ["B244",0x6DBC],
+ ["B245",0x6DF3],
+ ["B246",0x6DD9],
+ ["B247",0x6DB2],
+ ["B248",0x6DE1],
+ ["B249",0x6DCC],
+ ["B24A",0x6DE4],
+ ["B24B",0x6DFB],
+ ["B24C",0x6DFA],
+ ["B24D",0x6E05],
+ ["B24E",0x6DC7],
+ ["B24F",0x6DCB],
+ ["B250",0x6DAF],
+ ["B251",0x6DD1],
+ ["B252",0x6DAE],
+ ["B253",0x6DDE],
+ ["B254",0x6DF9],
+ ["B255",0x6DB8],
+ ["B256",0x6DF7],
+ ["B257",0x6DF5],
+ ["B258",0x6DC5],
+ ["B259",0x6DD2],
+ ["B25A",0x6E1A],
+ ["B25B",0x6DB5],
+ ["B25C",0x6DDA],
+ ["B25D",0x6DEB],
+ ["B25E",0x6DD8],
+ ["B25F",0x6DEA],
+ ["B260",0x6DF1],
+ ["B261",0x6DEE],
+ ["B262",0x6DE8],
+ ["B263",0x6DC6],
+ ["B264",0x6DC4],
+ ["B265",0x6DAA],
+ ["B266",0x6DEC],
+ ["B267",0x6DBF],
+ ["B268",0x6DE6],
+ ["B269",0x70F9],
+ ["B26A",0x7109],
+ ["B26B",0x710A],
+ ["B26C",0x70FD],
+ ["B26D",0x70EF],
+ ["B26E",0x723D],
+ ["B26F",0x727D],
+ ["B270",0x7281],
+ ["B271",0x731C],
+ ["B272",0x731B],
+ ["B273",0x7316],
+ ["B274",0x7313],
+ ["B275",0x7319],
+ ["B276",0x7387],
+ ["B277",0x7405],
+ ["B278",0x740A],
+ ["B279",0x7403],
+ ["B27A",0x7406],
+ ["B27B",0x73FE],
+ ["B27C",0x740D],
+ ["B27D",0x74E0],
+ ["B27E",0x74F6],
+ ["B2A1",0x74F7],
+ ["B2A2",0x751C],
+ ["B2A3",0x7522],
+ ["B2A4",0x7565],
+ ["B2A5",0x7566],
+ ["B2A6",0x7562],
+ ["B2A7",0x7570],
+ ["B2A8",0x758F],
+ ["B2A9",0x75D4],
+ ["B2AA",0x75D5],
+ ["B2AB",0x75B5],
+ ["B2AC",0x75CA],
+ ["B2AD",0x75CD],
+ ["B2AE",0x768E],
+ ["B2AF",0x76D4],
+ ["B2B0",0x76D2],
+ ["B2B1",0x76DB],
+ ["B2B2",0x7737],
+ ["B2B3",0x773E],
+ ["B2B4",0x773C],
+ ["B2B5",0x7736],
+ ["B2B6",0x7738],
+ ["B2B7",0x773A],
+ ["B2B8",0x786B],
+ ["B2B9",0x7843],
+ ["B2BA",0x784E],
+ ["B2BB",0x7965],
+ ["B2BC",0x7968],
+ ["B2BD",0x796D],
+ ["B2BE",0x79FB],
+ ["B2BF",0x7A92],
+ ["B2C0",0x7A95],
+ ["B2C1",0x7B20],
+ ["B2C2",0x7B28],
+ ["B2C3",0x7B1B],
+ ["B2C4",0x7B2C],
+ ["B2C5",0x7B26],
+ ["B2C6",0x7B19],
+ ["B2C7",0x7B1E],
+ ["B2C8",0x7B2E],
+ ["B2C9",0x7C92],
+ ["B2CA",0x7C97],
+ ["B2CB",0x7C95],
+ ["B2CC",0x7D46],
+ ["B2CD",0x7D43],
+ ["B2CE",0x7D71],
+ ["B2CF",0x7D2E],
+ ["B2D0",0x7D39],
+ ["B2D1",0x7D3C],
+ ["B2D2",0x7D40],
+ ["B2D3",0x7D30],
+ ["B2D4",0x7D33],
+ ["B2D5",0x7D44],
+ ["B2D6",0x7D2F],
+ ["B2D7",0x7D42],
+ ["B2D8",0x7D32],
+ ["B2D9",0x7D31],
+ ["B2DA",0x7F3D],
+ ["B2DB",0x7F9E],
+ ["B2DC",0x7F9A],
+ ["B2DD",0x7FCC],
+ ["B2DE",0x7FCE],
+ ["B2DF",0x7FD2],
+ ["B2E0",0x801C],
+ ["B2E1",0x804A],
+ ["B2E2",0x8046],
+ ["B2E3",0x812F],
+ ["B2E4",0x8116],
+ ["B2E5",0x8123],
+ ["B2E6",0x812B],
+ ["B2E7",0x8129],
+ ["B2E8",0x8130],
+ ["B2E9",0x8124],
+ ["B2EA",0x8202],
+ ["B2EB",0x8235],
+ ["B2EC",0x8237],
+ ["B2ED",0x8236],
+ ["B2EE",0x8239],
+ ["B2EF",0x838E],
+ ["B2F0",0x839E],
+ ["B2F1",0x8398],
+ ["B2F2",0x8378],
+ ["B2F3",0x83A2],
+ ["B2F4",0x8396],
+ ["B2F5",0x83BD],
+ ["B2F6",0x83AB],
+ ["B2F7",0x8392],
+ ["B2F8",0x838A],
+ ["B2F9",0x8393],
+ ["B2FA",0x8389],
+ ["B2FB",0x83A0],
+ ["B2FC",0x8377],
+ ["B2FD",0x837B],
+ ["B2FE",0x837C],
+ ["B340",0x8386],
+ ["B341",0x83A7],
+ ["B342",0x8655],
+ ["B343",0x5F6A],
+ ["B344",0x86C7],
+ ["B345",0x86C0],
+ ["B346",0x86B6],
+ ["B347",0x86C4],
+ ["B348",0x86B5],
+ ["B349",0x86C6],
+ ["B34A",0x86CB],
+ ["B34B",0x86B1],
+ ["B34C",0x86AF],
+ ["B34D",0x86C9],
+ ["B34E",0x8853],
+ ["B34F",0x889E],
+ ["B350",0x8888],
+ ["B351",0x88AB],
+ ["B352",0x8892],
+ ["B353",0x8896],
+ ["B354",0x888D],
+ ["B355",0x888B],
+ ["B356",0x8993],
+ ["B357",0x898F],
+ ["B358",0x8A2A],
+ ["B359",0x8A1D],
+ ["B35A",0x8A23],
+ ["B35B",0x8A25],
+ ["B35C",0x8A31],
+ ["B35D",0x8A2D],
+ ["B35E",0x8A1F],
+ ["B35F",0x8A1B],
+ ["B360",0x8A22],
+ ["B361",0x8C49],
+ ["B362",0x8C5A],
+ ["B363",0x8CA9],
+ ["B364",0x8CAC],
+ ["B365",0x8CAB],
+ ["B366",0x8CA8],
+ ["B367",0x8CAA],
+ ["B368",0x8CA7],
+ ["B369",0x8D67],
+ ["B36A",0x8D66],
+ ["B36B",0x8DBE],
+ ["B36C",0x8DBA],
+ ["B36D",0x8EDB],
+ ["B36E",0x8EDF],
+ ["B36F",0x9019],
+ ["B370",0x900D],
+ ["B371",0x901A],
+ ["B372",0x9017],
+ ["B373",0x9023],
+ ["B374",0x901F],
+ ["B375",0x901D],
+ ["B376",0x9010],
+ ["B377",0x9015],
+ ["B378",0x901E],
+ ["B379",0x9020],
+ ["B37A",0x900F],
+ ["B37B",0x9022],
+ ["B37C",0x9016],
+ ["B37D",0x901B],
+ ["B37E",0x9014],
+ ["B3A1",0x90E8],
+ ["B3A2",0x90ED],
+ ["B3A3",0x90FD],
+ ["B3A4",0x9157],
+ ["B3A5",0x91CE],
+ ["B3A6",0x91F5],
+ ["B3A7",0x91E6],
+ ["B3A8",0x91E3],
+ ["B3A9",0x91E7],
+ ["B3AA",0x91ED],
+ ["B3AB",0x91E9],
+ ["B3AC",0x9589],
+ ["B3AD",0x966A],
+ ["B3AE",0x9675],
+ ["B3AF",0x9673],
+ ["B3B0",0x9678],
+ ["B3B1",0x9670],
+ ["B3B2",0x9674],
+ ["B3B3",0x9676],
+ ["B3B4",0x9677],
+ ["B3B5",0x966C],
+ ["B3B6",0x96C0],
+ ["B3B7",0x96EA],
+ ["B3B8",0x96E9],
+ ["B3B9",0x7AE0],
+ ["B3BA",0x7ADF],
+ ["B3BB",0x9802],
+ ["B3BC",0x9803],
+ ["B3BD",0x9B5A],
+ ["B3BE",0x9CE5],
+ ["B3BF",0x9E75],
+ ["B3C0",0x9E7F],
+ ["B3C1",0x9EA5],
+ ["B3C2",0x9EBB],
+ ["B3C3",0x50A2],
+ ["B3C4",0x508D],
+ ["B3C5",0x5085],
+ ["B3C6",0x5099],
+ ["B3C7",0x5091],
+ ["B3C8",0x5080],
+ ["B3C9",0x5096],
+ ["B3CA",0x5098],
+ ["B3CB",0x509A],
+ ["B3CC",0x6700],
+ ["B3CD",0x51F1],
+ ["B3CE",0x5272],
+ ["B3CF",0x5274],
+ ["B3D0",0x5275],
+ ["B3D1",0x5269],
+ ["B3D2",0x52DE],
+ ["B3D3",0x52DD],
+ ["B3D4",0x52DB],
+ ["B3D5",0x535A],
+ ["B3D6",0x53A5],
+ ["B3D7",0x557B],
+ ["B3D8",0x5580],
+ ["B3D9",0x55A7],
+ ["B3DA",0x557C],
+ ["B3DB",0x558A],
+ ["B3DC",0x559D],
+ ["B3DD",0x5598],
+ ["B3DE",0x5582],
+ ["B3DF",0x559C],
+ ["B3E0",0x55AA],
+ ["B3E1",0x5594],
+ ["B3E2",0x5587],
+ ["B3E3",0x558B],
+ ["B3E4",0x5583],
+ ["B3E5",0x55B3],
+ ["B3E6",0x55AE],
+ ["B3E7",0x559F],
+ ["B3E8",0x553E],
+ ["B3E9",0x55B2],
+ ["B3EA",0x559A],
+ ["B3EB",0x55BB],
+ ["B3EC",0x55AC],
+ ["B3ED",0x55B1],
+ ["B3EE",0x557E],
+ ["B3EF",0x5589],
+ ["B3F0",0x55AB],
+ ["B3F1",0x5599],
+ ["B3F2",0x570D],
+ ["B3F3",0x582F],
+ ["B3F4",0x582A],
+ ["B3F5",0x5834],
+ ["B3F6",0x5824],
+ ["B3F7",0x5830],
+ ["B3F8",0x5831],
+ ["B3F9",0x5821],
+ ["B3FA",0x581D],
+ ["B3FB",0x5820],
+ ["B3FC",0x58F9],
+ ["B3FD",0x58FA],
+ ["B3FE",0x5960],
+ ["B440",0x5A77],
+ ["B441",0x5A9A],
+ ["B442",0x5A7F],
+ ["B443",0x5A92],
+ ["B444",0x5A9B],
+ ["B445",0x5AA7],
+ ["B446",0x5B73],
+ ["B447",0x5B71],
+ ["B448",0x5BD2],
+ ["B449",0x5BCC],
+ ["B44A",0x5BD3],
+ ["B44B",0x5BD0],
+ ["B44C",0x5C0A],
+ ["B44D",0x5C0B],
+ ["B44E",0x5C31],
+ ["B44F",0x5D4C],
+ ["B450",0x5D50],
+ ["B451",0x5D34],
+ ["B452",0x5D47],
+ ["B453",0x5DFD],
+ ["B454",0x5E45],
+ ["B455",0x5E3D],
+ ["B456",0x5E40],
+ ["B457",0x5E43],
+ ["B458",0x5E7E],
+ ["B459",0x5ECA],
+ ["B45A",0x5EC1],
+ ["B45B",0x5EC2],
+ ["B45C",0x5EC4],
+ ["B45D",0x5F3C],
+ ["B45E",0x5F6D],
+ ["B45F",0x5FA9],
+ ["B460",0x5FAA],
+ ["B461",0x5FA8],
+ ["B462",0x60D1],
+ ["B463",0x60E1],
+ ["B464",0x60B2],
+ ["B465",0x60B6],
+ ["B466",0x60E0],
+ ["B467",0x611C],
+ ["B468",0x6123],
+ ["B469",0x60FA],
+ ["B46A",0x6115],
+ ["B46B",0x60F0],
+ ["B46C",0x60FB],
+ ["B46D",0x60F4],
+ ["B46E",0x6168],
+ ["B46F",0x60F1],
+ ["B470",0x610E],
+ ["B471",0x60F6],
+ ["B472",0x6109],
+ ["B473",0x6100],
+ ["B474",0x6112],
+ ["B475",0x621F],
+ ["B476",0x6249],
+ ["B477",0x63A3],
+ ["B478",0x638C],
+ ["B479",0x63CF],
+ ["B47A",0x63C0],
+ ["B47B",0x63E9],
+ ["B47C",0x63C9],
+ ["B47D",0x63C6],
+ ["B47E",0x63CD],
+ ["B4A1",0x63D2],
+ ["B4A2",0x63E3],
+ ["B4A3",0x63D0],
+ ["B4A4",0x63E1],
+ ["B4A5",0x63D6],
+ ["B4A6",0x63ED],
+ ["B4A7",0x63EE],
+ ["B4A8",0x6376],
+ ["B4A9",0x63F4],
+ ["B4AA",0x63EA],
+ ["B4AB",0x63DB],
+ ["B4AC",0x6452],
+ ["B4AD",0x63DA],
+ ["B4AE",0x63F9],
+ ["B4AF",0x655E],
+ ["B4B0",0x6566],
+ ["B4B1",0x6562],
+ ["B4B2",0x6563],
+ ["B4B3",0x6591],
+ ["B4B4",0x6590],
+ ["B4B5",0x65AF],
+ ["B4B6",0x666E],
+ ["B4B7",0x6670],
+ ["B4B8",0x6674],
+ ["B4B9",0x6676],
+ ["B4BA",0x666F],
+ ["B4BB",0x6691],
+ ["B4BC",0x667A],
+ ["B4BD",0x667E],
+ ["B4BE",0x6677],
+ ["B4BF",0x66FE],
+ ["B4C0",0x66FF],
+ ["B4C1",0x671F],
+ ["B4C2",0x671D],
+ ["B4C3",0x68FA],
+ ["B4C4",0x68D5],
+ ["B4C5",0x68E0],
+ ["B4C6",0x68D8],
+ ["B4C7",0x68D7],
+ ["B4C8",0x6905],
+ ["B4C9",0x68DF],
+ ["B4CA",0x68F5],
+ ["B4CB",0x68EE],
+ ["B4CC",0x68E7],
+ ["B4CD",0x68F9],
+ ["B4CE",0x68D2],
+ ["B4CF",0x68F2],
+ ["B4D0",0x68E3],
+ ["B4D1",0x68CB],
+ ["B4D2",0x68CD],
+ ["B4D3",0x690D],
+ ["B4D4",0x6912],
+ ["B4D5",0x690E],
+ ["B4D6",0x68C9],
+ ["B4D7",0x68DA],
+ ["B4D8",0x696E],
+ ["B4D9",0x68FB],
+ ["B4DA",0x6B3E],
+ ["B4DB",0x6B3A],
+ ["B4DC",0x6B3D],
+ ["B4DD",0x6B98],
+ ["B4DE",0x6B96],
+ ["B4DF",0x6BBC],
+ ["B4E0",0x6BEF],
+ ["B4E1",0x6C2E],
+ ["B4E2",0x6C2F],
+ ["B4E3",0x6C2C],
+ ["B4E4",0x6E2F],
+ ["B4E5",0x6E38],
+ ["B4E6",0x6E54],
+ ["B4E7",0x6E21],
+ ["B4E8",0x6E32],
+ ["B4E9",0x6E67],
+ ["B4EA",0x6E4A],
+ ["B4EB",0x6E20],
+ ["B4EC",0x6E25],
+ ["B4ED",0x6E23],
+ ["B4EE",0x6E1B],
+ ["B4EF",0x6E5B],
+ ["B4F0",0x6E58],
+ ["B4F1",0x6E24],
+ ["B4F2",0x6E56],
+ ["B4F3",0x6E6E],
+ ["B4F4",0x6E2D],
+ ["B4F5",0x6E26],
+ ["B4F6",0x6E6F],
+ ["B4F7",0x6E34],
+ ["B4F8",0x6E4D],
+ ["B4F9",0x6E3A],
+ ["B4FA",0x6E2C],
+ ["B4FB",0x6E43],
+ ["B4FC",0x6E1D],
+ ["B4FD",0x6E3E],
+ ["B4FE",0x6ECB],
+ ["B540",0x6E89],
+ ["B541",0x6E19],
+ ["B542",0x6E4E],
+ ["B543",0x6E63],
+ ["B544",0x6E44],
+ ["B545",0x6E72],
+ ["B546",0x6E69],
+ ["B547",0x6E5F],
+ ["B548",0x7119],
+ ["B549",0x711A],
+ ["B54A",0x7126],
+ ["B54B",0x7130],
+ ["B54C",0x7121],
+ ["B54D",0x7136],
+ ["B54E",0x716E],
+ ["B54F",0x711C],
+ ["B550",0x724C],
+ ["B551",0x7284],
+ ["B552",0x7280],
+ ["B553",0x7336],
+ ["B554",0x7325],
+ ["B555",0x7334],
+ ["B556",0x7329],
+ ["B557",0x743A],
+ ["B558",0x742A],
+ ["B559",0x7433],
+ ["B55A",0x7422],
+ ["B55B",0x7425],
+ ["B55C",0x7435],
+ ["B55D",0x7436],
+ ["B55E",0x7434],
+ ["B55F",0x742F],
+ ["B560",0x741B],
+ ["B561",0x7426],
+ ["B562",0x7428],
+ ["B563",0x7525],
+ ["B564",0x7526],
+ ["B565",0x756B],
+ ["B566",0x756A],
+ ["B567",0x75E2],
+ ["B568",0x75DB],
+ ["B569",0x75E3],
+ ["B56A",0x75D9],
+ ["B56B",0x75D8],
+ ["B56C",0x75DE],
+ ["B56D",0x75E0],
+ ["B56E",0x767B],
+ ["B56F",0x767C],
+ ["B570",0x7696],
+ ["B571",0x7693],
+ ["B572",0x76B4],
+ ["B573",0x76DC],
+ ["B574",0x774F],
+ ["B575",0x77ED],
+ ["B576",0x785D],
+ ["B577",0x786C],
+ ["B578",0x786F],
+ ["B579",0x7A0D],
+ ["B57A",0x7A08],
+ ["B57B",0x7A0B],
+ ["B57C",0x7A05],
+ ["B57D",0x7A00],
+ ["B57E",0x7A98],
+ ["B5A1",0x7A97],
+ ["B5A2",0x7A96],
+ ["B5A3",0x7AE5],
+ ["B5A4",0x7AE3],
+ ["B5A5",0x7B49],
+ ["B5A6",0x7B56],
+ ["B5A7",0x7B46],
+ ["B5A8",0x7B50],
+ ["B5A9",0x7B52],
+ ["B5AA",0x7B54],
+ ["B5AB",0x7B4D],
+ ["B5AC",0x7B4B],
+ ["B5AD",0x7B4F],
+ ["B5AE",0x7B51],
+ ["B5AF",0x7C9F],
+ ["B5B0",0x7CA5],
+ ["B5B1",0x7D5E],
+ ["B5B2",0x7D50],
+ ["B5B3",0x7D68],
+ ["B5B4",0x7D55],
+ ["B5B5",0x7D2B],
+ ["B5B6",0x7D6E],
+ ["B5B7",0x7D72],
+ ["B5B8",0x7D61],
+ ["B5B9",0x7D66],
+ ["B5BA",0x7D62],
+ ["B5BB",0x7D70],
+ ["B5BC",0x7D73],
+ ["B5BD",0x5584],
+ ["B5BE",0x7FD4],
+ ["B5BF",0x7FD5],
+ ["B5C0",0x800B],
+ ["B5C1",0x8052],
+ ["B5C2",0x8085],
+ ["B5C3",0x8155],
+ ["B5C4",0x8154],
+ ["B5C5",0x814B],
+ ["B5C6",0x8151],
+ ["B5C7",0x814E],
+ ["B5C8",0x8139],
+ ["B5C9",0x8146],
+ ["B5CA",0x813E],
+ ["B5CB",0x814C],
+ ["B5CC",0x8153],
+ ["B5CD",0x8174],
+ ["B5CE",0x8212],
+ ["B5CF",0x821C],
+ ["B5D0",0x83E9],
+ ["B5D1",0x8403],
+ ["B5D2",0x83F8],
+ ["B5D3",0x840D],
+ ["B5D4",0x83E0],
+ ["B5D5",0x83C5],
+ ["B5D6",0x840B],
+ ["B5D7",0x83C1],
+ ["B5D8",0x83EF],
+ ["B5D9",0x83F1],
+ ["B5DA",0x83F4],
+ ["B5DB",0x8457],
+ ["B5DC",0x840A],
+ ["B5DD",0x83F0],
+ ["B5DE",0x840C],
+ ["B5DF",0x83CC],
+ ["B5E0",0x83FD],
+ ["B5E1",0x83F2],
+ ["B5E2",0x83CA],
+ ["B5E3",0x8438],
+ ["B5E4",0x840E],
+ ["B5E5",0x8404],
+ ["B5E6",0x83DC],
+ ["B5E7",0x8407],
+ ["B5E8",0x83D4],
+ ["B5E9",0x83DF],
+ ["B5EA",0x865B],
+ ["B5EB",0x86DF],
+ ["B5EC",0x86D9],
+ ["B5ED",0x86ED],
+ ["B5EE",0x86D4],
+ ["B5EF",0x86DB],
+ ["B5F0",0x86E4],
+ ["B5F1",0x86D0],
+ ["B5F2",0x86DE],
+ ["B5F3",0x8857],
+ ["B5F4",0x88C1],
+ ["B5F5",0x88C2],
+ ["B5F6",0x88B1],
+ ["B5F7",0x8983],
+ ["B5F8",0x8996],
+ ["B5F9",0x8A3B],
+ ["B5FA",0x8A60],
+ ["B5FB",0x8A55],
+ ["B5FC",0x8A5E],
+ ["B5FD",0x8A3C],
+ ["B5FE",0x8A41],
+ ["B640",0x8A54],
+ ["B641",0x8A5B],
+ ["B642",0x8A50],
+ ["B643",0x8A46],
+ ["B644",0x8A34],
+ ["B645",0x8A3A],
+ ["B646",0x8A36],
+ ["B647",0x8A56],
+ ["B648",0x8C61],
+ ["B649",0x8C82],
+ ["B64A",0x8CAF],
+ ["B64B",0x8CBC],
+ ["B64C",0x8CB3],
+ ["B64D",0x8CBD],
+ ["B64E",0x8CC1],
+ ["B64F",0x8CBB],
+ ["B650",0x8CC0],
+ ["B651",0x8CB4],
+ ["B652",0x8CB7],
+ ["B653",0x8CB6],
+ ["B654",0x8CBF],
+ ["B655",0x8CB8],
+ ["B656",0x8D8A],
+ ["B657",0x8D85],
+ ["B658",0x8D81],
+ ["B659",0x8DCE],
+ ["B65A",0x8DDD],
+ ["B65B",0x8DCB],
+ ["B65C",0x8DDA],
+ ["B65D",0x8DD1],
+ ["B65E",0x8DCC],
+ ["B65F",0x8DDB],
+ ["B660",0x8DC6],
+ ["B661",0x8EFB],
+ ["B662",0x8EF8],
+ ["B663",0x8EFC],
+ ["B664",0x8F9C],
+ ["B665",0x902E],
+ ["B666",0x9035],
+ ["B667",0x9031],
+ ["B668",0x9038],
+ ["B669",0x9032],
+ ["B66A",0x9036],
+ ["B66B",0x9102],
+ ["B66C",0x90F5],
+ ["B66D",0x9109],
+ ["B66E",0x90FE],
+ ["B66F",0x9163],
+ ["B670",0x9165],
+ ["B671",0x91CF],
+ ["B672",0x9214],
+ ["B673",0x9215],
+ ["B674",0x9223],
+ ["B675",0x9209],
+ ["B676",0x921E],
+ ["B677",0x920D],
+ ["B678",0x9210],
+ ["B679",0x9207],
+ ["B67A",0x9211],
+ ["B67B",0x9594],
+ ["B67C",0x958F],
+ ["B67D",0x958B],
+ ["B67E",0x9591],
+ ["B6A1",0x9593],
+ ["B6A2",0x9592],
+ ["B6A3",0x958E],
+ ["B6A4",0x968A],
+ ["B6A5",0x968E],
+ ["B6A6",0x968B],
+ ["B6A7",0x967D],
+ ["B6A8",0x9685],
+ ["B6A9",0x9686],
+ ["B6AA",0x968D],
+ ["B6AB",0x9672],
+ ["B6AC",0x9684],
+ ["B6AD",0x96C1],
+ ["B6AE",0x96C5],
+ ["B6AF",0x96C4],
+ ["B6B0",0x96C6],
+ ["B6B1",0x96C7],
+ ["B6B2",0x96EF],
+ ["B6B3",0x96F2],
+ ["B6B4",0x97CC],
+ ["B6B5",0x9805],
+ ["B6B6",0x9806],
+ ["B6B7",0x9808],
+ ["B6B8",0x98E7],
+ ["B6B9",0x98EA],
+ ["B6BA",0x98EF],
+ ["B6BB",0x98E9],
+ ["B6BC",0x98F2],
+ ["B6BD",0x98ED],
+ ["B6BE",0x99AE],
+ ["B6BF",0x99AD],
+ ["B6C0",0x9EC3],
+ ["B6C1",0x9ECD],
+ ["B6C2",0x9ED1],
+ ["B6C3",0x4E82],
+ ["B6C4",0x50AD],
+ ["B6C5",0x50B5],
+ ["B6C6",0x50B2],
+ ["B6C7",0x50B3],
+ ["B6C8",0x50C5],
+ ["B6C9",0x50BE],
+ ["B6CA",0x50AC],
+ ["B6CB",0x50B7],
+ ["B6CC",0x50BB],
+ ["B6CD",0x50AF],
+ ["B6CE",0x50C7],
+ ["B6CF",0x527F],
+ ["B6D0",0x5277],
+ ["B6D1",0x527D],
+ ["B6D2",0x52DF],
+ ["B6D3",0x52E6],
+ ["B6D4",0x52E4],
+ ["B6D5",0x52E2],
+ ["B6D6",0x52E3],
+ ["B6D7",0x532F],
+ ["B6D8",0x55DF],
+ ["B6D9",0x55E8],
+ ["B6DA",0x55D3],
+ ["B6DB",0x55E6],
+ ["B6DC",0x55CE],
+ ["B6DD",0x55DC],
+ ["B6DE",0x55C7],
+ ["B6DF",0x55D1],
+ ["B6E0",0x55E3],
+ ["B6E1",0x55E4],
+ ["B6E2",0x55EF],
+ ["B6E3",0x55DA],
+ ["B6E4",0x55E1],
+ ["B6E5",0x55C5],
+ ["B6E6",0x55C6],
+ ["B6E7",0x55E5],
+ ["B6E8",0x55C9],
+ ["B6E9",0x5712],
+ ["B6EA",0x5713],
+ ["B6EB",0x585E],
+ ["B6EC",0x5851],
+ ["B6ED",0x5858],
+ ["B6EE",0x5857],
+ ["B6EF",0x585A],
+ ["B6F0",0x5854],
+ ["B6F1",0x586B],
+ ["B6F2",0x584C],
+ ["B6F3",0x586D],
+ ["B6F4",0x584A],
+ ["B6F5",0x5862],
+ ["B6F6",0x5852],
+ ["B6F7",0x584B],
+ ["B6F8",0x5967],
+ ["B6F9",0x5AC1],
+ ["B6FA",0x5AC9],
+ ["B6FB",0x5ACC],
+ ["B6FC",0x5ABE],
+ ["B6FD",0x5ABD],
+ ["B6FE",0x5ABC],
+ ["B740",0x5AB3],
+ ["B741",0x5AC2],
+ ["B742",0x5AB2],
+ ["B743",0x5D69],
+ ["B744",0x5D6F],
+ ["B745",0x5E4C],
+ ["B746",0x5E79],
+ ["B747",0x5EC9],
+ ["B748",0x5EC8],
+ ["B749",0x5F12],
+ ["B74A",0x5F59],
+ ["B74B",0x5FAC],
+ ["B74C",0x5FAE],
+ ["B74D",0x611A],
+ ["B74E",0x610F],
+ ["B74F",0x6148],
+ ["B750",0x611F],
+ ["B751",0x60F3],
+ ["B752",0x611B],
+ ["B753",0x60F9],
+ ["B754",0x6101],
+ ["B755",0x6108],
+ ["B756",0x614E],
+ ["B757",0x614C],
+ ["B758",0x6144],
+ ["B759",0x614D],
+ ["B75A",0x613E],
+ ["B75B",0x6134],
+ ["B75C",0x6127],
+ ["B75D",0x610D],
+ ["B75E",0x6106],
+ ["B75F",0x6137],
+ ["B760",0x6221],
+ ["B761",0x6222],
+ ["B762",0x6413],
+ ["B763",0x643E],
+ ["B764",0x641E],
+ ["B765",0x642A],
+ ["B766",0x642D],
+ ["B767",0x643D],
+ ["B768",0x642C],
+ ["B769",0x640F],
+ ["B76A",0x641C],
+ ["B76B",0x6414],
+ ["B76C",0x640D],
+ ["B76D",0x6436],
+ ["B76E",0x6416],
+ ["B76F",0x6417],
+ ["B770",0x6406],
+ ["B771",0x656C],
+ ["B772",0x659F],
+ ["B773",0x65B0],
+ ["B774",0x6697],
+ ["B775",0x6689],
+ ["B776",0x6687],
+ ["B777",0x6688],
+ ["B778",0x6696],
+ ["B779",0x6684],
+ ["B77A",0x6698],
+ ["B77B",0x668D],
+ ["B77C",0x6703],
+ ["B77D",0x6994],
+ ["B77E",0x696D],
+ ["B7A1",0x695A],
+ ["B7A2",0x6977],
+ ["B7A3",0x6960],
+ ["B7A4",0x6954],
+ ["B7A5",0x6975],
+ ["B7A6",0x6930],
+ ["B7A7",0x6982],
+ ["B7A8",0x694A],
+ ["B7A9",0x6968],
+ ["B7AA",0x696B],
+ ["B7AB",0x695E],
+ ["B7AC",0x6953],
+ ["B7AD",0x6979],
+ ["B7AE",0x6986],
+ ["B7AF",0x695D],
+ ["B7B0",0x6963],
+ ["B7B1",0x695B],
+ ["B7B2",0x6B47],
+ ["B7B3",0x6B72],
+ ["B7B4",0x6BC0],
+ ["B7B5",0x6BBF],
+ ["B7B6",0x6BD3],
+ ["B7B7",0x6BFD],
+ ["B7B8",0x6EA2],
+ ["B7B9",0x6EAF],
+ ["B7BA",0x6ED3],
+ ["B7BB",0x6EB6],
+ ["B7BC",0x6EC2],
+ ["B7BD",0x6E90],
+ ["B7BE",0x6E9D],
+ ["B7BF",0x6EC7],
+ ["B7C0",0x6EC5],
+ ["B7C1",0x6EA5],
+ ["B7C2",0x6E98],
+ ["B7C3",0x6EBC],
+ ["B7C4",0x6EBA],
+ ["B7C5",0x6EAB],
+ ["B7C6",0x6ED1],
+ ["B7C7",0x6E96],
+ ["B7C8",0x6E9C],
+ ["B7C9",0x6EC4],
+ ["B7CA",0x6ED4],
+ ["B7CB",0x6EAA],
+ ["B7CC",0x6EA7],
+ ["B7CD",0x6EB4],
+ ["B7CE",0x714E],
+ ["B7CF",0x7159],
+ ["B7D0",0x7169],
+ ["B7D1",0x7164],
+ ["B7D2",0x7149],
+ ["B7D3",0x7167],
+ ["B7D4",0x715C],
+ ["B7D5",0x716C],
+ ["B7D6",0x7166],
+ ["B7D7",0x714C],
+ ["B7D8",0x7165],
+ ["B7D9",0x715E],
+ ["B7DA",0x7146],
+ ["B7DB",0x7168],
+ ["B7DC",0x7156],
+ ["B7DD",0x723A],
+ ["B7DE",0x7252],
+ ["B7DF",0x7337],
+ ["B7E0",0x7345],
+ ["B7E1",0x733F],
+ ["B7E2",0x733E],
+ ["B7E3",0x746F],
+ ["B7E4",0x745A],
+ ["B7E5",0x7455],
+ ["B7E6",0x745F],
+ ["B7E7",0x745E],
+ ["B7E8",0x7441],
+ ["B7E9",0x743F],
+ ["B7EA",0x7459],
+ ["B7EB",0x745B],
+ ["B7EC",0x745C],
+ ["B7ED",0x7576],
+ ["B7EE",0x7578],
+ ["B7EF",0x7600],
+ ["B7F0",0x75F0],
+ ["B7F1",0x7601],
+ ["B7F2",0x75F2],
+ ["B7F3",0x75F1],
+ ["B7F4",0x75FA],
+ ["B7F5",0x75FF],
+ ["B7F6",0x75F4],
+ ["B7F7",0x75F3],
+ ["B7F8",0x76DE],
+ ["B7F9",0x76DF],
+ ["B7FA",0x775B],
+ ["B7FB",0x776B],
+ ["B7FC",0x7766],
+ ["B7FD",0x775E],
+ ["B7FE",0x7763],
+ ["B840",0x7779],
+ ["B841",0x776A],
+ ["B842",0x776C],
+ ["B843",0x775C],
+ ["B844",0x7765],
+ ["B845",0x7768],
+ ["B846",0x7762],
+ ["B847",0x77EE],
+ ["B848",0x788E],
+ ["B849",0x78B0],
+ ["B84A",0x7897],
+ ["B84B",0x7898],
+ ["B84C",0x788C],
+ ["B84D",0x7889],
+ ["B84E",0x787C],
+ ["B84F",0x7891],
+ ["B850",0x7893],
+ ["B851",0x787F],
+ ["B852",0x797A],
+ ["B853",0x797F],
+ ["B854",0x7981],
+ ["B855",0x842C],
+ ["B856",0x79BD],
+ ["B857",0x7A1C],
+ ["B858",0x7A1A],
+ ["B859",0x7A20],
+ ["B85A",0x7A14],
+ ["B85B",0x7A1F],
+ ["B85C",0x7A1E],
+ ["B85D",0x7A9F],
+ ["B85E",0x7AA0],
+ ["B85F",0x7B77],
+ ["B860",0x7BC0],
+ ["B861",0x7B60],
+ ["B862",0x7B6E],
+ ["B863",0x7B67],
+ ["B864",0x7CB1],
+ ["B865",0x7CB3],
+ ["B866",0x7CB5],
+ ["B867",0x7D93],
+ ["B868",0x7D79],
+ ["B869",0x7D91],
+ ["B86A",0x7D81],
+ ["B86B",0x7D8F],
+ ["B86C",0x7D5B],
+ ["B86D",0x7F6E],
+ ["B86E",0x7F69],
+ ["B86F",0x7F6A],
+ ["B870",0x7F72],
+ ["B871",0x7FA9],
+ ["B872",0x7FA8],
+ ["B873",0x7FA4],
+ ["B874",0x8056],
+ ["B875",0x8058],
+ ["B876",0x8086],
+ ["B877",0x8084],
+ ["B878",0x8171],
+ ["B879",0x8170],
+ ["B87A",0x8178],
+ ["B87B",0x8165],
+ ["B87C",0x816E],
+ ["B87D",0x8173],
+ ["B87E",0x816B],
+ ["B8A1",0x8179],
+ ["B8A2",0x817A],
+ ["B8A3",0x8166],
+ ["B8A4",0x8205],
+ ["B8A5",0x8247],
+ ["B8A6",0x8482],
+ ["B8A7",0x8477],
+ ["B8A8",0x843D],
+ ["B8A9",0x8431],
+ ["B8AA",0x8475],
+ ["B8AB",0x8466],
+ ["B8AC",0x846B],
+ ["B8AD",0x8449],
+ ["B8AE",0x846C],
+ ["B8AF",0x845B],
+ ["B8B0",0x843C],
+ ["B8B1",0x8435],
+ ["B8B2",0x8461],
+ ["B8B3",0x8463],
+ ["B8B4",0x8469],
+ ["B8B5",0x846D],
+ ["B8B6",0x8446],
+ ["B8B7",0x865E],
+ ["B8B8",0x865C],
+ ["B8B9",0x865F],
+ ["B8BA",0x86F9],
+ ["B8BB",0x8713],
+ ["B8BC",0x8708],
+ ["B8BD",0x8707],
+ ["B8BE",0x8700],
+ ["B8BF",0x86FE],
+ ["B8C0",0x86FB],
+ ["B8C1",0x8702],
+ ["B8C2",0x8703],
+ ["B8C3",0x8706],
+ ["B8C4",0x870A],
+ ["B8C5",0x8859],
+ ["B8C6",0x88DF],
+ ["B8C7",0x88D4],
+ ["B8C8",0x88D9],
+ ["B8C9",0x88DC],
+ ["B8CA",0x88D8],
+ ["B8CB",0x88DD],
+ ["B8CC",0x88E1],
+ ["B8CD",0x88CA],
+ ["B8CE",0x88D5],
+ ["B8CF",0x88D2],
+ ["B8D0",0x899C],
+ ["B8D1",0x89E3],
+ ["B8D2",0x8A6B],
+ ["B8D3",0x8A72],
+ ["B8D4",0x8A73],
+ ["B8D5",0x8A66],
+ ["B8D6",0x8A69],
+ ["B8D7",0x8A70],
+ ["B8D8",0x8A87],
+ ["B8D9",0x8A7C],
+ ["B8DA",0x8A63],
+ ["B8DB",0x8AA0],
+ ["B8DC",0x8A71],
+ ["B8DD",0x8A85],
+ ["B8DE",0x8A6D],
+ ["B8DF",0x8A62],
+ ["B8E0",0x8A6E],
+ ["B8E1",0x8A6C],
+ ["B8E2",0x8A79],
+ ["B8E3",0x8A7B],
+ ["B8E4",0x8A3E],
+ ["B8E5",0x8A68],
+ ["B8E6",0x8C62],
+ ["B8E7",0x8C8A],
+ ["B8E8",0x8C89],
+ ["B8E9",0x8CCA],
+ ["B8EA",0x8CC7],
+ ["B8EB",0x8CC8],
+ ["B8EC",0x8CC4],
+ ["B8ED",0x8CB2],
+ ["B8EE",0x8CC3],
+ ["B8EF",0x8CC2],
+ ["B8F0",0x8CC5],
+ ["B8F1",0x8DE1],
+ ["B8F2",0x8DDF],
+ ["B8F3",0x8DE8],
+ ["B8F4",0x8DEF],
+ ["B8F5",0x8DF3],
+ ["B8F6",0x8DFA],
+ ["B8F7",0x8DEA],
+ ["B8F8",0x8DE4],
+ ["B8F9",0x8DE6],
+ ["B8FA",0x8EB2],
+ ["B8FB",0x8F03],
+ ["B8FC",0x8F09],
+ ["B8FD",0x8EFE],
+ ["B8FE",0x8F0A],
+ ["B940",0x8F9F],
+ ["B941",0x8FB2],
+ ["B942",0x904B],
+ ["B943",0x904A],
+ ["B944",0x9053],
+ ["B945",0x9042],
+ ["B946",0x9054],
+ ["B947",0x903C],
+ ["B948",0x9055],
+ ["B949",0x9050],
+ ["B94A",0x9047],
+ ["B94B",0x904F],
+ ["B94C",0x904E],
+ ["B94D",0x904D],
+ ["B94E",0x9051],
+ ["B94F",0x903E],
+ ["B950",0x9041],
+ ["B951",0x9112],
+ ["B952",0x9117],
+ ["B953",0x916C],
+ ["B954",0x916A],
+ ["B955",0x9169],
+ ["B956",0x91C9],
+ ["B957",0x9237],
+ ["B958",0x9257],
+ ["B959",0x9238],
+ ["B95A",0x923D],
+ ["B95B",0x9240],
+ ["B95C",0x923E],
+ ["B95D",0x925B],
+ ["B95E",0x924B],
+ ["B95F",0x9264],
+ ["B960",0x9251],
+ ["B961",0x9234],
+ ["B962",0x9249],
+ ["B963",0x924D],
+ ["B964",0x9245],
+ ["B965",0x9239],
+ ["B966",0x923F],
+ ["B967",0x925A],
+ ["B968",0x9598],
+ ["B969",0x9698],
+ ["B96A",0x9694],
+ ["B96B",0x9695],
+ ["B96C",0x96CD],
+ ["B96D",0x96CB],
+ ["B96E",0x96C9],
+ ["B96F",0x96CA],
+ ["B970",0x96F7],
+ ["B971",0x96FB],
+ ["B972",0x96F9],
+ ["B973",0x96F6],
+ ["B974",0x9756],
+ ["B975",0x9774],
+ ["B976",0x9776],
+ ["B977",0x9810],
+ ["B978",0x9811],
+ ["B979",0x9813],
+ ["B97A",0x980A],
+ ["B97B",0x9812],
+ ["B97C",0x980C],
+ ["B97D",0x98FC],
+ ["B97E",0x98F4],
+ ["B9A1",0x98FD],
+ ["B9A2",0x98FE],
+ ["B9A3",0x99B3],
+ ["B9A4",0x99B1],
+ ["B9A5",0x99B4],
+ ["B9A6",0x9AE1],
+ ["B9A7",0x9CE9],
+ ["B9A8",0x9E82],
+ ["B9A9",0x9F0E],
+ ["B9AA",0x9F13],
+ ["B9AB",0x9F20],
+ ["B9AC",0x50E7],
+ ["B9AD",0x50EE],
+ ["B9AE",0x50E5],
+ ["B9AF",0x50D6],
+ ["B9B0",0x50ED],
+ ["B9B1",0x50DA],
+ ["B9B2",0x50D5],
+ ["B9B3",0x50CF],
+ ["B9B4",0x50D1],
+ ["B9B5",0x50F1],
+ ["B9B6",0x50CE],
+ ["B9B7",0x50E9],
+ ["B9B8",0x5162],
+ ["B9B9",0x51F3],
+ ["B9BA",0x5283],
+ ["B9BB",0x5282],
+ ["B9BC",0x5331],
+ ["B9BD",0x53AD],
+ ["B9BE",0x55FE],
+ ["B9BF",0x5600],
+ ["B9C0",0x561B],
+ ["B9C1",0x5617],
+ ["B9C2",0x55FD],
+ ["B9C3",0x5614],
+ ["B9C4",0x5606],
+ ["B9C5",0x5609],
+ ["B9C6",0x560D],
+ ["B9C7",0x560E],
+ ["B9C8",0x55F7],
+ ["B9C9",0x5616],
+ ["B9CA",0x561F],
+ ["B9CB",0x5608],
+ ["B9CC",0x5610],
+ ["B9CD",0x55F6],
+ ["B9CE",0x5718],
+ ["B9CF",0x5716],
+ ["B9D0",0x5875],
+ ["B9D1",0x587E],
+ ["B9D2",0x5883],
+ ["B9D3",0x5893],
+ ["B9D4",0x588A],
+ ["B9D5",0x5879],
+ ["B9D6",0x5885],
+ ["B9D7",0x587D],
+ ["B9D8",0x58FD],
+ ["B9D9",0x5925],
+ ["B9DA",0x5922],
+ ["B9DB",0x5924],
+ ["B9DC",0x596A],
+ ["B9DD",0x5969],
+ ["B9DE",0x5AE1],
+ ["B9DF",0x5AE6],
+ ["B9E0",0x5AE9],
+ ["B9E1",0x5AD7],
+ ["B9E2",0x5AD6],
+ ["B9E3",0x5AD8],
+ ["B9E4",0x5AE3],
+ ["B9E5",0x5B75],
+ ["B9E6",0x5BDE],
+ ["B9E7",0x5BE7],
+ ["B9E8",0x5BE1],
+ ["B9E9",0x5BE5],
+ ["B9EA",0x5BE6],
+ ["B9EB",0x5BE8],
+ ["B9EC",0x5BE2],
+ ["B9ED",0x5BE4],
+ ["B9EE",0x5BDF],
+ ["B9EF",0x5C0D],
+ ["B9F0",0x5C62],
+ ["B9F1",0x5D84],
+ ["B9F2",0x5D87],
+ ["B9F3",0x5E5B],
+ ["B9F4",0x5E63],
+ ["B9F5",0x5E55],
+ ["B9F6",0x5E57],
+ ["B9F7",0x5E54],
+ ["B9F8",0x5ED3],
+ ["B9F9",0x5ED6],
+ ["B9FA",0x5F0A],
+ ["B9FB",0x5F46],
+ ["B9FC",0x5F70],
+ ["B9FD",0x5FB9],
+ ["B9FE",0x6147],
+ ["BA40",0x613F],
+ ["BA41",0x614B],
+ ["BA42",0x6177],
+ ["BA43",0x6162],
+ ["BA44",0x6163],
+ ["BA45",0x615F],
+ ["BA46",0x615A],
+ ["BA47",0x6158],
+ ["BA48",0x6175],
+ ["BA49",0x622A],
+ ["BA4A",0x6487],
+ ["BA4B",0x6458],
+ ["BA4C",0x6454],
+ ["BA4D",0x64A4],
+ ["BA4E",0x6478],
+ ["BA4F",0x645F],
+ ["BA50",0x647A],
+ ["BA51",0x6451],
+ ["BA52",0x6467],
+ ["BA53",0x6434],
+ ["BA54",0x646D],
+ ["BA55",0x647B],
+ ["BA56",0x6572],
+ ["BA57",0x65A1],
+ ["BA58",0x65D7],
+ ["BA59",0x65D6],
+ ["BA5A",0x66A2],
+ ["BA5B",0x66A8],
+ ["BA5C",0x669D],
+ ["BA5D",0x699C],
+ ["BA5E",0x69A8],
+ ["BA5F",0x6995],
+ ["BA60",0x69C1],
+ ["BA61",0x69AE],
+ ["BA62",0x69D3],
+ ["BA63",0x69CB],
+ ["BA64",0x699B],
+ ["BA65",0x69B7],
+ ["BA66",0x69BB],
+ ["BA67",0x69AB],
+ ["BA68",0x69B4],
+ ["BA69",0x69D0],
+ ["BA6A",0x69CD],
+ ["BA6B",0x69AD],
+ ["BA6C",0x69CC],
+ ["BA6D",0x69A6],
+ ["BA6E",0x69C3],
+ ["BA6F",0x69A3],
+ ["BA70",0x6B49],
+ ["BA71",0x6B4C],
+ ["BA72",0x6C33],
+ ["BA73",0x6F33],
+ ["BA74",0x6F14],
+ ["BA75",0x6EFE],
+ ["BA76",0x6F13],
+ ["BA77",0x6EF4],
+ ["BA78",0x6F29],
+ ["BA79",0x6F3E],
+ ["BA7A",0x6F20],
+ ["BA7B",0x6F2C],
+ ["BA7C",0x6F0F],
+ ["BA7D",0x6F02],
+ ["BA7E",0x6F22],
+ ["BAA1",0x6EFF],
+ ["BAA2",0x6EEF],
+ ["BAA3",0x6F06],
+ ["BAA4",0x6F31],
+ ["BAA5",0x6F38],
+ ["BAA6",0x6F32],
+ ["BAA7",0x6F23],
+ ["BAA8",0x6F15],
+ ["BAA9",0x6F2B],
+ ["BAAA",0x6F2F],
+ ["BAAB",0x6F88],
+ ["BAAC",0x6F2A],
+ ["BAAD",0x6EEC],
+ ["BAAE",0x6F01],
+ ["BAAF",0x6EF2],
+ ["BAB0",0x6ECC],
+ ["BAB1",0x6EF7],
+ ["BAB2",0x7194],
+ ["BAB3",0x7199],
+ ["BAB4",0x717D],
+ ["BAB5",0x718A],
+ ["BAB6",0x7184],
+ ["BAB7",0x7192],
+ ["BAB8",0x723E],
+ ["BAB9",0x7292],
+ ["BABA",0x7296],
+ ["BABB",0x7344],
+ ["BABC",0x7350],
+ ["BABD",0x7464],
+ ["BABE",0x7463],
+ ["BABF",0x746A],
+ ["BAC0",0x7470],
+ ["BAC1",0x746D],
+ ["BAC2",0x7504],
+ ["BAC3",0x7591],
+ ["BAC4",0x7627],
+ ["BAC5",0x760D],
+ ["BAC6",0x760B],
+ ["BAC7",0x7609],
+ ["BAC8",0x7613],
+ ["BAC9",0x76E1],
+ ["BACA",0x76E3],
+ ["BACB",0x7784],
+ ["BACC",0x777D],
+ ["BACD",0x777F],
+ ["BACE",0x7761],
+ ["BACF",0x78C1],
+ ["BAD0",0x789F],
+ ["BAD1",0x78A7],
+ ["BAD2",0x78B3],
+ ["BAD3",0x78A9],
+ ["BAD4",0x78A3],
+ ["BAD5",0x798E],
+ ["BAD6",0x798F],
+ ["BAD7",0x798D],
+ ["BAD8",0x7A2E],
+ ["BAD9",0x7A31],
+ ["BADA",0x7AAA],
+ ["BADB",0x7AA9],
+ ["BADC",0x7AED],
+ ["BADD",0x7AEF],
+ ["BADE",0x7BA1],
+ ["BADF",0x7B95],
+ ["BAE0",0x7B8B],
+ ["BAE1",0x7B75],
+ ["BAE2",0x7B97],
+ ["BAE3",0x7B9D],
+ ["BAE4",0x7B94],
+ ["BAE5",0x7B8F],
+ ["BAE6",0x7BB8],
+ ["BAE7",0x7B87],
+ ["BAE8",0x7B84],
+ ["BAE9",0x7CB9],
+ ["BAEA",0x7CBD],
+ ["BAEB",0x7CBE],
+ ["BAEC",0x7DBB],
+ ["BAED",0x7DB0],
+ ["BAEE",0x7D9C],
+ ["BAEF",0x7DBD],
+ ["BAF0",0x7DBE],
+ ["BAF1",0x7DA0],
+ ["BAF2",0x7DCA],
+ ["BAF3",0x7DB4],
+ ["BAF4",0x7DB2],
+ ["BAF5",0x7DB1],
+ ["BAF6",0x7DBA],
+ ["BAF7",0x7DA2],
+ ["BAF8",0x7DBF],
+ ["BAF9",0x7DB5],
+ ["BAFA",0x7DB8],
+ ["BAFB",0x7DAD],
+ ["BAFC",0x7DD2],
+ ["BAFD",0x7DC7],
+ ["BAFE",0x7DAC],
+ ["BB40",0x7F70],
+ ["BB41",0x7FE0],
+ ["BB42",0x7FE1],
+ ["BB43",0x7FDF],
+ ["BB44",0x805E],
+ ["BB45",0x805A],
+ ["BB46",0x8087],
+ ["BB47",0x8150],
+ ["BB48",0x8180],
+ ["BB49",0x818F],
+ ["BB4A",0x8188],
+ ["BB4B",0x818A],
+ ["BB4C",0x817F],
+ ["BB4D",0x8182],
+ ["BB4E",0x81E7],
+ ["BB4F",0x81FA],
+ ["BB50",0x8207],
+ ["BB51",0x8214],
+ ["BB52",0x821E],
+ ["BB53",0x824B],
+ ["BB54",0x84C9],
+ ["BB55",0x84BF],
+ ["BB56",0x84C6],
+ ["BB57",0x84C4],
+ ["BB58",0x8499],
+ ["BB59",0x849E],
+ ["BB5A",0x84B2],
+ ["BB5B",0x849C],
+ ["BB5C",0x84CB],
+ ["BB5D",0x84B8],
+ ["BB5E",0x84C0],
+ ["BB5F",0x84D3],
+ ["BB60",0x8490],
+ ["BB61",0x84BC],
+ ["BB62",0x84D1],
+ ["BB63",0x84CA],
+ ["BB64",0x873F],
+ ["BB65",0x871C],
+ ["BB66",0x873B],
+ ["BB67",0x8722],
+ ["BB68",0x8725],
+ ["BB69",0x8734],
+ ["BB6A",0x8718],
+ ["BB6B",0x8755],
+ ["BB6C",0x8737],
+ ["BB6D",0x8729],
+ ["BB6E",0x88F3],
+ ["BB6F",0x8902],
+ ["BB70",0x88F4],
+ ["BB71",0x88F9],
+ ["BB72",0x88F8],
+ ["BB73",0x88FD],
+ ["BB74",0x88E8],
+ ["BB75",0x891A],
+ ["BB76",0x88EF],
+ ["BB77",0x8AA6],
+ ["BB78",0x8A8C],
+ ["BB79",0x8A9E],
+ ["BB7A",0x8AA3],
+ ["BB7B",0x8A8D],
+ ["BB7C",0x8AA1],
+ ["BB7D",0x8A93],
+ ["BB7E",0x8AA4],
+ ["BBA1",0x8AAA],
+ ["BBA2",0x8AA5],
+ ["BBA3",0x8AA8],
+ ["BBA4",0x8A98],
+ ["BBA5",0x8A91],
+ ["BBA6",0x8A9A],
+ ["BBA7",0x8AA7],
+ ["BBA8",0x8C6A],
+ ["BBA9",0x8C8D],
+ ["BBAA",0x8C8C],
+ ["BBAB",0x8CD3],
+ ["BBAC",0x8CD1],
+ ["BBAD",0x8CD2],
+ ["BBAE",0x8D6B],
+ ["BBAF",0x8D99],
+ ["BBB0",0x8D95],
+ ["BBB1",0x8DFC],
+ ["BBB2",0x8F14],
+ ["BBB3",0x8F12],
+ ["BBB4",0x8F15],
+ ["BBB5",0x8F13],
+ ["BBB6",0x8FA3],
+ ["BBB7",0x9060],
+ ["BBB8",0x9058],
+ ["BBB9",0x905C],
+ ["BBBA",0x9063],
+ ["BBBB",0x9059],
+ ["BBBC",0x905E],
+ ["BBBD",0x9062],
+ ["BBBE",0x905D],
+ ["BBBF",0x905B],
+ ["BBC0",0x9119],
+ ["BBC1",0x9118],
+ ["BBC2",0x911E],
+ ["BBC3",0x9175],
+ ["BBC4",0x9178],
+ ["BBC5",0x9177],
+ ["BBC6",0x9174],
+ ["BBC7",0x9278],
+ ["BBC8",0x9280],
+ ["BBC9",0x9285],
+ ["BBCA",0x9298],
+ ["BBCB",0x9296],
+ ["BBCC",0x927B],
+ ["BBCD",0x9293],
+ ["BBCE",0x929C],
+ ["BBCF",0x92A8],
+ ["BBD0",0x927C],
+ ["BBD1",0x9291],
+ ["BBD2",0x95A1],
+ ["BBD3",0x95A8],
+ ["BBD4",0x95A9],
+ ["BBD5",0x95A3],
+ ["BBD6",0x95A5],
+ ["BBD7",0x95A4],
+ ["BBD8",0x9699],
+ ["BBD9",0x969C],
+ ["BBDA",0x969B],
+ ["BBDB",0x96CC],
+ ["BBDC",0x96D2],
+ ["BBDD",0x9700],
+ ["BBDE",0x977C],
+ ["BBDF",0x9785],
+ ["BBE0",0x97F6],
+ ["BBE1",0x9817],
+ ["BBE2",0x9818],
+ ["BBE3",0x98AF],
+ ["BBE4",0x98B1],
+ ["BBE5",0x9903],
+ ["BBE6",0x9905],
+ ["BBE7",0x990C],
+ ["BBE8",0x9909],
+ ["BBE9",0x99C1],
+ ["BBEA",0x9AAF],
+ ["BBEB",0x9AB0],
+ ["BBEC",0x9AE6],
+ ["BBED",0x9B41],
+ ["BBEE",0x9B42],
+ ["BBEF",0x9CF4],
+ ["BBF0",0x9CF6],
+ ["BBF1",0x9CF3],
+ ["BBF2",0x9EBC],
+ ["BBF3",0x9F3B],
+ ["BBF4",0x9F4A],
+ ["BBF5",0x5104],
+ ["BBF6",0x5100],
+ ["BBF7",0x50FB],
+ ["BBF8",0x50F5],
+ ["BBF9",0x50F9],
+ ["BBFA",0x5102],
+ ["BBFB",0x5108],
+ ["BBFC",0x5109],
+ ["BBFD",0x5105],
+ ["BBFE",0x51DC],
+ ["BC40",0x5287],
+ ["BC41",0x5288],
+ ["BC42",0x5289],
+ ["BC43",0x528D],
+ ["BC44",0x528A],
+ ["BC45",0x52F0],
+ ["BC46",0x53B2],
+ ["BC47",0x562E],
+ ["BC48",0x563B],
+ ["BC49",0x5639],
+ ["BC4A",0x5632],
+ ["BC4B",0x563F],
+ ["BC4C",0x5634],
+ ["BC4D",0x5629],
+ ["BC4E",0x5653],
+ ["BC4F",0x564E],
+ ["BC50",0x5657],
+ ["BC51",0x5674],
+ ["BC52",0x5636],
+ ["BC53",0x562F],
+ ["BC54",0x5630],
+ ["BC55",0x5880],
+ ["BC56",0x589F],
+ ["BC57",0x589E],
+ ["BC58",0x58B3],
+ ["BC59",0x589C],
+ ["BC5A",0x58AE],
+ ["BC5B",0x58A9],
+ ["BC5C",0x58A6],
+ ["BC5D",0x596D],
+ ["BC5E",0x5B09],
+ ["BC5F",0x5AFB],
+ ["BC60",0x5B0B],
+ ["BC61",0x5AF5],
+ ["BC62",0x5B0C],
+ ["BC63",0x5B08],
+ ["BC64",0x5BEE],
+ ["BC65",0x5BEC],
+ ["BC66",0x5BE9],
+ ["BC67",0x5BEB],
+ ["BC68",0x5C64],
+ ["BC69",0x5C65],
+ ["BC6A",0x5D9D],
+ ["BC6B",0x5D94],
+ ["BC6C",0x5E62],
+ ["BC6D",0x5E5F],
+ ["BC6E",0x5E61],
+ ["BC6F",0x5EE2],
+ ["BC70",0x5EDA],
+ ["BC71",0x5EDF],
+ ["BC72",0x5EDD],
+ ["BC73",0x5EE3],
+ ["BC74",0x5EE0],
+ ["BC75",0x5F48],
+ ["BC76",0x5F71],
+ ["BC77",0x5FB7],
+ ["BC78",0x5FB5],
+ ["BC79",0x6176],
+ ["BC7A",0x6167],
+ ["BC7B",0x616E],
+ ["BC7C",0x615D],
+ ["BC7D",0x6155],
+ ["BC7E",0x6182],
+ ["BCA1",0x617C],
+ ["BCA2",0x6170],
+ ["BCA3",0x616B],
+ ["BCA4",0x617E],
+ ["BCA5",0x61A7],
+ ["BCA6",0x6190],
+ ["BCA7",0x61AB],
+ ["BCA8",0x618E],
+ ["BCA9",0x61AC],
+ ["BCAA",0x619A],
+ ["BCAB",0x61A4],
+ ["BCAC",0x6194],
+ ["BCAD",0x61AE],
+ ["BCAE",0x622E],
+ ["BCAF",0x6469],
+ ["BCB0",0x646F],
+ ["BCB1",0x6479],
+ ["BCB2",0x649E],
+ ["BCB3",0x64B2],
+ ["BCB4",0x6488],
+ ["BCB5",0x6490],
+ ["BCB6",0x64B0],
+ ["BCB7",0x64A5],
+ ["BCB8",0x6493],
+ ["BCB9",0x6495],
+ ["BCBA",0x64A9],
+ ["BCBB",0x6492],
+ ["BCBC",0x64AE],
+ ["BCBD",0x64AD],
+ ["BCBE",0x64AB],
+ ["BCBF",0x649A],
+ ["BCC0",0x64AC],
+ ["BCC1",0x6499],
+ ["BCC2",0x64A2],
+ ["BCC3",0x64B3],
+ ["BCC4",0x6575],
+ ["BCC5",0x6577],
+ ["BCC6",0x6578],
+ ["BCC7",0x66AE],
+ ["BCC8",0x66AB],
+ ["BCC9",0x66B4],
+ ["BCCA",0x66B1],
+ ["BCCB",0x6A23],
+ ["BCCC",0x6A1F],
+ ["BCCD",0x69E8],
+ ["BCCE",0x6A01],
+ ["BCCF",0x6A1E],
+ ["BCD0",0x6A19],
+ ["BCD1",0x69FD],
+ ["BCD2",0x6A21],
+ ["BCD3",0x6A13],
+ ["BCD4",0x6A0A],
+ ["BCD5",0x69F3],
+ ["BCD6",0x6A02],
+ ["BCD7",0x6A05],
+ ["BCD8",0x69ED],
+ ["BCD9",0x6A11],
+ ["BCDA",0x6B50],
+ ["BCDB",0x6B4E],
+ ["BCDC",0x6BA4],
+ ["BCDD",0x6BC5],
+ ["BCDE",0x6BC6],
+ ["BCDF",0x6F3F],
+ ["BCE0",0x6F7C],
+ ["BCE1",0x6F84],
+ ["BCE2",0x6F51],
+ ["BCE3",0x6F66],
+ ["BCE4",0x6F54],
+ ["BCE5",0x6F86],
+ ["BCE6",0x6F6D],
+ ["BCE7",0x6F5B],
+ ["BCE8",0x6F78],
+ ["BCE9",0x6F6E],
+ ["BCEA",0x6F8E],
+ ["BCEB",0x6F7A],
+ ["BCEC",0x6F70],
+ ["BCED",0x6F64],
+ ["BCEE",0x6F97],
+ ["BCEF",0x6F58],
+ ["BCF0",0x6ED5],
+ ["BCF1",0x6F6F],
+ ["BCF2",0x6F60],
+ ["BCF3",0x6F5F],
+ ["BCF4",0x719F],
+ ["BCF5",0x71AC],
+ ["BCF6",0x71B1],
+ ["BCF7",0x71A8],
+ ["BCF8",0x7256],
+ ["BCF9",0x729B],
+ ["BCFA",0x734E],
+ ["BCFB",0x7357],
+ ["BCFC",0x7469],
+ ["BCFD",0x748B],
+ ["BCFE",0x7483],
+ ["BD40",0x747E],
+ ["BD41",0x7480],
+ ["BD42",0x757F],
+ ["BD43",0x7620],
+ ["BD44",0x7629],
+ ["BD45",0x761F],
+ ["BD46",0x7624],
+ ["BD47",0x7626],
+ ["BD48",0x7621],
+ ["BD49",0x7622],
+ ["BD4A",0x769A],
+ ["BD4B",0x76BA],
+ ["BD4C",0x76E4],
+ ["BD4D",0x778E],
+ ["BD4E",0x7787],
+ ["BD4F",0x778C],
+ ["BD50",0x7791],
+ ["BD51",0x778B],
+ ["BD52",0x78CB],
+ ["BD53",0x78C5],
+ ["BD54",0x78BA],
+ ["BD55",0x78CA],
+ ["BD56",0x78BE],
+ ["BD57",0x78D5],
+ ["BD58",0x78BC],
+ ["BD59",0x78D0],
+ ["BD5A",0x7A3F],
+ ["BD5B",0x7A3C],
+ ["BD5C",0x7A40],
+ ["BD5D",0x7A3D],
+ ["BD5E",0x7A37],
+ ["BD5F",0x7A3B],
+ ["BD60",0x7AAF],
+ ["BD61",0x7AAE],
+ ["BD62",0x7BAD],
+ ["BD63",0x7BB1],
+ ["BD64",0x7BC4],
+ ["BD65",0x7BB4],
+ ["BD66",0x7BC6],
+ ["BD67",0x7BC7],
+ ["BD68",0x7BC1],
+ ["BD69",0x7BA0],
+ ["BD6A",0x7BCC],
+ ["BD6B",0x7CCA],
+ ["BD6C",0x7DE0],
+ ["BD6D",0x7DF4],
+ ["BD6E",0x7DEF],
+ ["BD6F",0x7DFB],
+ ["BD70",0x7DD8],
+ ["BD71",0x7DEC],
+ ["BD72",0x7DDD],
+ ["BD73",0x7DE8],
+ ["BD74",0x7DE3],
+ ["BD75",0x7DDA],
+ ["BD76",0x7DDE],
+ ["BD77",0x7DE9],
+ ["BD78",0x7D9E],
+ ["BD79",0x7DD9],
+ ["BD7A",0x7DF2],
+ ["BD7B",0x7DF9],
+ ["BD7C",0x7F75],
+ ["BD7D",0x7F77],
+ ["BD7E",0x7FAF],
+ ["BDA1",0x7FE9],
+ ["BDA2",0x8026],
+ ["BDA3",0x819B],
+ ["BDA4",0x819C],
+ ["BDA5",0x819D],
+ ["BDA6",0x81A0],
+ ["BDA7",0x819A],
+ ["BDA8",0x8198],
+ ["BDA9",0x8517],
+ ["BDAA",0x853D],
+ ["BDAB",0x851A],
+ ["BDAC",0x84EE],
+ ["BDAD",0x852C],
+ ["BDAE",0x852D],
+ ["BDAF",0x8513],
+ ["BDB0",0x8511],
+ ["BDB1",0x8523],
+ ["BDB2",0x8521],
+ ["BDB3",0x8514],
+ ["BDB4",0x84EC],
+ ["BDB5",0x8525],
+ ["BDB6",0x84FF],
+ ["BDB7",0x8506],
+ ["BDB8",0x8782],
+ ["BDB9",0x8774],
+ ["BDBA",0x8776],
+ ["BDBB",0x8760],
+ ["BDBC",0x8766],
+ ["BDBD",0x8778],
+ ["BDBE",0x8768],
+ ["BDBF",0x8759],
+ ["BDC0",0x8757],
+ ["BDC1",0x874C],
+ ["BDC2",0x8753],
+ ["BDC3",0x885B],
+ ["BDC4",0x885D],
+ ["BDC5",0x8910],
+ ["BDC6",0x8907],
+ ["BDC7",0x8912],
+ ["BDC8",0x8913],
+ ["BDC9",0x8915],
+ ["BDCA",0x890A],
+ ["BDCB",0x8ABC],
+ ["BDCC",0x8AD2],
+ ["BDCD",0x8AC7],
+ ["BDCE",0x8AC4],
+ ["BDCF",0x8A95],
+ ["BDD0",0x8ACB],
+ ["BDD1",0x8AF8],
+ ["BDD2",0x8AB2],
+ ["BDD3",0x8AC9],
+ ["BDD4",0x8AC2],
+ ["BDD5",0x8ABF],
+ ["BDD6",0x8AB0],
+ ["BDD7",0x8AD6],
+ ["BDD8",0x8ACD],
+ ["BDD9",0x8AB6],
+ ["BDDA",0x8AB9],
+ ["BDDB",0x8ADB],
+ ["BDDC",0x8C4C],
+ ["BDDD",0x8C4E],
+ ["BDDE",0x8C6C],
+ ["BDDF",0x8CE0],
+ ["BDE0",0x8CDE],
+ ["BDE1",0x8CE6],
+ ["BDE2",0x8CE4],
+ ["BDE3",0x8CEC],
+ ["BDE4",0x8CED],
+ ["BDE5",0x8CE2],
+ ["BDE6",0x8CE3],
+ ["BDE7",0x8CDC],
+ ["BDE8",0x8CEA],
+ ["BDE9",0x8CE1],
+ ["BDEA",0x8D6D],
+ ["BDEB",0x8D9F],
+ ["BDEC",0x8DA3],
+ ["BDED",0x8E2B],
+ ["BDEE",0x8E10],
+ ["BDEF",0x8E1D],
+ ["BDF0",0x8E22],
+ ["BDF1",0x8E0F],
+ ["BDF2",0x8E29],
+ ["BDF3",0x8E1F],
+ ["BDF4",0x8E21],
+ ["BDF5",0x8E1E],
+ ["BDF6",0x8EBA],
+ ["BDF7",0x8F1D],
+ ["BDF8",0x8F1B],
+ ["BDF9",0x8F1F],
+ ["BDFA",0x8F29],
+ ["BDFB",0x8F26],
+ ["BDFC",0x8F2A],
+ ["BDFD",0x8F1C],
+ ["BDFE",0x8F1E],
+ ["BE40",0x8F25],
+ ["BE41",0x9069],
+ ["BE42",0x906E],
+ ["BE43",0x9068],
+ ["BE44",0x906D],
+ ["BE45",0x9077],
+ ["BE46",0x9130],
+ ["BE47",0x912D],
+ ["BE48",0x9127],
+ ["BE49",0x9131],
+ ["BE4A",0x9187],
+ ["BE4B",0x9189],
+ ["BE4C",0x918B],
+ ["BE4D",0x9183],
+ ["BE4E",0x92C5],
+ ["BE4F",0x92BB],
+ ["BE50",0x92B7],
+ ["BE51",0x92EA],
+ ["BE52",0x92AC],
+ ["BE53",0x92E4],
+ ["BE54",0x92C1],
+ ["BE55",0x92B3],
+ ["BE56",0x92BC],
+ ["BE57",0x92D2],
+ ["BE58",0x92C7],
+ ["BE59",0x92F0],
+ ["BE5A",0x92B2],
+ ["BE5B",0x95AD],
+ ["BE5C",0x95B1],
+ ["BE5D",0x9704],
+ ["BE5E",0x9706],
+ ["BE5F",0x9707],
+ ["BE60",0x9709],
+ ["BE61",0x9760],
+ ["BE62",0x978D],
+ ["BE63",0x978B],
+ ["BE64",0x978F],
+ ["BE65",0x9821],
+ ["BE66",0x982B],
+ ["BE67",0x981C],
+ ["BE68",0x98B3],
+ ["BE69",0x990A],
+ ["BE6A",0x9913],
+ ["BE6B",0x9912],
+ ["BE6C",0x9918],
+ ["BE6D",0x99DD],
+ ["BE6E",0x99D0],
+ ["BE6F",0x99DF],
+ ["BE70",0x99DB],
+ ["BE71",0x99D1],
+ ["BE72",0x99D5],
+ ["BE73",0x99D2],
+ ["BE74",0x99D9],
+ ["BE75",0x9AB7],
+ ["BE76",0x9AEE],
+ ["BE77",0x9AEF],
+ ["BE78",0x9B27],
+ ["BE79",0x9B45],
+ ["BE7A",0x9B44],
+ ["BE7B",0x9B77],
+ ["BE7C",0x9B6F],
+ ["BE7D",0x9D06],
+ ["BE7E",0x9D09],
+ ["BEA1",0x9D03],
+ ["BEA2",0x9EA9],
+ ["BEA3",0x9EBE],
+ ["BEA4",0x9ECE],
+ ["BEA5",0x58A8],
+ ["BEA6",0x9F52],
+ ["BEA7",0x5112],
+ ["BEA8",0x5118],
+ ["BEA9",0x5114],
+ ["BEAA",0x5110],
+ ["BEAB",0x5115],
+ ["BEAC",0x5180],
+ ["BEAD",0x51AA],
+ ["BEAE",0x51DD],
+ ["BEAF",0x5291],
+ ["BEB0",0x5293],
+ ["BEB1",0x52F3],
+ ["BEB2",0x5659],
+ ["BEB3",0x566B],
+ ["BEB4",0x5679],
+ ["BEB5",0x5669],
+ ["BEB6",0x5664],
+ ["BEB7",0x5678],
+ ["BEB8",0x566A],
+ ["BEB9",0x5668],
+ ["BEBA",0x5665],
+ ["BEBB",0x5671],
+ ["BEBC",0x566F],
+ ["BEBD",0x566C],
+ ["BEBE",0x5662],
+ ["BEBF",0x5676],
+ ["BEC0",0x58C1],
+ ["BEC1",0x58BE],
+ ["BEC2",0x58C7],
+ ["BEC3",0x58C5],
+ ["BEC4",0x596E],
+ ["BEC5",0x5B1D],
+ ["BEC6",0x5B34],
+ ["BEC7",0x5B78],
+ ["BEC8",0x5BF0],
+ ["BEC9",0x5C0E],
+ ["BECA",0x5F4A],
+ ["BECB",0x61B2],
+ ["BECC",0x6191],
+ ["BECD",0x61A9],
+ ["BECE",0x618A],
+ ["BECF",0x61CD],
+ ["BED0",0x61B6],
+ ["BED1",0x61BE],
+ ["BED2",0x61CA],
+ ["BED3",0x61C8],
+ ["BED4",0x6230],
+ ["BED5",0x64C5],
+ ["BED6",0x64C1],
+ ["BED7",0x64CB],
+ ["BED8",0x64BB],
+ ["BED9",0x64BC],
+ ["BEDA",0x64DA],
+ ["BEDB",0x64C4],
+ ["BEDC",0x64C7],
+ ["BEDD",0x64C2],
+ ["BEDE",0x64CD],
+ ["BEDF",0x64BF],
+ ["BEE0",0x64D2],
+ ["BEE1",0x64D4],
+ ["BEE2",0x64BE],
+ ["BEE3",0x6574],
+ ["BEE4",0x66C6],
+ ["BEE5",0x66C9],
+ ["BEE6",0x66B9],
+ ["BEE7",0x66C4],
+ ["BEE8",0x66C7],
+ ["BEE9",0x66B8],
+ ["BEEA",0x6A3D],
+ ["BEEB",0x6A38],
+ ["BEEC",0x6A3A],
+ ["BEED",0x6A59],
+ ["BEEE",0x6A6B],
+ ["BEEF",0x6A58],
+ ["BEF0",0x6A39],
+ ["BEF1",0x6A44],
+ ["BEF2",0x6A62],
+ ["BEF3",0x6A61],
+ ["BEF4",0x6A4B],
+ ["BEF5",0x6A47],
+ ["BEF6",0x6A35],
+ ["BEF7",0x6A5F],
+ ["BEF8",0x6A48],
+ ["BEF9",0x6B59],
+ ["BEFA",0x6B77],
+ ["BEFB",0x6C05],
+ ["BEFC",0x6FC2],
+ ["BEFD",0x6FB1],
+ ["BEFE",0x6FA1],
+ ["BF40",0x6FC3],
+ ["BF41",0x6FA4],
+ ["BF42",0x6FC1],
+ ["BF43",0x6FA7],
+ ["BF44",0x6FB3],
+ ["BF45",0x6FC0],
+ ["BF46",0x6FB9],
+ ["BF47",0x6FB6],
+ ["BF48",0x6FA6],
+ ["BF49",0x6FA0],
+ ["BF4A",0x6FB4],
+ ["BF4B",0x71BE],
+ ["BF4C",0x71C9],
+ ["BF4D",0x71D0],
+ ["BF4E",0x71D2],
+ ["BF4F",0x71C8],
+ ["BF50",0x71D5],
+ ["BF51",0x71B9],
+ ["BF52",0x71CE],
+ ["BF53",0x71D9],
+ ["BF54",0x71DC],
+ ["BF55",0x71C3],
+ ["BF56",0x71C4],
+ ["BF57",0x7368],
+ ["BF58",0x749C],
+ ["BF59",0x74A3],
+ ["BF5A",0x7498],
+ ["BF5B",0x749F],
+ ["BF5C",0x749E],
+ ["BF5D",0x74E2],
+ ["BF5E",0x750C],
+ ["BF5F",0x750D],
+ ["BF60",0x7634],
+ ["BF61",0x7638],
+ ["BF62",0x763A],
+ ["BF63",0x76E7],
+ ["BF64",0x76E5],
+ ["BF65",0x77A0],
+ ["BF66",0x779E],
+ ["BF67",0x779F],
+ ["BF68",0x77A5],
+ ["BF69",0x78E8],
+ ["BF6A",0x78DA],
+ ["BF6B",0x78EC],
+ ["BF6C",0x78E7],
+ ["BF6D",0x79A6],
+ ["BF6E",0x7A4D],
+ ["BF6F",0x7A4E],
+ ["BF70",0x7A46],
+ ["BF71",0x7A4C],
+ ["BF72",0x7A4B],
+ ["BF73",0x7ABA],
+ ["BF74",0x7BD9],
+ ["BF75",0x7C11],
+ ["BF76",0x7BC9],
+ ["BF77",0x7BE4],
+ ["BF78",0x7BDB],
+ ["BF79",0x7BE1],
+ ["BF7A",0x7BE9],
+ ["BF7B",0x7BE6],
+ ["BF7C",0x7CD5],
+ ["BF7D",0x7CD6],
+ ["BF7E",0x7E0A],
+ ["BFA1",0x7E11],
+ ["BFA2",0x7E08],
+ ["BFA3",0x7E1B],
+ ["BFA4",0x7E23],
+ ["BFA5",0x7E1E],
+ ["BFA6",0x7E1D],
+ ["BFA7",0x7E09],
+ ["BFA8",0x7E10],
+ ["BFA9",0x7F79],
+ ["BFAA",0x7FB2],
+ ["BFAB",0x7FF0],
+ ["BFAC",0x7FF1],
+ ["BFAD",0x7FEE],
+ ["BFAE",0x8028],
+ ["BFAF",0x81B3],
+ ["BFB0",0x81A9],
+ ["BFB1",0x81A8],
+ ["BFB2",0x81FB],
+ ["BFB3",0x8208],
+ ["BFB4",0x8258],
+ ["BFB5",0x8259],
+ ["BFB6",0x854A],
+ ["BFB7",0x8559],
+ ["BFB8",0x8548],
+ ["BFB9",0x8568],
+ ["BFBA",0x8569],
+ ["BFBB",0x8543],
+ ["BFBC",0x8549],
+ ["BFBD",0x856D],
+ ["BFBE",0x856A],
+ ["BFBF",0x855E],
+ ["BFC0",0x8783],
+ ["BFC1",0x879F],
+ ["BFC2",0x879E],
+ ["BFC3",0x87A2],
+ ["BFC4",0x878D],
+ ["BFC5",0x8861],
+ ["BFC6",0x892A],
+ ["BFC7",0x8932],
+ ["BFC8",0x8925],
+ ["BFC9",0x892B],
+ ["BFCA",0x8921],
+ ["BFCB",0x89AA],
+ ["BFCC",0x89A6],
+ ["BFCD",0x8AE6],
+ ["BFCE",0x8AFA],
+ ["BFCF",0x8AEB],
+ ["BFD0",0x8AF1],
+ ["BFD1",0x8B00],
+ ["BFD2",0x8ADC],
+ ["BFD3",0x8AE7],
+ ["BFD4",0x8AEE],
+ ["BFD5",0x8AFE],
+ ["BFD6",0x8B01],
+ ["BFD7",0x8B02],
+ ["BFD8",0x8AF7],
+ ["BFD9",0x8AED],
+ ["BFDA",0x8AF3],
+ ["BFDB",0x8AF6],
+ ["BFDC",0x8AFC],
+ ["BFDD",0x8C6B],
+ ["BFDE",0x8C6D],
+ ["BFDF",0x8C93],
+ ["BFE0",0x8CF4],
+ ["BFE1",0x8E44],
+ ["BFE2",0x8E31],
+ ["BFE3",0x8E34],
+ ["BFE4",0x8E42],
+ ["BFE5",0x8E39],
+ ["BFE6",0x8E35],
+ ["BFE7",0x8F3B],
+ ["BFE8",0x8F2F],
+ ["BFE9",0x8F38],
+ ["BFEA",0x8F33],
+ ["BFEB",0x8FA8],
+ ["BFEC",0x8FA6],
+ ["BFED",0x9075],
+ ["BFEE",0x9074],
+ ["BFEF",0x9078],
+ ["BFF0",0x9072],
+ ["BFF1",0x907C],
+ ["BFF2",0x907A],
+ ["BFF3",0x9134],
+ ["BFF4",0x9192],
+ ["BFF5",0x9320],
+ ["BFF6",0x9336],
+ ["BFF7",0x92F8],
+ ["BFF8",0x9333],
+ ["BFF9",0x932F],
+ ["BFFA",0x9322],
+ ["BFFB",0x92FC],
+ ["BFFC",0x932B],
+ ["BFFD",0x9304],
+ ["BFFE",0x931A],
+ ["C040",0x9310],
+ ["C041",0x9326],
+ ["C042",0x9321],
+ ["C043",0x9315],
+ ["C044",0x932E],
+ ["C045",0x9319],
+ ["C046",0x95BB],
+ ["C047",0x96A7],
+ ["C048",0x96A8],
+ ["C049",0x96AA],
+ ["C04A",0x96D5],
+ ["C04B",0x970E],
+ ["C04C",0x9711],
+ ["C04D",0x9716],
+ ["C04E",0x970D],
+ ["C04F",0x9713],
+ ["C050",0x970F],
+ ["C051",0x975B],
+ ["C052",0x975C],
+ ["C053",0x9766],
+ ["C054",0x9798],
+ ["C055",0x9830],
+ ["C056",0x9838],
+ ["C057",0x983B],
+ ["C058",0x9837],
+ ["C059",0x982D],
+ ["C05A",0x9839],
+ ["C05B",0x9824],
+ ["C05C",0x9910],
+ ["C05D",0x9928],
+ ["C05E",0x991E],
+ ["C05F",0x991B],
+ ["C060",0x9921],
+ ["C061",0x991A],
+ ["C062",0x99ED],
+ ["C063",0x99E2],
+ ["C064",0x99F1],
+ ["C065",0x9AB8],
+ ["C066",0x9ABC],
+ ["C067",0x9AFB],
+ ["C068",0x9AED],
+ ["C069",0x9B28],
+ ["C06A",0x9B91],
+ ["C06B",0x9D15],
+ ["C06C",0x9D23],
+ ["C06D",0x9D26],
+ ["C06E",0x9D28],
+ ["C06F",0x9D12],
+ ["C070",0x9D1B],
+ ["C071",0x9ED8],
+ ["C072",0x9ED4],
+ ["C073",0x9F8D],
+ ["C074",0x9F9C],
+ ["C075",0x512A],
+ ["C076",0x511F],
+ ["C077",0x5121],
+ ["C078",0x5132],
+ ["C079",0x52F5],
+ ["C07A",0x568E],
+ ["C07B",0x5680],
+ ["C07C",0x5690],
+ ["C07D",0x5685],
+ ["C07E",0x5687],
+ ["C0A1",0x568F],
+ ["C0A2",0x58D5],
+ ["C0A3",0x58D3],
+ ["C0A4",0x58D1],
+ ["C0A5",0x58CE],
+ ["C0A6",0x5B30],
+ ["C0A7",0x5B2A],
+ ["C0A8",0x5B24],
+ ["C0A9",0x5B7A],
+ ["C0AA",0x5C37],
+ ["C0AB",0x5C68],
+ ["C0AC",0x5DBC],
+ ["C0AD",0x5DBA],
+ ["C0AE",0x5DBD],
+ ["C0AF",0x5DB8],
+ ["C0B0",0x5E6B],
+ ["C0B1",0x5F4C],
+ ["C0B2",0x5FBD],
+ ["C0B3",0x61C9],
+ ["C0B4",0x61C2],
+ ["C0B5",0x61C7],
+ ["C0B6",0x61E6],
+ ["C0B7",0x61CB],
+ ["C0B8",0x6232],
+ ["C0B9",0x6234],
+ ["C0BA",0x64CE],
+ ["C0BB",0x64CA],
+ ["C0BC",0x64D8],
+ ["C0BD",0x64E0],
+ ["C0BE",0x64F0],
+ ["C0BF",0x64E6],
+ ["C0C0",0x64EC],
+ ["C0C1",0x64F1],
+ ["C0C2",0x64E2],
+ ["C0C3",0x64ED],
+ ["C0C4",0x6582],
+ ["C0C5",0x6583],
+ ["C0C6",0x66D9],
+ ["C0C7",0x66D6],
+ ["C0C8",0x6A80],
+ ["C0C9",0x6A94],
+ ["C0CA",0x6A84],
+ ["C0CB",0x6AA2],
+ ["C0CC",0x6A9C],
+ ["C0CD",0x6ADB],
+ ["C0CE",0x6AA3],
+ ["C0CF",0x6A7E],
+ ["C0D0",0x6A97],
+ ["C0D1",0x6A90],
+ ["C0D2",0x6AA0],
+ ["C0D3",0x6B5C],
+ ["C0D4",0x6BAE],
+ ["C0D5",0x6BDA],
+ ["C0D6",0x6C08],
+ ["C0D7",0x6FD8],
+ ["C0D8",0x6FF1],
+ ["C0D9",0x6FDF],
+ ["C0DA",0x6FE0],
+ ["C0DB",0x6FDB],
+ ["C0DC",0x6FE4],
+ ["C0DD",0x6FEB],
+ ["C0DE",0x6FEF],
+ ["C0DF",0x6F80],
+ ["C0E0",0x6FEC],
+ ["C0E1",0x6FE1],
+ ["C0E2",0x6FE9],
+ ["C0E3",0x6FD5],
+ ["C0E4",0x6FEE],
+ ["C0E5",0x6FF0],
+ ["C0E6",0x71E7],
+ ["C0E7",0x71DF],
+ ["C0E8",0x71EE],
+ ["C0E9",0x71E6],
+ ["C0EA",0x71E5],
+ ["C0EB",0x71ED],
+ ["C0EC",0x71EC],
+ ["C0ED",0x71F4],
+ ["C0EE",0x71E0],
+ ["C0EF",0x7235],
+ ["C0F0",0x7246],
+ ["C0F1",0x7370],
+ ["C0F2",0x7372],
+ ["C0F3",0x74A9],
+ ["C0F4",0x74B0],
+ ["C0F5",0x74A6],
+ ["C0F6",0x74A8],
+ ["C0F7",0x7646],
+ ["C0F8",0x7642],
+ ["C0F9",0x764C],
+ ["C0FA",0x76EA],
+ ["C0FB",0x77B3],
+ ["C0FC",0x77AA],
+ ["C0FD",0x77B0],
+ ["C0FE",0x77AC],
+ ["C140",0x77A7],
+ ["C141",0x77AD],
+ ["C142",0x77EF],
+ ["C143",0x78F7],
+ ["C144",0x78FA],
+ ["C145",0x78F4],
+ ["C146",0x78EF],
+ ["C147",0x7901],
+ ["C148",0x79A7],
+ ["C149",0x79AA],
+ ["C14A",0x7A57],
+ ["C14B",0x7ABF],
+ ["C14C",0x7C07],
+ ["C14D",0x7C0D],
+ ["C14E",0x7BFE],
+ ["C14F",0x7BF7],
+ ["C150",0x7C0C],
+ ["C151",0x7BE0],
+ ["C152",0x7CE0],
+ ["C153",0x7CDC],
+ ["C154",0x7CDE],
+ ["C155",0x7CE2],
+ ["C156",0x7CDF],
+ ["C157",0x7CD9],
+ ["C158",0x7CDD],
+ ["C159",0x7E2E],
+ ["C15A",0x7E3E],
+ ["C15B",0x7E46],
+ ["C15C",0x7E37],
+ ["C15D",0x7E32],
+ ["C15E",0x7E43],
+ ["C15F",0x7E2B],
+ ["C160",0x7E3D],
+ ["C161",0x7E31],
+ ["C162",0x7E45],
+ ["C163",0x7E41],
+ ["C164",0x7E34],
+ ["C165",0x7E39],
+ ["C166",0x7E48],
+ ["C167",0x7E35],
+ ["C168",0x7E3F],
+ ["C169",0x7E2F],
+ ["C16A",0x7F44],
+ ["C16B",0x7FF3],
+ ["C16C",0x7FFC],
+ ["C16D",0x8071],
+ ["C16E",0x8072],
+ ["C16F",0x8070],
+ ["C170",0x806F],
+ ["C171",0x8073],
+ ["C172",0x81C6],
+ ["C173",0x81C3],
+ ["C174",0x81BA],
+ ["C175",0x81C2],
+ ["C176",0x81C0],
+ ["C177",0x81BF],
+ ["C178",0x81BD],
+ ["C179",0x81C9],
+ ["C17A",0x81BE],
+ ["C17B",0x81E8],
+ ["C17C",0x8209],
+ ["C17D",0x8271],
+ ["C17E",0x85AA],
+ ["C1A1",0x8584],
+ ["C1A2",0x857E],
+ ["C1A3",0x859C],
+ ["C1A4",0x8591],
+ ["C1A5",0x8594],
+ ["C1A6",0x85AF],
+ ["C1A7",0x859B],
+ ["C1A8",0x8587],
+ ["C1A9",0x85A8],
+ ["C1AA",0x858A],
+ ["C1AB",0x8667],
+ ["C1AC",0x87C0],
+ ["C1AD",0x87D1],
+ ["C1AE",0x87B3],
+ ["C1AF",0x87D2],
+ ["C1B0",0x87C6],
+ ["C1B1",0x87AB],
+ ["C1B2",0x87BB],
+ ["C1B3",0x87BA],
+ ["C1B4",0x87C8],
+ ["C1B5",0x87CB],
+ ["C1B6",0x893B],
+ ["C1B7",0x8936],
+ ["C1B8",0x8944],
+ ["C1B9",0x8938],
+ ["C1BA",0x893D],
+ ["C1BB",0x89AC],
+ ["C1BC",0x8B0E],
+ ["C1BD",0x8B17],
+ ["C1BE",0x8B19],
+ ["C1BF",0x8B1B],
+ ["C1C0",0x8B0A],
+ ["C1C1",0x8B20],
+ ["C1C2",0x8B1D],
+ ["C1C3",0x8B04],
+ ["C1C4",0x8B10],
+ ["C1C5",0x8C41],
+ ["C1C6",0x8C3F],
+ ["C1C7",0x8C73],
+ ["C1C8",0x8CFA],
+ ["C1C9",0x8CFD],
+ ["C1CA",0x8CFC],
+ ["C1CB",0x8CF8],
+ ["C1CC",0x8CFB],
+ ["C1CD",0x8DA8],
+ ["C1CE",0x8E49],
+ ["C1CF",0x8E4B],
+ ["C1D0",0x8E48],
+ ["C1D1",0x8E4A],
+ ["C1D2",0x8F44],
+ ["C1D3",0x8F3E],
+ ["C1D4",0x8F42],
+ ["C1D5",0x8F45],
+ ["C1D6",0x8F3F],
+ ["C1D7",0x907F],
+ ["C1D8",0x907D],
+ ["C1D9",0x9084],
+ ["C1DA",0x9081],
+ ["C1DB",0x9082],
+ ["C1DC",0x9080],
+ ["C1DD",0x9139],
+ ["C1DE",0x91A3],
+ ["C1DF",0x919E],
+ ["C1E0",0x919C],
+ ["C1E1",0x934D],
+ ["C1E2",0x9382],
+ ["C1E3",0x9328],
+ ["C1E4",0x9375],
+ ["C1E5",0x934A],
+ ["C1E6",0x9365],
+ ["C1E7",0x934B],
+ ["C1E8",0x9318],
+ ["C1E9",0x937E],
+ ["C1EA",0x936C],
+ ["C1EB",0x935B],
+ ["C1EC",0x9370],
+ ["C1ED",0x935A],
+ ["C1EE",0x9354],
+ ["C1EF",0x95CA],
+ ["C1F0",0x95CB],
+ ["C1F1",0x95CC],
+ ["C1F2",0x95C8],
+ ["C1F3",0x95C6],
+ ["C1F4",0x96B1],
+ ["C1F5",0x96B8],
+ ["C1F6",0x96D6],
+ ["C1F7",0x971C],
+ ["C1F8",0x971E],
+ ["C1F9",0x97A0],
+ ["C1FA",0x97D3],
+ ["C1FB",0x9846],
+ ["C1FC",0x98B6],
+ ["C1FD",0x9935],
+ ["C1FE",0x9A01],
+ ["C240",0x99FF],
+ ["C241",0x9BAE],
+ ["C242",0x9BAB],
+ ["C243",0x9BAA],
+ ["C244",0x9BAD],
+ ["C245",0x9D3B],
+ ["C246",0x9D3F],
+ ["C247",0x9E8B],
+ ["C248",0x9ECF],
+ ["C249",0x9EDE],
+ ["C24A",0x9EDC],
+ ["C24B",0x9EDD],
+ ["C24C",0x9EDB],
+ ["C24D",0x9F3E],
+ ["C24E",0x9F4B],
+ ["C24F",0x53E2],
+ ["C250",0x5695],
+ ["C251",0x56AE],
+ ["C252",0x58D9],
+ ["C253",0x58D8],
+ ["C254",0x5B38],
+ ["C255",0x5F5D],
+ ["C256",0x61E3],
+ ["C257",0x6233],
+ ["C258",0x64F4],
+ ["C259",0x64F2],
+ ["C25A",0x64FE],
+ ["C25B",0x6506],
+ ["C25C",0x64FA],
+ ["C25D",0x64FB],
+ ["C25E",0x64F7],
+ ["C25F",0x65B7],
+ ["C260",0x66DC],
+ ["C261",0x6726],
+ ["C262",0x6AB3],
+ ["C263",0x6AAC],
+ ["C264",0x6AC3],
+ ["C265",0x6ABB],
+ ["C266",0x6AB8],
+ ["C267",0x6AC2],
+ ["C268",0x6AAE],
+ ["C269",0x6AAF],
+ ["C26A",0x6B5F],
+ ["C26B",0x6B78],
+ ["C26C",0x6BAF],
+ ["C26D",0x7009],
+ ["C26E",0x700B],
+ ["C26F",0x6FFE],
+ ["C270",0x7006],
+ ["C271",0x6FFA],
+ ["C272",0x7011],
+ ["C273",0x700F],
+ ["C274",0x71FB],
+ ["C275",0x71FC],
+ ["C276",0x71FE],
+ ["C277",0x71F8],
+ ["C278",0x7377],
+ ["C279",0x7375],
+ ["C27A",0x74A7],
+ ["C27B",0x74BF],
+ ["C27C",0x7515],
+ ["C27D",0x7656],
+ ["C27E",0x7658],
+ ["C2A1",0x7652],
+ ["C2A2",0x77BD],
+ ["C2A3",0x77BF],
+ ["C2A4",0x77BB],
+ ["C2A5",0x77BC],
+ ["C2A6",0x790E],
+ ["C2A7",0x79AE],
+ ["C2A8",0x7A61],
+ ["C2A9",0x7A62],
+ ["C2AA",0x7A60],
+ ["C2AB",0x7AC4],
+ ["C2AC",0x7AC5],
+ ["C2AD",0x7C2B],
+ ["C2AE",0x7C27],
+ ["C2AF",0x7C2A],
+ ["C2B0",0x7C1E],
+ ["C2B1",0x7C23],
+ ["C2B2",0x7C21],
+ ["C2B3",0x7CE7],
+ ["C2B4",0x7E54],
+ ["C2B5",0x7E55],
+ ["C2B6",0x7E5E],
+ ["C2B7",0x7E5A],
+ ["C2B8",0x7E61],
+ ["C2B9",0x7E52],
+ ["C2BA",0x7E59],
+ ["C2BB",0x7F48],
+ ["C2BC",0x7FF9],
+ ["C2BD",0x7FFB],
+ ["C2BE",0x8077],
+ ["C2BF",0x8076],
+ ["C2C0",0x81CD],
+ ["C2C1",0x81CF],
+ ["C2C2",0x820A],
+ ["C2C3",0x85CF],
+ ["C2C4",0x85A9],
+ ["C2C5",0x85CD],
+ ["C2C6",0x85D0],
+ ["C2C7",0x85C9],
+ ["C2C8",0x85B0],
+ ["C2C9",0x85BA],
+ ["C2CA",0x85B9],
+ ["C2CB",0x85A6],
+ ["C2CC",0x87EF],
+ ["C2CD",0x87EC],
+ ["C2CE",0x87F2],
+ ["C2CF",0x87E0],
+ ["C2D0",0x8986],
+ ["C2D1",0x89B2],
+ ["C2D2",0x89F4],
+ ["C2D3",0x8B28],
+ ["C2D4",0x8B39],
+ ["C2D5",0x8B2C],
+ ["C2D6",0x8B2B],
+ ["C2D7",0x8C50],
+ ["C2D8",0x8D05],
+ ["C2D9",0x8E59],
+ ["C2DA",0x8E63],
+ ["C2DB",0x8E66],
+ ["C2DC",0x8E64],
+ ["C2DD",0x8E5F],
+ ["C2DE",0x8E55],
+ ["C2DF",0x8EC0],
+ ["C2E0",0x8F49],
+ ["C2E1",0x8F4D],
+ ["C2E2",0x9087],
+ ["C2E3",0x9083],
+ ["C2E4",0x9088],
+ ["C2E5",0x91AB],
+ ["C2E6",0x91AC],
+ ["C2E7",0x91D0],
+ ["C2E8",0x9394],
+ ["C2E9",0x938A],
+ ["C2EA",0x9396],
+ ["C2EB",0x93A2],
+ ["C2EC",0x93B3],
+ ["C2ED",0x93AE],
+ ["C2EE",0x93AC],
+ ["C2EF",0x93B0],
+ ["C2F0",0x9398],
+ ["C2F1",0x939A],
+ ["C2F2",0x9397],
+ ["C2F3",0x95D4],
+ ["C2F4",0x95D6],
+ ["C2F5",0x95D0],
+ ["C2F6",0x95D5],
+ ["C2F7",0x96E2],
+ ["C2F8",0x96DC],
+ ["C2F9",0x96D9],
+ ["C2FA",0x96DB],
+ ["C2FB",0x96DE],
+ ["C2FC",0x9724],
+ ["C2FD",0x97A3],
+ ["C2FE",0x97A6],
+ ["C340",0x97AD],
+ ["C341",0x97F9],
+ ["C342",0x984D],
+ ["C343",0x984F],
+ ["C344",0x984C],
+ ["C345",0x984E],
+ ["C346",0x9853],
+ ["C347",0x98BA],
+ ["C348",0x993E],
+ ["C349",0x993F],
+ ["C34A",0x993D],
+ ["C34B",0x992E],
+ ["C34C",0x99A5],
+ ["C34D",0x9A0E],
+ ["C34E",0x9AC1],
+ ["C34F",0x9B03],
+ ["C350",0x9B06],
+ ["C351",0x9B4F],
+ ["C352",0x9B4E],
+ ["C353",0x9B4D],
+ ["C354",0x9BCA],
+ ["C355",0x9BC9],
+ ["C356",0x9BFD],
+ ["C357",0x9BC8],
+ ["C358",0x9BC0],
+ ["C359",0x9D51],
+ ["C35A",0x9D5D],
+ ["C35B",0x9D60],
+ ["C35C",0x9EE0],
+ ["C35D",0x9F15],
+ ["C35E",0x9F2C],
+ ["C35F",0x5133],
+ ["C360",0x56A5],
+ ["C361",0x58DE],
+ ["C362",0x58DF],
+ ["C363",0x58E2],
+ ["C364",0x5BF5],
+ ["C365",0x9F90],
+ ["C366",0x5EEC],
+ ["C367",0x61F2],
+ ["C368",0x61F7],
+ ["C369",0x61F6],
+ ["C36A",0x61F5],
+ ["C36B",0x6500],
+ ["C36C",0x650F],
+ ["C36D",0x66E0],
+ ["C36E",0x66DD],
+ ["C36F",0x6AE5],
+ ["C370",0x6ADD],
+ ["C371",0x6ADA],
+ ["C372",0x6AD3],
+ ["C373",0x701B],
+ ["C374",0x701F],
+ ["C375",0x7028],
+ ["C376",0x701A],
+ ["C377",0x701D],
+ ["C378",0x7015],
+ ["C379",0x7018],
+ ["C37A",0x7206],
+ ["C37B",0x720D],
+ ["C37C",0x7258],
+ ["C37D",0x72A2],
+ ["C37E",0x7378],
+ ["C3A1",0x737A],
+ ["C3A2",0x74BD],
+ ["C3A3",0x74CA],
+ ["C3A4",0x74E3],
+ ["C3A5",0x7587],
+ ["C3A6",0x7586],
+ ["C3A7",0x765F],
+ ["C3A8",0x7661],
+ ["C3A9",0x77C7],
+ ["C3AA",0x7919],
+ ["C3AB",0x79B1],
+ ["C3AC",0x7A6B],
+ ["C3AD",0x7A69],
+ ["C3AE",0x7C3E],
+ ["C3AF",0x7C3F],
+ ["C3B0",0x7C38],
+ ["C3B1",0x7C3D],
+ ["C3B2",0x7C37],
+ ["C3B3",0x7C40],
+ ["C3B4",0x7E6B],
+ ["C3B5",0x7E6D],
+ ["C3B6",0x7E79],
+ ["C3B7",0x7E69],
+ ["C3B8",0x7E6A],
+ ["C3B9",0x7F85],
+ ["C3BA",0x7E73],
+ ["C3BB",0x7FB6],
+ ["C3BC",0x7FB9],
+ ["C3BD",0x7FB8],
+ ["C3BE",0x81D8],
+ ["C3BF",0x85E9],
+ ["C3C0",0x85DD],
+ ["C3C1",0x85EA],
+ ["C3C2",0x85D5],
+ ["C3C3",0x85E4],
+ ["C3C4",0x85E5],
+ ["C3C5",0x85F7],
+ ["C3C6",0x87FB],
+ ["C3C7",0x8805],
+ ["C3C8",0x880D],
+ ["C3C9",0x87F9],
+ ["C3CA",0x87FE],
+ ["C3CB",0x8960],
+ ["C3CC",0x895F],
+ ["C3CD",0x8956],
+ ["C3CE",0x895E],
+ ["C3CF",0x8B41],
+ ["C3D0",0x8B5C],
+ ["C3D1",0x8B58],
+ ["C3D2",0x8B49],
+ ["C3D3",0x8B5A],
+ ["C3D4",0x8B4E],
+ ["C3D5",0x8B4F],
+ ["C3D6",0x8B46],
+ ["C3D7",0x8B59],
+ ["C3D8",0x8D08],
+ ["C3D9",0x8D0A],
+ ["C3DA",0x8E7C],
+ ["C3DB",0x8E72],
+ ["C3DC",0x8E87],
+ ["C3DD",0x8E76],
+ ["C3DE",0x8E6C],
+ ["C3DF",0x8E7A],
+ ["C3E0",0x8E74],
+ ["C3E1",0x8F54],
+ ["C3E2",0x8F4E],
+ ["C3E3",0x8FAD],
+ ["C3E4",0x908A],
+ ["C3E5",0x908B],
+ ["C3E6",0x91B1],
+ ["C3E7",0x91AE],
+ ["C3E8",0x93E1],
+ ["C3E9",0x93D1],
+ ["C3EA",0x93DF],
+ ["C3EB",0x93C3],
+ ["C3EC",0x93C8],
+ ["C3ED",0x93DC],
+ ["C3EE",0x93DD],
+ ["C3EF",0x93D6],
+ ["C3F0",0x93E2],
+ ["C3F1",0x93CD],
+ ["C3F2",0x93D8],
+ ["C3F3",0x93E4],
+ ["C3F4",0x93D7],
+ ["C3F5",0x93E8],
+ ["C3F6",0x95DC],
+ ["C3F7",0x96B4],
+ ["C3F8",0x96E3],
+ ["C3F9",0x972A],
+ ["C3FA",0x9727],
+ ["C3FB",0x9761],
+ ["C3FC",0x97DC],
+ ["C3FD",0x97FB],
+ ["C3FE",0x985E],
+ ["C440",0x9858],
+ ["C441",0x985B],
+ ["C442",0x98BC],
+ ["C443",0x9945],
+ ["C444",0x9949],
+ ["C445",0x9A16],
+ ["C446",0x9A19],
+ ["C447",0x9B0D],
+ ["C448",0x9BE8],
+ ["C449",0x9BE7],
+ ["C44A",0x9BD6],
+ ["C44B",0x9BDB],
+ ["C44C",0x9D89],
+ ["C44D",0x9D61],
+ ["C44E",0x9D72],
+ ["C44F",0x9D6A],
+ ["C450",0x9D6C],
+ ["C451",0x9E92],
+ ["C452",0x9E97],
+ ["C453",0x9E93],
+ ["C454",0x9EB4],
+ ["C455",0x52F8],
+ ["C456",0x56A8],
+ ["C457",0x56B7],
+ ["C458",0x56B6],
+ ["C459",0x56B4],
+ ["C45A",0x56BC],
+ ["C45B",0x58E4],
+ ["C45C",0x5B40],
+ ["C45D",0x5B43],
+ ["C45E",0x5B7D],
+ ["C45F",0x5BF6],
+ ["C460",0x5DC9],
+ ["C461",0x61F8],
+ ["C462",0x61FA],
+ ["C463",0x6518],
+ ["C464",0x6514],
+ ["C465",0x6519],
+ ["C466",0x66E6],
+ ["C467",0x6727],
+ ["C468",0x6AEC],
+ ["C469",0x703E],
+ ["C46A",0x7030],
+ ["C46B",0x7032],
+ ["C46C",0x7210],
+ ["C46D",0x737B],
+ ["C46E",0x74CF],
+ ["C46F",0x7662],
+ ["C470",0x7665],
+ ["C471",0x7926],
+ ["C472",0x792A],
+ ["C473",0x792C],
+ ["C474",0x792B],
+ ["C475",0x7AC7],
+ ["C476",0x7AF6],
+ ["C477",0x7C4C],
+ ["C478",0x7C43],
+ ["C479",0x7C4D],
+ ["C47A",0x7CEF],
+ ["C47B",0x7CF0],
+ ["C47C",0x8FAE],
+ ["C47D",0x7E7D],
+ ["C47E",0x7E7C],
+ ["C4A1",0x7E82],
+ ["C4A2",0x7F4C],
+ ["C4A3",0x8000],
+ ["C4A4",0x81DA],
+ ["C4A5",0x8266],
+ ["C4A6",0x85FB],
+ ["C4A7",0x85F9],
+ ["C4A8",0x8611],
+ ["C4A9",0x85FA],
+ ["C4AA",0x8606],
+ ["C4AB",0x860B],
+ ["C4AC",0x8607],
+ ["C4AD",0x860A],
+ ["C4AE",0x8814],
+ ["C4AF",0x8815],
+ ["C4B0",0x8964],
+ ["C4B1",0x89BA],
+ ["C4B2",0x89F8],
+ ["C4B3",0x8B70],
+ ["C4B4",0x8B6C],
+ ["C4B5",0x8B66],
+ ["C4B6",0x8B6F],
+ ["C4B7",0x8B5F],
+ ["C4B8",0x8B6B],
+ ["C4B9",0x8D0F],
+ ["C4BA",0x8D0D],
+ ["C4BB",0x8E89],
+ ["C4BC",0x8E81],
+ ["C4BD",0x8E85],
+ ["C4BE",0x8E82],
+ ["C4BF",0x91B4],
+ ["C4C0",0x91CB],
+ ["C4C1",0x9418],
+ ["C4C2",0x9403],
+ ["C4C3",0x93FD],
+ ["C4C4",0x95E1],
+ ["C4C5",0x9730],
+ ["C4C6",0x98C4],
+ ["C4C7",0x9952],
+ ["C4C8",0x9951],
+ ["C4C9",0x99A8],
+ ["C4CA",0x9A2B],
+ ["C4CB",0x9A30],
+ ["C4CC",0x9A37],
+ ["C4CD",0x9A35],
+ ["C4CE",0x9C13],
+ ["C4CF",0x9C0D],
+ ["C4D0",0x9E79],
+ ["C4D1",0x9EB5],
+ ["C4D2",0x9EE8],
+ ["C4D3",0x9F2F],
+ ["C4D4",0x9F5F],
+ ["C4D5",0x9F63],
+ ["C4D6",0x9F61],
+ ["C4D7",0x5137],
+ ["C4D8",0x5138],
+ ["C4D9",0x56C1],
+ ["C4DA",0x56C0],
+ ["C4DB",0x56C2],
+ ["C4DC",0x5914],
+ ["C4DD",0x5C6C],
+ ["C4DE",0x5DCD],
+ ["C4DF",0x61FC],
+ ["C4E0",0x61FE],
+ ["C4E1",0x651D],
+ ["C4E2",0x651C],
+ ["C4E3",0x6595],
+ ["C4E4",0x66E9],
+ ["C4E5",0x6AFB],
+ ["C4E6",0x6B04],
+ ["C4E7",0x6AFA],
+ ["C4E8",0x6BB2],
+ ["C4E9",0x704C],
+ ["C4EA",0x721B],
+ ["C4EB",0x72A7],
+ ["C4EC",0x74D6],
+ ["C4ED",0x74D4],
+ ["C4EE",0x7669],
+ ["C4EF",0x77D3],
+ ["C4F0",0x7C50],
+ ["C4F1",0x7E8F],
+ ["C4F2",0x7E8C],
+ ["C4F3",0x7FBC],
+ ["C4F4",0x8617],
+ ["C4F5",0x862D],
+ ["C4F6",0x861A],
+ ["C4F7",0x8823],
+ ["C4F8",0x8822],
+ ["C4F9",0x8821],
+ ["C4FA",0x881F],
+ ["C4FB",0x896A],
+ ["C4FC",0x896C],
+ ["C4FD",0x89BD],
+ ["C4FE",0x8B74],
+ ["C540",0x8B77],
+ ["C541",0x8B7D],
+ ["C542",0x8D13],
+ ["C543",0x8E8A],
+ ["C544",0x8E8D],
+ ["C545",0x8E8B],
+ ["C546",0x8F5F],
+ ["C547",0x8FAF],
+ ["C548",0x91BA],
+ ["C549",0x942E],
+ ["C54A",0x9433],
+ ["C54B",0x9435],
+ ["C54C",0x943A],
+ ["C54D",0x9438],
+ ["C54E",0x9432],
+ ["C54F",0x942B],
+ ["C550",0x95E2],
+ ["C551",0x9738],
+ ["C552",0x9739],
+ ["C553",0x9732],
+ ["C554",0x97FF],
+ ["C555",0x9867],
+ ["C556",0x9865],
+ ["C557",0x9957],
+ ["C558",0x9A45],
+ ["C559",0x9A43],
+ ["C55A",0x9A40],
+ ["C55B",0x9A3E],
+ ["C55C",0x9ACF],
+ ["C55D",0x9B54],
+ ["C55E",0x9B51],
+ ["C55F",0x9C2D],
+ ["C560",0x9C25],
+ ["C561",0x9DAF],
+ ["C562",0x9DB4],
+ ["C563",0x9DC2],
+ ["C564",0x9DB8],
+ ["C565",0x9E9D],
+ ["C566",0x9EEF],
+ ["C567",0x9F19],
+ ["C568",0x9F5C],
+ ["C569",0x9F66],
+ ["C56A",0x9F67],
+ ["C56B",0x513C],
+ ["C56C",0x513B],
+ ["C56D",0x56C8],
+ ["C56E",0x56CA],
+ ["C56F",0x56C9],
+ ["C570",0x5B7F],
+ ["C571",0x5DD4],
+ ["C572",0x5DD2],
+ ["C573",0x5F4E],
+ ["C574",0x61FF],
+ ["C575",0x6524],
+ ["C576",0x6B0A],
+ ["C577",0x6B61],
+ ["C578",0x7051],
+ ["C579",0x7058],
+ ["C57A",0x7380],
+ ["C57B",0x74E4],
+ ["C57C",0x758A],
+ ["C57D",0x766E],
+ ["C57E",0x766C],
+ ["C5A1",0x79B3],
+ ["C5A2",0x7C60],
+ ["C5A3",0x7C5F],
+ ["C5A4",0x807E],
+ ["C5A5",0x807D],
+ ["C5A6",0x81DF],
+ ["C5A7",0x8972],
+ ["C5A8",0x896F],
+ ["C5A9",0x89FC],
+ ["C5AA",0x8B80],
+ ["C5AB",0x8D16],
+ ["C5AC",0x8D17],
+ ["C5AD",0x8E91],
+ ["C5AE",0x8E93],
+ ["C5AF",0x8F61],
+ ["C5B0",0x9148],
+ ["C5B1",0x9444],
+ ["C5B2",0x9451],
+ ["C5B3",0x9452],
+ ["C5B4",0x973D],
+ ["C5B5",0x973E],
+ ["C5B6",0x97C3],
+ ["C5B7",0x97C1],
+ ["C5B8",0x986B],
+ ["C5B9",0x9955],
+ ["C5BA",0x9A55],
+ ["C5BB",0x9A4D],
+ ["C5BC",0x9AD2],
+ ["C5BD",0x9B1A],
+ ["C5BE",0x9C49],
+ ["C5BF",0x9C31],
+ ["C5C0",0x9C3E],
+ ["C5C1",0x9C3B],
+ ["C5C2",0x9DD3],
+ ["C5C3",0x9DD7],
+ ["C5C4",0x9F34],
+ ["C5C5",0x9F6C],
+ ["C5C6",0x9F6A],
+ ["C5C7",0x9F94],
+ ["C5C8",0x56CC],
+ ["C5C9",0x5DD6],
+ ["C5CA",0x6200],
+ ["C5CB",0x6523],
+ ["C5CC",0x652B],
+ ["C5CD",0x652A],
+ ["C5CE",0x66EC],
+ ["C5CF",0x6B10],
+ ["C5D0",0x74DA],
+ ["C5D1",0x7ACA],
+ ["C5D2",0x7C64],
+ ["C5D3",0x7C63],
+ ["C5D4",0x7C65],
+ ["C5D5",0x7E93],
+ ["C5D6",0x7E96],
+ ["C5D7",0x7E94],
+ ["C5D8",0x81E2],
+ ["C5D9",0x8638],
+ ["C5DA",0x863F],
+ ["C5DB",0x8831],
+ ["C5DC",0x8B8A],
+ ["C5DD",0x9090],
+ ["C5DE",0x908F],
+ ["C5DF",0x9463],
+ ["C5E0",0x9460],
+ ["C5E1",0x9464],
+ ["C5E2",0x9768],
+ ["C5E3",0x986F],
+ ["C5E4",0x995C],
+ ["C5E5",0x9A5A],
+ ["C5E6",0x9A5B],
+ ["C5E7",0x9A57],
+ ["C5E8",0x9AD3],
+ ["C5E9",0x9AD4],
+ ["C5EA",0x9AD1],
+ ["C5EB",0x9C54],
+ ["C5EC",0x9C57],
+ ["C5ED",0x9C56],
+ ["C5EE",0x9DE5],
+ ["C5EF",0x9E9F],
+ ["C5F0",0x9EF4],
+ ["C5F1",0x56D1],
+ ["C5F2",0x58E9],
+ ["C5F3",0x652C],
+ ["C5F4",0x705E],
+ ["C5F5",0x7671],
+ ["C5F6",0x7672],
+ ["C5F7",0x77D7],
+ ["C5F8",0x7F50],
+ ["C5F9",0x7F88],
+ ["C5FA",0x8836],
+ ["C5FB",0x8839],
+ ["C5FC",0x8862],
+ ["C5FD",0x8B93],
+ ["C5FE",0x8B92],
+ ["C640",0x8B96],
+ ["C641",0x8277],
+ ["C642",0x8D1B],
+ ["C643",0x91C0],
+ ["C644",0x946A],
+ ["C645",0x9742],
+ ["C646",0x9748],
+ ["C647",0x9744],
+ ["C648",0x97C6],
+ ["C649",0x9870],
+ ["C64A",0x9A5F],
+ ["C64B",0x9B22],
+ ["C64C",0x9B58],
+ ["C64D",0x9C5F],
+ ["C64E",0x9DF9],
+ ["C64F",0x9DFA],
+ ["C650",0x9E7C],
+ ["C651",0x9E7D],
+ ["C652",0x9F07],
+ ["C653",0x9F77],
+ ["C654",0x9F72],
+ ["C655",0x5EF3],
+ ["C656",0x6B16],
+ ["C657",0x7063],
+ ["C658",0x7C6C],
+ ["C659",0x7C6E],
+ ["C65A",0x883B],
+ ["C65B",0x89C0],
+ ["C65C",0x8EA1],
+ ["C65D",0x91C1],
+ ["C65E",0x9472],
+ ["C65F",0x9470],
+ ["C660",0x9871],
+ ["C661",0x995E],
+ ["C662",0x9AD6],
+ ["C663",0x9B23],
+ ["C664",0x9ECC],
+ ["C665",0x7064],
+ ["C666",0x77DA],
+ ["C667",0x8B9A],
+ ["C668",0x9477],
+ ["C669",0x97C9],
+ ["C66A",0x9A62],
+ ["C66B",0x9A65],
+ ["C66C",0x7E9C],
+ ["C66D",0x8B9C],
+ ["C66E",0x8EAA],
+ ["C66F",0x91C5],
+ ["C670",0x947D],
+ ["C671",0x947E],
+ ["C672",0x947C],
+ ["C673",0x9C77],
+ ["C674",0x9C78],
+ ["C675",0x9EF7],
+ ["C676",0x8C54],
+ ["C677",0x947F],
+ ["C678",0x9E1A],
+ ["C679",0x7228],
+ ["C67A",0x9A6A],
+ ["C67B",0x9B31],
+ ["C67C",0x9E1B],
+ ["C67D",0x9E1E],
+ ["C67E",0x7C72],
+ ["C6A1",0x2460],
+ ["C6A2",0x2461],
+ ["C6A3",0x2462],
+ ["C6A4",0x2463],
+ ["C6A5",0x2464],
+ ["C6A6",0x2465],
+ ["C6A7",0x2466],
+ ["C6A8",0x2467],
+ ["C6A9",0x2468],
+ ["C6AA",0x2469],
+ ["C6AB",0x2474],
+ ["C6AC",0x2475],
+ ["C6AD",0x2476],
+ ["C6AE",0x2477],
+ ["C6AF",0x2478],
+ ["C6B0",0x2479],
+ ["C6B1",0x247A],
+ ["C6B2",0x247B],
+ ["C6B3",0x247C],
+ ["C6B4",0x247D],
+ ["C6B5",0x2170],
+ ["C6B6",0x2171],
+ ["C6B7",0x2172],
+ ["C6B8",0x2173],
+ ["C6B9",0x2174],
+ ["C6BA",0x2175],
+ ["C6BB",0x2176],
+ ["C6BC",0x2177],
+ ["C6BD",0x2178],
+ ["C6BE",0x2179],
+ ["C6BF",0x4E36],
+ ["C6C0",0x4E3F],
+ ["C6C1",0x4E85],
+ ["C6C2",0x4EA0],
+ ["C6C3",0x5182],
+ ["C6C4",0x5196],
+ ["C6C5",0x51AB],
+ ["C6C6",0x52F9],
+ ["C6C7",0x5338],
+ ["C6C8",0x5369],
+ ["C6C9",0x53B6],
+ ["C6CA",0x590A],
+ ["C6CB",0x5B80],
+ ["C6CC",0x5DDB],
+ ["C6CD",0x5E7A],
+ ["C6CE",0x5E7F],
+ ["C6CF",0x5EF4],
+ ["C6D0",0x5F50],
+ ["C6D1",0x5F61],
+ ["C6D2",0x6534],
+ ["C6D3",0x65E0],
+ ["C6D4",0x7592],
+ ["C6D5",0x7676],
+ ["C6D6",0x8FB5],
+ ["C6D7",0x96B6],
+ ["C6D8",0x00A8],
+ ["C6D9",0x02C6],
+ ["C6DA",0x30FD],
+ ["C6DB",0x30FE],
+ ["C6DC",0x309D],
+ ["C6DD",0x309E],
+ ["C6DE",0x3003],
+ ["C6DF",0x4EDD],
+ ["C6E0",0x3005],
+ ["C6E1",0x3006],
+ ["C6E2",0x3007],
+ ["C6E3",0x30FC],
+ ["C6E4",0xFF3B],
+ ["C6E5",0xFF3D],
+ ["C6E6",0x273D],
+ ["C6E7",0x3041],
+ ["C6E8",0x3042],
+ ["C6E9",0x3043],
+ ["C6EA",0x3044],
+ ["C6EB",0x3045],
+ ["C6EC",0x3046],
+ ["C6ED",0x3047],
+ ["C6EE",0x3048],
+ ["C6EF",0x3049],
+ ["C6F0",0x304A],
+ ["C6F1",0x304B],
+ ["C6F2",0x304C],
+ ["C6F3",0x304D],
+ ["C6F4",0x304E],
+ ["C6F5",0x304F],
+ ["C6F6",0x3050],
+ ["C6F7",0x3051],
+ ["C6F8",0x3052],
+ ["C6F9",0x3053],
+ ["C6FA",0x3054],
+ ["C6FB",0x3055],
+ ["C6FC",0x3056],
+ ["C6FD",0x3057],
+ ["C6FE",0x3058],
+ ["C740",0x3059],
+ ["C741",0x305A],
+ ["C742",0x305B],
+ ["C743",0x305C],
+ ["C744",0x305D],
+ ["C745",0x305E],
+ ["C746",0x305F],
+ ["C747",0x3060],
+ ["C748",0x3061],
+ ["C749",0x3062],
+ ["C74A",0x3063],
+ ["C74B",0x3064],
+ ["C74C",0x3065],
+ ["C74D",0x3066],
+ ["C74E",0x3067],
+ ["C74F",0x3068],
+ ["C750",0x3069],
+ ["C751",0x306A],
+ ["C752",0x306B],
+ ["C753",0x306C],
+ ["C754",0x306D],
+ ["C755",0x306E],
+ ["C756",0x306F],
+ ["C757",0x3070],
+ ["C758",0x3071],
+ ["C759",0x3072],
+ ["C75A",0x3073],
+ ["C75B",0x3074],
+ ["C75C",0x3075],
+ ["C75D",0x3076],
+ ["C75E",0x3077],
+ ["C75F",0x3078],
+ ["C760",0x3079],
+ ["C761",0x307A],
+ ["C762",0x307B],
+ ["C763",0x307C],
+ ["C764",0x307D],
+ ["C765",0x307E],
+ ["C766",0x307F],
+ ["C767",0x3080],
+ ["C768",0x3081],
+ ["C769",0x3082],
+ ["C76A",0x3083],
+ ["C76B",0x3084],
+ ["C76C",0x3085],
+ ["C76D",0x3086],
+ ["C76E",0x3087],
+ ["C76F",0x3088],
+ ["C770",0x3089],
+ ["C771",0x308A],
+ ["C772",0x308B],
+ ["C773",0x308C],
+ ["C774",0x308D],
+ ["C775",0x308E],
+ ["C776",0x308F],
+ ["C777",0x3090],
+ ["C778",0x3091],
+ ["C779",0x3092],
+ ["C77A",0x3093],
+ ["C77B",0x30A1],
+ ["C77C",0x30A2],
+ ["C77D",0x30A3],
+ ["C77E",0x30A4],
+ ["C7A1",0x30A5],
+ ["C7A2",0x30A6],
+ ["C7A3",0x30A7],
+ ["C7A4",0x30A8],
+ ["C7A5",0x30A9],
+ ["C7A6",0x30AA],
+ ["C7A7",0x30AB],
+ ["C7A8",0x30AC],
+ ["C7A9",0x30AD],
+ ["C7AA",0x30AE],
+ ["C7AB",0x30AF],
+ ["C7AC",0x30B0],
+ ["C7AD",0x30B1],
+ ["C7AE",0x30B2],
+ ["C7AF",0x30B3],
+ ["C7B0",0x30B4],
+ ["C7B1",0x30B5],
+ ["C7B2",0x30B6],
+ ["C7B3",0x30B7],
+ ["C7B4",0x30B8],
+ ["C7B5",0x30B9],
+ ["C7B6",0x30BA],
+ ["C7B7",0x30BB],
+ ["C7B8",0x30BC],
+ ["C7B9",0x30BD],
+ ["C7BA",0x30BE],
+ ["C7BB",0x30BF],
+ ["C7BC",0x30C0],
+ ["C7BD",0x30C1],
+ ["C7BE",0x30C2],
+ ["C7BF",0x30C3],
+ ["C7C0",0x30C4],
+ ["C7C1",0x30C5],
+ ["C7C2",0x30C6],
+ ["C7C3",0x30C7],
+ ["C7C4",0x30C8],
+ ["C7C5",0x30C9],
+ ["C7C6",0x30CA],
+ ["C7C7",0x30CB],
+ ["C7C8",0x30CC],
+ ["C7C9",0x30CD],
+ ["C7CA",0x30CE],
+ ["C7CB",0x30CF],
+ ["C7CC",0x30D0],
+ ["C7CD",0x30D1],
+ ["C7CE",0x30D2],
+ ["C7CF",0x30D3],
+ ["C7D0",0x30D4],
+ ["C7D1",0x30D5],
+ ["C7D2",0x30D6],
+ ["C7D3",0x30D7],
+ ["C7D4",0x30D8],
+ ["C7D5",0x30D9],
+ ["C7D6",0x30DA],
+ ["C7D7",0x30DB],
+ ["C7D8",0x30DC],
+ ["C7D9",0x30DD],
+ ["C7DA",0x30DE],
+ ["C7DB",0x30DF],
+ ["C7DC",0x30E0],
+ ["C7DD",0x30E1],
+ ["C7DE",0x30E2],
+ ["C7DF",0x30E3],
+ ["C7E0",0x30E4],
+ ["C7E1",0x30E5],
+ ["C7E2",0x30E6],
+ ["C7E3",0x30E7],
+ ["C7E4",0x30E8],
+ ["C7E5",0x30E9],
+ ["C7E6",0x30EA],
+ ["C7E7",0x30EB],
+ ["C7E8",0x30EC],
+ ["C7E9",0x30ED],
+ ["C7EA",0x30EE],
+ ["C7EB",0x30EF],
+ ["C7EC",0x30F0],
+ ["C7ED",0x30F1],
+ ["C7EE",0x30F2],
+ ["C7EF",0x30F3],
+ ["C7F0",0x30F4],
+ ["C7F1",0x30F5],
+ ["C7F2",0x30F6],
+ ["C7F3",0x0410],
+ ["C7F4",0x0411],
+ ["C7F5",0x0412],
+ ["C7F6",0x0413],
+ ["C7F7",0x0414],
+ ["C7F8",0x0415],
+ ["C7F9",0x0401],
+ ["C7FA",0x0416],
+ ["C7FB",0x0417],
+ ["C7FC",0x0418],
+ ["C7FD",0x0419],
+ ["C7FE",0x041A],
+ ["C840",0x041B],
+ ["C841",0x041C],
+ ["C842",0x041D],
+ ["C843",0x041E],
+ ["C844",0x041F],
+ ["C845",0x0420],
+ ["C846",0x0421],
+ ["C847",0x0422],
+ ["C848",0x0423],
+ ["C849",0x0424],
+ ["C84A",0x0425],
+ ["C84B",0x0426],
+ ["C84C",0x0427],
+ ["C84D",0x0428],
+ ["C84E",0x0429],
+ ["C84F",0x042A],
+ ["C850",0x042B],
+ ["C851",0x042C],
+ ["C852",0x042D],
+ ["C853",0x042E],
+ ["C854",0x042F],
+ ["C855",0x0430],
+ ["C856",0x0431],
+ ["C857",0x0432],
+ ["C858",0x0433],
+ ["C859",0x0434],
+ ["C85A",0x0435],
+ ["C85B",0x0451],
+ ["C85C",0x0436],
+ ["C85D",0x0437],
+ ["C85E",0x0438],
+ ["C85F",0x0439],
+ ["C860",0x043A],
+ ["C861",0x043B],
+ ["C862",0x043C],
+ ["C863",0x043D],
+ ["C864",0x043E],
+ ["C865",0x043F],
+ ["C866",0x0440],
+ ["C867",0x0441],
+ ["C868",0x0442],
+ ["C869",0x0443],
+ ["C86A",0x0444],
+ ["C86B",0x0445],
+ ["C86C",0x0446],
+ ["C86D",0x0447],
+ ["C86E",0x0448],
+ ["C86F",0x0449],
+ ["C870",0x044A],
+ ["C871",0x044B],
+ ["C872",0x044C],
+ ["C873",0x044D],
+ ["C874",0x044E],
+ ["C875",0x044F],
+ ["C876",0x21E7],
+ ["C877",0x21B8],
+ ["C878",0x21B9],
+ ["C879",0x31CF],
+ ["C87A",0xF7E6],
+ ["C87B",0x4E5A],
+ ["C87C",0xF7E8],
+ ["C87D",0x5202],
+ ["C87E",0x4491],
+ ["C8A1",0x9FB0],
+ ["C8A2",0x5188],
+ ["C8A3",0x9FB1],
+ ["C8A4",0xF7EE],
+ ["C8A5",0xF7EF],
+ ["C8A6",0xF7F0],
+ ["C8A7",0xF7F1],
+ ["C8A8",0xF7F2],
+ ["C8A9",0xF7F3],
+ ["C8AA",0xF7F4],
+ ["C8AB",0xF7F5],
+ ["C8AC",0xF7F6],
+ ["C8AD",0xF7F7],
+ ["C8AE",0xF7F8],
+ ["C8AF",0xF7F9],
+ ["C8B0",0xF7FA],
+ ["C8B1",0x309B],
+ ["C8B2",0x309C],
+ ["C8B3",0x3094],
+ ["C8B4",0x30F7],
+ ["C8B5",0x30F8],
+ ["C8B6",0x30F9],
+ ["C8B7",0x30FA],
+ ["C8B8",0x30FB],
+ ["C8B9",0xFF61],
+ ["C8BA",0xFF62],
+ ["C8BB",0xFF63],
+ ["C8BC",0xFF64],
+ ["C8BD",0xFF65],
+ ["C8BE",0xFF66],
+ ["C8BF",0xFF67],
+ ["C8C0",0xFF68],
+ ["C8C1",0xFF69],
+ ["C8C2",0xFF6A],
+ ["C8C3",0xFF6B],
+ ["C8C4",0xFF6C],
+ ["C8C5",0xFF6D],
+ ["C8C6",0xFF6E],
+ ["C8C7",0xFF6F],
+ ["C8C8",0xFF70],
+ ["C8C9",0xFF71],
+ ["C8CA",0xFF72],
+ ["C8CB",0xFF73],
+ ["C8CC",0xFF74],
+ ["C8CD",0xFFE2],
+ ["C8CE",0xFFE4],
+ ["C8CF",0xFF07],
+ ["C8D0",0xFF02],
+ ["C8D1",0x3231],
+ ["C8D2",0x2116],
+ ["C8D3",0x2121],
+ ["C8D4",0xFF75],
+ ["C8D5",0xFF76],
+ ["C8D6",0xFF77],
+ ["C8D7",0xFF78],
+ ["C8D8",0xFF79],
+ ["C8D9",0xFF7A],
+ ["C8DA",0xFF7B],
+ ["C8DB",0xFF7C],
+ ["C8DC",0xFF7D],
+ ["C8DD",0xFF7E],
+ ["C8DE",0xFF7F],
+ ["C8DF",0xFF80],
+ ["C8E0",0xFF81],
+ ["C8E1",0xFF82],
+ ["C8E2",0xFF83],
+ ["C8E3",0xFF84],
+ ["C8E4",0xFF85],
+ ["C8E5",0xFF86],
+ ["C8E6",0xFF87],
+ ["C8E7",0xFF88],
+ ["C8E8",0xFF89],
+ ["C8E9",0xFF8A],
+ ["C8EA",0xFF8B],
+ ["C8EB",0xFF8C],
+ ["C8EC",0xFF8D],
+ ["C8ED",0xFF8E],
+ ["C8EE",0xFF8F],
+ ["C8EF",0xFF90],
+ ["C8F0",0xFF91],
+ ["C8F1",0xFF92],
+ ["C8F2",0xFF93],
+ ["C8F3",0xFF94],
+ ["C8F4",0xFF95],
+ ["C8F5",0xFF96],
+ ["C8F6",0xFF97],
+ ["C8F7",0xFF98],
+ ["C8F8",0xFF99],
+ ["C8F9",0xFF9A],
+ ["C8FA",0xFF9B],
+ ["C8FB",0xFF9C],
+ ["C8FC",0xFF9D],
+ ["C8FD",0xFF9E],
+ ["C8FE",0xFF9F],
+ ["C940",0x4E42],
+ ["C941",0x4E5C],
+ ["C942",0x51F5],
+ ["C943",0x531A],
+ ["C944",0x5382],
+ ["C945",0x4E07],
+ ["C946",0x4E0C],
+ ["C947",0x4E47],
+ ["C948",0x4E8D],
+ ["C949",0x56D7],
+ ["C94A",0xFA0C],
+ ["C94B",0x5C6E],
+ ["C94C",0x5F73],
+ ["C94D",0x4E0F],
+ ["C94E",0x5187],
+ ["C94F",0x4E0E],
+ ["C950",0x4E2E],
+ ["C951",0x4E93],
+ ["C952",0x4EC2],
+ ["C953",0x4EC9],
+ ["C954",0x4EC8],
+ ["C955",0x5198],
+ ["C956",0x52FC],
+ ["C957",0x536C],
+ ["C958",0x53B9],
+ ["C959",0x5720],
+ ["C95A",0x5903],
+ ["C95B",0x592C],
+ ["C95C",0x5C10],
+ ["C95D",0x5DFF],
+ ["C95E",0x65E1],
+ ["C95F",0x6BB3],
+ ["C960",0x6BCC],
+ ["C961",0x6C14],
+ ["C962",0x723F],
+ ["C963",0x4E31],
+ ["C964",0x4E3C],
+ ["C965",0x4EE8],
+ ["C966",0x4EDC],
+ ["C967",0x4EE9],
+ ["C968",0x4EE1],
+ ["C969",0x4EDD],
+ ["C96A",0x4EDA],
+ ["C96B",0x520C],
+ ["C96C",0x531C],
+ ["C96D",0x534C],
+ ["C96E",0x5722],
+ ["C96F",0x5723],
+ ["C970",0x5917],
+ ["C971",0x592F],
+ ["C972",0x5B81],
+ ["C973",0x5B84],
+ ["C974",0x5C12],
+ ["C975",0x5C3B],
+ ["C976",0x5C74],
+ ["C977",0x5C73],
+ ["C978",0x5E04],
+ ["C979",0x5E80],
+ ["C97A",0x5E82],
+ ["C97B",0x5FC9],
+ ["C97C",0x6209],
+ ["C97D",0x6250],
+ ["C97E",0x6C15],
+ ["C9A1",0x6C36],
+ ["C9A2",0x6C43],
+ ["C9A3",0x6C3F],
+ ["C9A4",0x6C3B],
+ ["C9A5",0x72AE],
+ ["C9A6",0x72B0],
+ ["C9A7",0x738A],
+ ["C9A8",0x79B8],
+ ["C9A9",0x808A],
+ ["C9AA",0x961E],
+ ["C9AB",0x4F0E],
+ ["C9AC",0x4F18],
+ ["C9AD",0x4F2C],
+ ["C9AE",0x4EF5],
+ ["C9AF",0x4F14],
+ ["C9B0",0x4EF1],
+ ["C9B1",0x4F00],
+ ["C9B2",0x4EF7],
+ ["C9B3",0x4F08],
+ ["C9B4",0x4F1D],
+ ["C9B5",0x4F02],
+ ["C9B6",0x4F05],
+ ["C9B7",0x4F22],
+ ["C9B8",0x4F13],
+ ["C9B9",0x4F04],
+ ["C9BA",0x4EF4],
+ ["C9BB",0x4F12],
+ ["C9BC",0x51B1],
+ ["C9BD",0x5213],
+ ["C9BE",0x5209],
+ ["C9BF",0x5210],
+ ["C9C0",0x52A6],
+ ["C9C1",0x5322],
+ ["C9C2",0x531F],
+ ["C9C3",0x534D],
+ ["C9C4",0x538A],
+ ["C9C5",0x5407],
+ ["C9C6",0x56E1],
+ ["C9C7",0x56DF],
+ ["C9C8",0x572E],
+ ["C9C9",0x572A],
+ ["C9CA",0x5734],
+ ["C9CB",0x593C],
+ ["C9CC",0x5980],
+ ["C9CD",0x597C],
+ ["C9CE",0x5985],
+ ["C9CF",0x597B],
+ ["C9D0",0x597E],
+ ["C9D1",0x5977],
+ ["C9D2",0x597F],
+ ["C9D3",0x5B56],
+ ["C9D4",0x5C15],
+ ["C9D5",0x5C25],
+ ["C9D6",0x5C7C],
+ ["C9D7",0x5C7A],
+ ["C9D8",0x5C7B],
+ ["C9D9",0x5C7E],
+ ["C9DA",0x5DDF],
+ ["C9DB",0x5E75],
+ ["C9DC",0x5E84],
+ ["C9DD",0x5F02],
+ ["C9DE",0x5F1A],
+ ["C9DF",0x5F74],
+ ["C9E0",0x5FD5],
+ ["C9E1",0x5FD4],
+ ["C9E2",0x5FCF],
+ ["C9E3",0x625C],
+ ["C9E4",0x625E],
+ ["C9E5",0x6264],
+ ["C9E6",0x6261],
+ ["C9E7",0x6266],
+ ["C9E8",0x6262],
+ ["C9E9",0x6259],
+ ["C9EA",0x6260],
+ ["C9EB",0x625A],
+ ["C9EC",0x6265],
+ ["C9ED",0x65EF],
+ ["C9EE",0x65EE],
+ ["C9EF",0x673E],
+ ["C9F0",0x6739],
+ ["C9F1",0x6738],
+ ["C9F2",0x673B],
+ ["C9F3",0x673A],
+ ["C9F4",0x673F],
+ ["C9F5",0x673C],
+ ["C9F6",0x6733],
+ ["C9F7",0x6C18],
+ ["C9F8",0x6C46],
+ ["C9F9",0x6C52],
+ ["C9FA",0x6C5C],
+ ["C9FB",0x6C4F],
+ ["C9FC",0x6C4A],
+ ["C9FD",0x6C54],
+ ["C9FE",0x6C4B],
+ ["CA40",0x6C4C],
+ ["CA41",0x7071],
+ ["CA42",0x725E],
+ ["CA43",0x72B4],
+ ["CA44",0x72B5],
+ ["CA45",0x738E],
+ ["CA46",0x752A],
+ ["CA47",0x767F],
+ ["CA48",0x7A75],
+ ["CA49",0x7F51],
+ ["CA4A",0x8278],
+ ["CA4B",0x827C],
+ ["CA4C",0x8280],
+ ["CA4D",0x827D],
+ ["CA4E",0x827F],
+ ["CA4F",0x864D],
+ ["CA50",0x897E],
+ ["CA51",0x9099],
+ ["CA52",0x9097],
+ ["CA53",0x9098],
+ ["CA54",0x909B],
+ ["CA55",0x9094],
+ ["CA56",0x9622],
+ ["CA57",0x9624],
+ ["CA58",0x9620],
+ ["CA59",0x9623],
+ ["CA5A",0x4F56],
+ ["CA5B",0x4F3B],
+ ["CA5C",0x4F62],
+ ["CA5D",0x4F49],
+ ["CA5E",0x4F53],
+ ["CA5F",0x4F64],
+ ["CA60",0x4F3E],
+ ["CA61",0x4F67],
+ ["CA62",0x4F52],
+ ["CA63",0x4F5F],
+ ["CA64",0x4F41],
+ ["CA65",0x4F58],
+ ["CA66",0x4F2D],
+ ["CA67",0x4F33],
+ ["CA68",0x4F3F],
+ ["CA69",0x4F61],
+ ["CA6A",0x518F],
+ ["CA6B",0x51B9],
+ ["CA6C",0x521C],
+ ["CA6D",0x521E],
+ ["CA6E",0x5221],
+ ["CA6F",0x52AD],
+ ["CA70",0x52AE],
+ ["CA71",0x5309],
+ ["CA72",0x5363],
+ ["CA73",0x5372],
+ ["CA74",0x538E],
+ ["CA75",0x538F],
+ ["CA76",0x5430],
+ ["CA77",0x5437],
+ ["CA78",0x542A],
+ ["CA79",0x5454],
+ ["CA7A",0x5445],
+ ["CA7B",0x5419],
+ ["CA7C",0x541C],
+ ["CA7D",0x5425],
+ ["CA7E",0x5418],
+ ["CAA1",0x543D],
+ ["CAA2",0x544F],
+ ["CAA3",0x5441],
+ ["CAA4",0x5428],
+ ["CAA5",0x5424],
+ ["CAA6",0x5447],
+ ["CAA7",0x56EE],
+ ["CAA8",0x56E7],
+ ["CAA9",0x56E5],
+ ["CAAA",0x5741],
+ ["CAAB",0x5745],
+ ["CAAC",0x574C],
+ ["CAAD",0x5749],
+ ["CAAE",0x574B],
+ ["CAAF",0x5752],
+ ["CAB0",0x5906],
+ ["CAB1",0x5940],
+ ["CAB2",0x59A6],
+ ["CAB3",0x5998],
+ ["CAB4",0x59A0],
+ ["CAB5",0x5997],
+ ["CAB6",0x598E],
+ ["CAB7",0x59A2],
+ ["CAB8",0x5990],
+ ["CAB9",0x598F],
+ ["CABA",0x59A7],
+ ["CABB",0x59A1],
+ ["CABC",0x5B8E],
+ ["CABD",0x5B92],
+ ["CABE",0x5C28],
+ ["CABF",0x5C2A],
+ ["CAC0",0x5C8D],
+ ["CAC1",0x5C8F],
+ ["CAC2",0x5C88],
+ ["CAC3",0x5C8B],
+ ["CAC4",0x5C89],
+ ["CAC5",0x5C92],
+ ["CAC6",0x5C8A],
+ ["CAC7",0x5C86],
+ ["CAC8",0x5C93],
+ ["CAC9",0x5C95],
+ ["CACA",0x5DE0],
+ ["CACB",0x5E0A],
+ ["CACC",0x5E0E],
+ ["CACD",0x5E8B],
+ ["CACE",0x5E89],
+ ["CACF",0x5E8C],
+ ["CAD0",0x5E88],
+ ["CAD1",0x5E8D],
+ ["CAD2",0x5F05],
+ ["CAD3",0x5F1D],
+ ["CAD4",0x5F78],
+ ["CAD5",0x5F76],
+ ["CAD6",0x5FD2],
+ ["CAD7",0x5FD1],
+ ["CAD8",0x5FD0],
+ ["CAD9",0x5FED],
+ ["CADA",0x5FE8],
+ ["CADB",0x5FEE],
+ ["CADC",0x5FF3],
+ ["CADD",0x5FE1],
+ ["CADE",0x5FE4],
+ ["CADF",0x5FE3],
+ ["CAE0",0x5FFA],
+ ["CAE1",0x5FEF],
+ ["CAE2",0x5FF7],
+ ["CAE3",0x5FFB],
+ ["CAE4",0x6000],
+ ["CAE5",0x5FF4],
+ ["CAE6",0x623A],
+ ["CAE7",0x6283],
+ ["CAE8",0x628C],
+ ["CAE9",0x628E],
+ ["CAEA",0x628F],
+ ["CAEB",0x6294],
+ ["CAEC",0x6287],
+ ["CAED",0x6271],
+ ["CAEE",0x627B],
+ ["CAEF",0x627A],
+ ["CAF0",0x6270],
+ ["CAF1",0x6281],
+ ["CAF2",0x6288],
+ ["CAF3",0x6277],
+ ["CAF4",0x627D],
+ ["CAF5",0x6272],
+ ["CAF6",0x6274],
+ ["CAF7",0x6537],
+ ["CAF8",0x65F0],
+ ["CAF9",0x65F4],
+ ["CAFA",0x65F3],
+ ["CAFB",0x65F2],
+ ["CAFC",0x65F5],
+ ["CAFD",0x6745],
+ ["CAFE",0x6747],
+ ["CB40",0x6759],
+ ["CB41",0x6755],
+ ["CB42",0x674C],
+ ["CB43",0x6748],
+ ["CB44",0x675D],
+ ["CB45",0x674D],
+ ["CB46",0x675A],
+ ["CB47",0x674B],
+ ["CB48",0x6BD0],
+ ["CB49",0x6C19],
+ ["CB4A",0x6C1A],
+ ["CB4B",0x6C78],
+ ["CB4C",0x6C67],
+ ["CB4D",0x6C6B],
+ ["CB4E",0x6C84],
+ ["CB4F",0x6C8B],
+ ["CB50",0x6C8F],
+ ["CB51",0x6C71],
+ ["CB52",0x6C6F],
+ ["CB53",0x6C69],
+ ["CB54",0x6C9A],
+ ["CB55",0x6C6D],
+ ["CB56",0x6C87],
+ ["CB57",0x6C95],
+ ["CB58",0x6C9C],
+ ["CB59",0x6C66],
+ ["CB5A",0x6C73],
+ ["CB5B",0x6C65],
+ ["CB5C",0x6C7B],
+ ["CB5D",0x6C8E],
+ ["CB5E",0x7074],
+ ["CB5F",0x707A],
+ ["CB60",0x7263],
+ ["CB61",0x72BF],
+ ["CB62",0x72BD],
+ ["CB63",0x72C3],
+ ["CB64",0x72C6],
+ ["CB65",0x72C1],
+ ["CB66",0x72BA],
+ ["CB67",0x72C5],
+ ["CB68",0x7395],
+ ["CB69",0x7397],
+ ["CB6A",0x7393],
+ ["CB6B",0x7394],
+ ["CB6C",0x7392],
+ ["CB6D",0x753A],
+ ["CB6E",0x7539],
+ ["CB6F",0x7594],
+ ["CB70",0x7595],
+ ["CB71",0x7681],
+ ["CB72",0x793D],
+ ["CB73",0x8034],
+ ["CB74",0x8095],
+ ["CB75",0x8099],
+ ["CB76",0x8090],
+ ["CB77",0x8092],
+ ["CB78",0x809C],
+ ["CB79",0x8290],
+ ["CB7A",0x828F],
+ ["CB7B",0x8285],
+ ["CB7C",0x828E],
+ ["CB7D",0x8291],
+ ["CB7E",0x8293],
+ ["CBA1",0x828A],
+ ["CBA2",0x8283],
+ ["CBA3",0x8284],
+ ["CBA4",0x8C78],
+ ["CBA5",0x8FC9],
+ ["CBA6",0x8FBF],
+ ["CBA7",0x909F],
+ ["CBA8",0x90A1],
+ ["CBA9",0x90A5],
+ ["CBAA",0x909E],
+ ["CBAB",0x90A7],
+ ["CBAC",0x90A0],
+ ["CBAD",0x9630],
+ ["CBAE",0x9628],
+ ["CBAF",0x962F],
+ ["CBB0",0x962D],
+ ["CBB1",0x4E33],
+ ["CBB2",0x4F98],
+ ["CBB3",0x4F7C],
+ ["CBB4",0x4F85],
+ ["CBB5",0x4F7D],
+ ["CBB6",0x4F80],
+ ["CBB7",0x4F87],
+ ["CBB8",0x4F76],
+ ["CBB9",0x4F74],
+ ["CBBA",0x4F89],
+ ["CBBB",0x4F84],
+ ["CBBC",0x4F77],
+ ["CBBD",0x4F4C],
+ ["CBBE",0x4F97],
+ ["CBBF",0x4F6A],
+ ["CBC0",0x4F9A],
+ ["CBC1",0x4F79],
+ ["CBC2",0x4F81],
+ ["CBC3",0x4F78],
+ ["CBC4",0x4F90],
+ ["CBC5",0x4F9C],
+ ["CBC6",0x4F94],
+ ["CBC7",0x4F9E],
+ ["CBC8",0x4F92],
+ ["CBC9",0x4F82],
+ ["CBCA",0x4F95],
+ ["CBCB",0x4F6B],
+ ["CBCC",0x4F6E],
+ ["CBCD",0x519E],
+ ["CBCE",0x51BC],
+ ["CBCF",0x51BE],
+ ["CBD0",0x5235],
+ ["CBD1",0x5232],
+ ["CBD2",0x5233],
+ ["CBD3",0x5246],
+ ["CBD4",0x5231],
+ ["CBD5",0x52BC],
+ ["CBD6",0x530A],
+ ["CBD7",0x530B],
+ ["CBD8",0x533C],
+ ["CBD9",0x5392],
+ ["CBDA",0x5394],
+ ["CBDB",0x5487],
+ ["CBDC",0x547F],
+ ["CBDD",0x5481],
+ ["CBDE",0x5491],
+ ["CBDF",0x5482],
+ ["CBE0",0x5488],
+ ["CBE1",0x546B],
+ ["CBE2",0x547A],
+ ["CBE3",0x547E],
+ ["CBE4",0x5465],
+ ["CBE5",0x546C],
+ ["CBE6",0x5474],
+ ["CBE7",0x5466],
+ ["CBE8",0x548D],
+ ["CBE9",0x546F],
+ ["CBEA",0x5461],
+ ["CBEB",0x5460],
+ ["CBEC",0x5498],
+ ["CBED",0x5463],
+ ["CBEE",0x5467],
+ ["CBEF",0x5464],
+ ["CBF0",0x56F7],
+ ["CBF1",0x56F9],
+ ["CBF2",0x576F],
+ ["CBF3",0x5772],
+ ["CBF4",0x576D],
+ ["CBF5",0x576B],
+ ["CBF6",0x5771],
+ ["CBF7",0x5770],
+ ["CBF8",0x5776],
+ ["CBF9",0x5780],
+ ["CBFA",0x5775],
+ ["CBFB",0x577B],
+ ["CBFC",0x5773],
+ ["CBFD",0x5774],
+ ["CBFE",0x5762],
+ ["CC40",0x5768],
+ ["CC41",0x577D],
+ ["CC42",0x590C],
+ ["CC43",0x5945],
+ ["CC44",0x59B5],
+ ["CC45",0x59BA],
+ ["CC46",0x59CF],
+ ["CC47",0x59CE],
+ ["CC48",0x59B2],
+ ["CC49",0x59CC],
+ ["CC4A",0x59C1],
+ ["CC4B",0x59B6],
+ ["CC4C",0x59BC],
+ ["CC4D",0x59C3],
+ ["CC4E",0x59D6],
+ ["CC4F",0x59B1],
+ ["CC50",0x59BD],
+ ["CC51",0x59C0],
+ ["CC52",0x59C8],
+ ["CC53",0x59B4],
+ ["CC54",0x59C7],
+ ["CC55",0x5B62],
+ ["CC56",0x5B65],
+ ["CC57",0x5B93],
+ ["CC58",0x5B95],
+ ["CC59",0x5C44],
+ ["CC5A",0x5C47],
+ ["CC5B",0x5CAE],
+ ["CC5C",0x5CA4],
+ ["CC5D",0x5CA0],
+ ["CC5E",0x5CB5],
+ ["CC5F",0x5CAF],
+ ["CC60",0x5CA8],
+ ["CC61",0x5CAC],
+ ["CC62",0x5C9F],
+ ["CC63",0x5CA3],
+ ["CC64",0x5CAD],
+ ["CC65",0x5CA2],
+ ["CC66",0x5CAA],
+ ["CC67",0x5CA7],
+ ["CC68",0x5C9D],
+ ["CC69",0x5CA5],
+ ["CC6A",0x5CB6],
+ ["CC6B",0x5CB0],
+ ["CC6C",0x5CA6],
+ ["CC6D",0x5E17],
+ ["CC6E",0x5E14],
+ ["CC6F",0x5E19],
+ ["CC70",0x5F28],
+ ["CC71",0x5F22],
+ ["CC72",0x5F23],
+ ["CC73",0x5F24],
+ ["CC74",0x5F54],
+ ["CC75",0x5F82],
+ ["CC76",0x5F7E],
+ ["CC77",0x5F7D],
+ ["CC78",0x5FDE],
+ ["CC79",0x5FE5],
+ ["CC7A",0x602D],
+ ["CC7B",0x6026],
+ ["CC7C",0x6019],
+ ["CC7D",0x6032],
+ ["CC7E",0x600B],
+ ["CCA1",0x6034],
+ ["CCA2",0x600A],
+ ["CCA3",0x6017],
+ ["CCA4",0x6033],
+ ["CCA5",0x601A],
+ ["CCA6",0x601E],
+ ["CCA7",0x602C],
+ ["CCA8",0x6022],
+ ["CCA9",0x600D],
+ ["CCAA",0x6010],
+ ["CCAB",0x602E],
+ ["CCAC",0x6013],
+ ["CCAD",0x6011],
+ ["CCAE",0x600C],
+ ["CCAF",0x6009],
+ ["CCB0",0x601C],
+ ["CCB1",0x6214],
+ ["CCB2",0x623D],
+ ["CCB3",0x62AD],
+ ["CCB4",0x62B4],
+ ["CCB5",0x62D1],
+ ["CCB6",0x62BE],
+ ["CCB7",0x62AA],
+ ["CCB8",0x62B6],
+ ["CCB9",0x62CA],
+ ["CCBA",0x62AE],
+ ["CCBB",0x62B3],
+ ["CCBC",0x62AF],
+ ["CCBD",0x62BB],
+ ["CCBE",0x62A9],
+ ["CCBF",0x62B0],
+ ["CCC0",0x62B8],
+ ["CCC1",0x653D],
+ ["CCC2",0x65A8],
+ ["CCC3",0x65BB],
+ ["CCC4",0x6609],
+ ["CCC5",0x65FC],
+ ["CCC6",0x6604],
+ ["CCC7",0x6612],
+ ["CCC8",0x6608],
+ ["CCC9",0x65FB],
+ ["CCCA",0x6603],
+ ["CCCB",0x660B],
+ ["CCCC",0x660D],
+ ["CCCD",0x6605],
+ ["CCCE",0x65FD],
+ ["CCCF",0x6611],
+ ["CCD0",0x6610],
+ ["CCD1",0x66F6],
+ ["CCD2",0x670A],
+ ["CCD3",0x6785],
+ ["CCD4",0x676C],
+ ["CCD5",0x678E],
+ ["CCD6",0x6792],
+ ["CCD7",0x6776],
+ ["CCD8",0x677B],
+ ["CCD9",0x6798],
+ ["CCDA",0x6786],
+ ["CCDB",0x6784],
+ ["CCDC",0x6774],
+ ["CCDD",0x678D],
+ ["CCDE",0x678C],
+ ["CCDF",0x677A],
+ ["CCE0",0x679F],
+ ["CCE1",0x6791],
+ ["CCE2",0x6799],
+ ["CCE3",0x6783],
+ ["CCE4",0x677D],
+ ["CCE5",0x6781],
+ ["CCE6",0x6778],
+ ["CCE7",0x6779],
+ ["CCE8",0x6794],
+ ["CCE9",0x6B25],
+ ["CCEA",0x6B80],
+ ["CCEB",0x6B7E],
+ ["CCEC",0x6BDE],
+ ["CCED",0x6C1D],
+ ["CCEE",0x6C93],
+ ["CCEF",0x6CEC],
+ ["CCF0",0x6CEB],
+ ["CCF1",0x6CEE],
+ ["CCF2",0x6CD9],
+ ["CCF3",0x6CB6],
+ ["CCF4",0x6CD4],
+ ["CCF5",0x6CAD],
+ ["CCF6",0x6CE7],
+ ["CCF7",0x6CB7],
+ ["CCF8",0x6CD0],
+ ["CCF9",0x6CC2],
+ ["CCFA",0x6CBA],
+ ["CCFB",0x6CC3],
+ ["CCFC",0x6CC6],
+ ["CCFD",0x6CED],
+ ["CCFE",0x6CF2],
+ ["CD40",0x6CD2],
+ ["CD41",0x6CDD],
+ ["CD42",0x6CB4],
+ ["CD43",0x6C8A],
+ ["CD44",0x6C9D],
+ ["CD45",0x6C80],
+ ["CD46",0x6CDE],
+ ["CD47",0x6CC0],
+ ["CD48",0x6D30],
+ ["CD49",0x6CCD],
+ ["CD4A",0x6CC7],
+ ["CD4B",0x6CB0],
+ ["CD4C",0x6CF9],
+ ["CD4D",0x6CCF],
+ ["CD4E",0x6CE9],
+ ["CD4F",0x6CD1],
+ ["CD50",0x7094],
+ ["CD51",0x7098],
+ ["CD52",0x7085],
+ ["CD53",0x7093],
+ ["CD54",0x7086],
+ ["CD55",0x7084],
+ ["CD56",0x7091],
+ ["CD57",0x7096],
+ ["CD58",0x7082],
+ ["CD59",0x709A],
+ ["CD5A",0x7083],
+ ["CD5B",0x726A],
+ ["CD5C",0x72D6],
+ ["CD5D",0x72CB],
+ ["CD5E",0x72D8],
+ ["CD5F",0x72C9],
+ ["CD60",0x72DC],
+ ["CD61",0x72D2],
+ ["CD62",0x72D4],
+ ["CD63",0x72DA],
+ ["CD64",0x72CC],
+ ["CD65",0x72D1],
+ ["CD66",0x73A4],
+ ["CD67",0x73A1],
+ ["CD68",0x73AD],
+ ["CD69",0x73A6],
+ ["CD6A",0x73A2],
+ ["CD6B",0x73A0],
+ ["CD6C",0x73AC],
+ ["CD6D",0x739D],
+ ["CD6E",0x74DD],
+ ["CD6F",0x74E8],
+ ["CD70",0x753F],
+ ["CD71",0x7540],
+ ["CD72",0x753E],
+ ["CD73",0x758C],
+ ["CD74",0x7598],
+ ["CD75",0x76AF],
+ ["CD76",0x76F3],
+ ["CD77",0x76F1],
+ ["CD78",0x76F0],
+ ["CD79",0x76F5],
+ ["CD7A",0x77F8],
+ ["CD7B",0x77FC],
+ ["CD7C",0x77F9],
+ ["CD7D",0x77FB],
+ ["CD7E",0x77FA],
+ ["CDA1",0x77F7],
+ ["CDA2",0x7942],
+ ["CDA3",0x793F],
+ ["CDA4",0x79C5],
+ ["CDA5",0x7A78],
+ ["CDA6",0x7A7B],
+ ["CDA7",0x7AFB],
+ ["CDA8",0x7C75],
+ ["CDA9",0x7CFD],
+ ["CDAA",0x8035],
+ ["CDAB",0x808F],
+ ["CDAC",0x80AE],
+ ["CDAD",0x80A3],
+ ["CDAE",0x80B8],
+ ["CDAF",0x80B5],
+ ["CDB0",0x80AD],
+ ["CDB1",0x8220],
+ ["CDB2",0x82A0],
+ ["CDB3",0x82C0],
+ ["CDB4",0x82AB],
+ ["CDB5",0x829A],
+ ["CDB6",0x8298],
+ ["CDB7",0x829B],
+ ["CDB8",0x82B5],
+ ["CDB9",0x82A7],
+ ["CDBA",0x82AE],
+ ["CDBB",0x82BC],
+ ["CDBC",0x829E],
+ ["CDBD",0x82BA],
+ ["CDBE",0x82B4],
+ ["CDBF",0x82A8],
+ ["CDC0",0x82A1],
+ ["CDC1",0x82A9],
+ ["CDC2",0x82C2],
+ ["CDC3",0x82A4],
+ ["CDC4",0x82C3],
+ ["CDC5",0x82B6],
+ ["CDC6",0x82A2],
+ ["CDC7",0x8670],
+ ["CDC8",0x866F],
+ ["CDC9",0x866D],
+ ["CDCA",0x866E],
+ ["CDCB",0x8C56],
+ ["CDCC",0x8FD2],
+ ["CDCD",0x8FCB],
+ ["CDCE",0x8FD3],
+ ["CDCF",0x8FCD],
+ ["CDD0",0x8FD6],
+ ["CDD1",0x8FD5],
+ ["CDD2",0x8FD7],
+ ["CDD3",0x90B2],
+ ["CDD4",0x90B4],
+ ["CDD5",0x90AF],
+ ["CDD6",0x90B3],
+ ["CDD7",0x90B0],
+ ["CDD8",0x9639],
+ ["CDD9",0x963D],
+ ["CDDA",0x963C],
+ ["CDDB",0x963A],
+ ["CDDC",0x9643],
+ ["CDDD",0x4FCD],
+ ["CDDE",0x4FC5],
+ ["CDDF",0x4FD3],
+ ["CDE0",0x4FB2],
+ ["CDE1",0x4FC9],
+ ["CDE2",0x4FCB],
+ ["CDE3",0x4FC1],
+ ["CDE4",0x4FD4],
+ ["CDE5",0x4FDC],
+ ["CDE6",0x4FD9],
+ ["CDE7",0x4FBB],
+ ["CDE8",0x4FB3],
+ ["CDE9",0x4FDB],
+ ["CDEA",0x4FC7],
+ ["CDEB",0x4FD6],
+ ["CDEC",0x4FBA],
+ ["CDED",0x4FC0],
+ ["CDEE",0x4FB9],
+ ["CDEF",0x4FEC],
+ ["CDF0",0x5244],
+ ["CDF1",0x5249],
+ ["CDF2",0x52C0],
+ ["CDF3",0x52C2],
+ ["CDF4",0x533D],
+ ["CDF5",0x537C],
+ ["CDF6",0x5397],
+ ["CDF7",0x5396],
+ ["CDF8",0x5399],
+ ["CDF9",0x5398],
+ ["CDFA",0x54BA],
+ ["CDFB",0x54A1],
+ ["CDFC",0x54AD],
+ ["CDFD",0x54A5],
+ ["CDFE",0x54CF],
+ ["CE40",0x54C3],
+ ["CE41",0x830D],
+ ["CE42",0x54B7],
+ ["CE43",0x54AE],
+ ["CE44",0x54D6],
+ ["CE45",0x54B6],
+ ["CE46",0x54C5],
+ ["CE47",0x54C6],
+ ["CE48",0x54A0],
+ ["CE49",0x5470],
+ ["CE4A",0x54BC],
+ ["CE4B",0x54A2],
+ ["CE4C",0x54BE],
+ ["CE4D",0x5472],
+ ["CE4E",0x54DE],
+ ["CE4F",0x54B0],
+ ["CE50",0x57B5],
+ ["CE51",0x579E],
+ ["CE52",0x579F],
+ ["CE53",0x57A4],
+ ["CE54",0x578C],
+ ["CE55",0x5797],
+ ["CE56",0x579D],
+ ["CE57",0x579B],
+ ["CE58",0x5794],
+ ["CE59",0x5798],
+ ["CE5A",0x578F],
+ ["CE5B",0x5799],
+ ["CE5C",0x57A5],
+ ["CE5D",0x579A],
+ ["CE5E",0x5795],
+ ["CE5F",0x58F4],
+ ["CE60",0x590D],
+ ["CE61",0x5953],
+ ["CE62",0x59E1],
+ ["CE63",0x59DE],
+ ["CE64",0x59EE],
+ ["CE65",0x5A00],
+ ["CE66",0x59F1],
+ ["CE67",0x59DD],
+ ["CE68",0x59FA],
+ ["CE69",0x59FD],
+ ["CE6A",0x59FC],
+ ["CE6B",0x59F6],
+ ["CE6C",0x59E4],
+ ["CE6D",0x59F2],
+ ["CE6E",0x59F7],
+ ["CE6F",0x59DB],
+ ["CE70",0x59E9],
+ ["CE71",0x59F3],
+ ["CE72",0x59F5],
+ ["CE73",0x59E0],
+ ["CE74",0x59FE],
+ ["CE75",0x59F4],
+ ["CE76",0x59ED],
+ ["CE77",0x5BA8],
+ ["CE78",0x5C4C],
+ ["CE79",0x5CD0],
+ ["CE7A",0x5CD8],
+ ["CE7B",0x5CCC],
+ ["CE7C",0x5CD7],
+ ["CE7D",0x5CCB],
+ ["CE7E",0x5CDB],
+ ["CEA1",0x5CDE],
+ ["CEA2",0x5CDA],
+ ["CEA3",0x5CC9],
+ ["CEA4",0x5CC7],
+ ["CEA5",0x5CCA],
+ ["CEA6",0x5CD6],
+ ["CEA7",0x5CD3],
+ ["CEA8",0x5CD4],
+ ["CEA9",0x5CCF],
+ ["CEAA",0x5CC8],
+ ["CEAB",0x5CC6],
+ ["CEAC",0x5CCE],
+ ["CEAD",0x5CDF],
+ ["CEAE",0x5CF8],
+ ["CEAF",0x5DF9],
+ ["CEB0",0x5E21],
+ ["CEB1",0x5E22],
+ ["CEB2",0x5E23],
+ ["CEB3",0x5E20],
+ ["CEB4",0x5E24],
+ ["CEB5",0x5EB0],
+ ["CEB6",0x5EA4],
+ ["CEB7",0x5EA2],
+ ["CEB8",0x5E9B],
+ ["CEB9",0x5EA3],
+ ["CEBA",0x5EA5],
+ ["CEBB",0x5F07],
+ ["CEBC",0x5F2E],
+ ["CEBD",0x5F56],
+ ["CEBE",0x5F86],
+ ["CEBF",0x6037],
+ ["CEC0",0x6039],
+ ["CEC1",0x6054],
+ ["CEC2",0x6072],
+ ["CEC3",0x605E],
+ ["CEC4",0x6045],
+ ["CEC5",0x6053],
+ ["CEC6",0x6047],
+ ["CEC7",0x6049],
+ ["CEC8",0x605B],
+ ["CEC9",0x604C],
+ ["CECA",0x6040],
+ ["CECB",0x6042],
+ ["CECC",0x605F],
+ ["CECD",0x6024],
+ ["CECE",0x6044],
+ ["CECF",0x6058],
+ ["CED0",0x6066],
+ ["CED1",0x606E],
+ ["CED2",0x6242],
+ ["CED3",0x6243],
+ ["CED4",0x62CF],
+ ["CED5",0x630D],
+ ["CED6",0x630B],
+ ["CED7",0x62F5],
+ ["CED8",0x630E],
+ ["CED9",0x6303],
+ ["CEDA",0x62EB],
+ ["CEDB",0x62F9],
+ ["CEDC",0x630F],
+ ["CEDD",0x630C],
+ ["CEDE",0x62F8],
+ ["CEDF",0x62F6],
+ ["CEE0",0x6300],
+ ["CEE1",0x6313],
+ ["CEE2",0x6314],
+ ["CEE3",0x62FA],
+ ["CEE4",0x6315],
+ ["CEE5",0x62FB],
+ ["CEE6",0x62F0],
+ ["CEE7",0x6541],
+ ["CEE8",0x6543],
+ ["CEE9",0x65AA],
+ ["CEEA",0x65BF],
+ ["CEEB",0x6636],
+ ["CEEC",0x6621],
+ ["CEED",0x6632],
+ ["CEEE",0x6635],
+ ["CEEF",0x661C],
+ ["CEF0",0x6626],
+ ["CEF1",0x6622],
+ ["CEF2",0x6633],
+ ["CEF3",0x662B],
+ ["CEF4",0x663A],
+ ["CEF5",0x661D],
+ ["CEF6",0x6634],
+ ["CEF7",0x6639],
+ ["CEF8",0x662E],
+ ["CEF9",0x670F],
+ ["CEFA",0x6710],
+ ["CEFB",0x67C1],
+ ["CEFC",0x67F2],
+ ["CEFD",0x67C8],
+ ["CEFE",0x67BA],
+ ["CF40",0x67DC],
+ ["CF41",0x67BB],
+ ["CF42",0x67F8],
+ ["CF43",0x67D8],
+ ["CF44",0x67C0],
+ ["CF45",0x67B7],
+ ["CF46",0x67C5],
+ ["CF47",0x67EB],
+ ["CF48",0x67E4],
+ ["CF49",0x67DF],
+ ["CF4A",0x67B5],
+ ["CF4B",0x67CD],
+ ["CF4C",0x67B3],
+ ["CF4D",0x67F7],
+ ["CF4E",0x67F6],
+ ["CF4F",0x67EE],
+ ["CF50",0x67E3],
+ ["CF51",0x67C2],
+ ["CF52",0x67B9],
+ ["CF53",0x67CE],
+ ["CF54",0x67E7],
+ ["CF55",0x67F0],
+ ["CF56",0x67B2],
+ ["CF57",0x67FC],
+ ["CF58",0x67C6],
+ ["CF59",0x67ED],
+ ["CF5A",0x67CC],
+ ["CF5B",0x67AE],
+ ["CF5C",0x67E6],
+ ["CF5D",0x67DB],
+ ["CF5E",0x67FA],
+ ["CF5F",0x67C9],
+ ["CF60",0x67CA],
+ ["CF61",0x67C3],
+ ["CF62",0x67EA],
+ ["CF63",0x67CB],
+ ["CF64",0x6B28],
+ ["CF65",0x6B82],
+ ["CF66",0x6B84],
+ ["CF67",0x6BB6],
+ ["CF68",0x6BD6],
+ ["CF69",0x6BD8],
+ ["CF6A",0x6BE0],
+ ["CF6B",0x6C20],
+ ["CF6C",0x6C21],
+ ["CF6D",0x6D28],
+ ["CF6E",0x6D34],
+ ["CF6F",0x6D2D],
+ ["CF70",0x6D1F],
+ ["CF71",0x6D3C],
+ ["CF72",0x6D3F],
+ ["CF73",0x6D12],
+ ["CF74",0x6D0A],
+ ["CF75",0x6CDA],
+ ["CF76",0x6D33],
+ ["CF77",0x6D04],
+ ["CF78",0x6D19],
+ ["CF79",0x6D3A],
+ ["CF7A",0x6D1A],
+ ["CF7B",0x6D11],
+ ["CF7C",0x6D00],
+ ["CF7D",0x6D1D],
+ ["CF7E",0x6D42],
+ ["CFA1",0x6D01],
+ ["CFA2",0x6D18],
+ ["CFA3",0x6D37],
+ ["CFA4",0x6D03],
+ ["CFA5",0x6D0F],
+ ["CFA6",0x6D40],
+ ["CFA7",0x6D07],
+ ["CFA8",0x6D20],
+ ["CFA9",0x6D2C],
+ ["CFAA",0x6D08],
+ ["CFAB",0x6D22],
+ ["CFAC",0x6D09],
+ ["CFAD",0x6D10],
+ ["CFAE",0x70B7],
+ ["CFAF",0x709F],
+ ["CFB0",0x70BE],
+ ["CFB1",0x70B1],
+ ["CFB2",0x70B0],
+ ["CFB3",0x70A1],
+ ["CFB4",0x70B4],
+ ["CFB5",0x70B5],
+ ["CFB6",0x70A9],
+ ["CFB7",0x7241],
+ ["CFB8",0x7249],
+ ["CFB9",0x724A],
+ ["CFBA",0x726C],
+ ["CFBB",0x7270],
+ ["CFBC",0x7273],
+ ["CFBD",0x726E],
+ ["CFBE",0x72CA],
+ ["CFBF",0x72E4],
+ ["CFC0",0x72E8],
+ ["CFC1",0x72EB],
+ ["CFC2",0x72DF],
+ ["CFC3",0x72EA],
+ ["CFC4",0x72E6],
+ ["CFC5",0x72E3],
+ ["CFC6",0x7385],
+ ["CFC7",0x73CC],
+ ["CFC8",0x73C2],
+ ["CFC9",0x73C8],
+ ["CFCA",0x73C5],
+ ["CFCB",0x73B9],
+ ["CFCC",0x73B6],
+ ["CFCD",0x73B5],
+ ["CFCE",0x73B4],
+ ["CFCF",0x73EB],
+ ["CFD0",0x73BF],
+ ["CFD1",0x73C7],
+ ["CFD2",0x73BE],
+ ["CFD3",0x73C3],
+ ["CFD4",0x73C6],
+ ["CFD5",0x73B8],
+ ["CFD6",0x73CB],
+ ["CFD7",0x74EC],
+ ["CFD8",0x74EE],
+ ["CFD9",0x752E],
+ ["CFDA",0x7547],
+ ["CFDB",0x7548],
+ ["CFDC",0x75A7],
+ ["CFDD",0x75AA],
+ ["CFDE",0x7679],
+ ["CFDF",0x76C4],
+ ["CFE0",0x7708],
+ ["CFE1",0x7703],
+ ["CFE2",0x7704],
+ ["CFE3",0x7705],
+ ["CFE4",0x770A],
+ ["CFE5",0x76F7],
+ ["CFE6",0x76FB],
+ ["CFE7",0x76FA],
+ ["CFE8",0x77E7],
+ ["CFE9",0x77E8],
+ ["CFEA",0x7806],
+ ["CFEB",0x7811],
+ ["CFEC",0x7812],
+ ["CFED",0x7805],
+ ["CFEE",0x7810],
+ ["CFEF",0x780F],
+ ["CFF0",0x780E],
+ ["CFF1",0x7809],
+ ["CFF2",0x7803],
+ ["CFF3",0x7813],
+ ["CFF4",0x794A],
+ ["CFF5",0x794C],
+ ["CFF6",0x794B],
+ ["CFF7",0x7945],
+ ["CFF8",0x7944],
+ ["CFF9",0x79D5],
+ ["CFFA",0x79CD],
+ ["CFFB",0x79CF],
+ ["CFFC",0x79D6],
+ ["CFFD",0x79CE],
+ ["CFFE",0x7A80],
+ ["D040",0x7A7E],
+ ["D041",0x7AD1],
+ ["D042",0x7B00],
+ ["D043",0x7B01],
+ ["D044",0x7C7A],
+ ["D045",0x7C78],
+ ["D046",0x7C79],
+ ["D047",0x7C7F],
+ ["D048",0x7C80],
+ ["D049",0x7C81],
+ ["D04A",0x7D03],
+ ["D04B",0x7D08],
+ ["D04C",0x7D01],
+ ["D04D",0x7F58],
+ ["D04E",0x7F91],
+ ["D04F",0x7F8D],
+ ["D050",0x7FBE],
+ ["D051",0x8007],
+ ["D052",0x800E],
+ ["D053",0x800F],
+ ["D054",0x8014],
+ ["D055",0x8037],
+ ["D056",0x80D8],
+ ["D057",0x80C7],
+ ["D058",0x80E0],
+ ["D059",0x80D1],
+ ["D05A",0x80C8],
+ ["D05B",0x80C2],
+ ["D05C",0x80D0],
+ ["D05D",0x80C5],
+ ["D05E",0x80E3],
+ ["D05F",0x80D9],
+ ["D060",0x80DC],
+ ["D061",0x80CA],
+ ["D062",0x80D5],
+ ["D063",0x80C9],
+ ["D064",0x80CF],
+ ["D065",0x80D7],
+ ["D066",0x80E6],
+ ["D067",0x80CD],
+ ["D068",0x81FF],
+ ["D069",0x8221],
+ ["D06A",0x8294],
+ ["D06B",0x82D9],
+ ["D06C",0x82FE],
+ ["D06D",0x82F9],
+ ["D06E",0x8307],
+ ["D06F",0x82E8],
+ ["D070",0x8300],
+ ["D071",0x82D5],
+ ["D072",0x833A],
+ ["D073",0x82EB],
+ ["D074",0x82D6],
+ ["D075",0x82F4],
+ ["D076",0x82EC],
+ ["D077",0x82E1],
+ ["D078",0x82F2],
+ ["D079",0x82F5],
+ ["D07A",0x830C],
+ ["D07B",0x82FB],
+ ["D07C",0x82F6],
+ ["D07D",0x82F0],
+ ["D07E",0x82EA],
+ ["D0A1",0x82E4],
+ ["D0A2",0x82E0],
+ ["D0A3",0x82FA],
+ ["D0A4",0x82F3],
+ ["D0A5",0x82ED],
+ ["D0A6",0x8677],
+ ["D0A7",0x8674],
+ ["D0A8",0x867C],
+ ["D0A9",0x8673],
+ ["D0AA",0x8841],
+ ["D0AB",0x884E],
+ ["D0AC",0x8867],
+ ["D0AD",0x886A],
+ ["D0AE",0x8869],
+ ["D0AF",0x89D3],
+ ["D0B0",0x8A04],
+ ["D0B1",0x8A07],
+ ["D0B2",0x8D72],
+ ["D0B3",0x8FE3],
+ ["D0B4",0x8FE1],
+ ["D0B5",0x8FEE],
+ ["D0B6",0x8FE0],
+ ["D0B7",0x90F1],
+ ["D0B8",0x90BD],
+ ["D0B9",0x90BF],
+ ["D0BA",0x90D5],
+ ["D0BB",0x90C5],
+ ["D0BC",0x90BE],
+ ["D0BD",0x90C7],
+ ["D0BE",0x90CB],
+ ["D0BF",0x90C8],
+ ["D0C0",0x91D4],
+ ["D0C1",0x91D3],
+ ["D0C2",0x9654],
+ ["D0C3",0x964F],
+ ["D0C4",0x9651],
+ ["D0C5",0x9653],
+ ["D0C6",0x964A],
+ ["D0C7",0x964E],
+ ["D0C8",0x501E],
+ ["D0C9",0x5005],
+ ["D0CA",0x5007],
+ ["D0CB",0x5013],
+ ["D0CC",0x5022],
+ ["D0CD",0x5030],
+ ["D0CE",0x501B],
+ ["D0CF",0x4FF5],
+ ["D0D0",0x4FF4],
+ ["D0D1",0x5033],
+ ["D0D2",0x5037],
+ ["D0D3",0x502C],
+ ["D0D4",0x4FF6],
+ ["D0D5",0x4FF7],
+ ["D0D6",0x5017],
+ ["D0D7",0x501C],
+ ["D0D8",0x5020],
+ ["D0D9",0x5027],
+ ["D0DA",0x5035],
+ ["D0DB",0x502F],
+ ["D0DC",0x5031],
+ ["D0DD",0x500E],
+ ["D0DE",0x515A],
+ ["D0DF",0x5194],
+ ["D0E0",0x5193],
+ ["D0E1",0x51CA],
+ ["D0E2",0x51C4],
+ ["D0E3",0x51C5],
+ ["D0E4",0x51C8],
+ ["D0E5",0x51CE],
+ ["D0E6",0x5261],
+ ["D0E7",0x525A],
+ ["D0E8",0x5252],
+ ["D0E9",0x525E],
+ ["D0EA",0x525F],
+ ["D0EB",0x5255],
+ ["D0EC",0x5262],
+ ["D0ED",0x52CD],
+ ["D0EE",0x530E],
+ ["D0EF",0x539E],
+ ["D0F0",0x5526],
+ ["D0F1",0x54E2],
+ ["D0F2",0x5517],
+ ["D0F3",0x5512],
+ ["D0F4",0x54E7],
+ ["D0F5",0x54F3],
+ ["D0F6",0x54E4],
+ ["D0F7",0x551A],
+ ["D0F8",0x54FF],
+ ["D0F9",0x5504],
+ ["D0FA",0x5508],
+ ["D0FB",0x54EB],
+ ["D0FC",0x5511],
+ ["D0FD",0x5505],
+ ["D0FE",0x54F1],
+ ["D140",0x550A],
+ ["D141",0x54FB],
+ ["D142",0x54F7],
+ ["D143",0x54F8],
+ ["D144",0x54E0],
+ ["D145",0x550E],
+ ["D146",0x5503],
+ ["D147",0x550B],
+ ["D148",0x5701],
+ ["D149",0x5702],
+ ["D14A",0x57CC],
+ ["D14B",0x5832],
+ ["D14C",0x57D5],
+ ["D14D",0x57D2],
+ ["D14E",0x57BA],
+ ["D14F",0x57C6],
+ ["D150",0x57BD],
+ ["D151",0x57BC],
+ ["D152",0x57B8],
+ ["D153",0x57B6],
+ ["D154",0x57BF],
+ ["D155",0x57C7],
+ ["D156",0x57D0],
+ ["D157",0x57B9],
+ ["D158",0x57C1],
+ ["D159",0x590E],
+ ["D15A",0x594A],
+ ["D15B",0x5A19],
+ ["D15C",0x5A16],
+ ["D15D",0x5A2D],
+ ["D15E",0x5A2E],
+ ["D15F",0x5A15],
+ ["D160",0x5A0F],
+ ["D161",0x5A17],
+ ["D162",0x5A0A],
+ ["D163",0x5A1E],
+ ["D164",0x5A33],
+ ["D165",0x5B6C],
+ ["D166",0x5BA7],
+ ["D167",0x5BAD],
+ ["D168",0x5BAC],
+ ["D169",0x5C03],
+ ["D16A",0x5C56],
+ ["D16B",0x5C54],
+ ["D16C",0x5CEC],
+ ["D16D",0x5CFF],
+ ["D16E",0x5CEE],
+ ["D16F",0x5CF1],
+ ["D170",0x5CF7],
+ ["D171",0x5D00],
+ ["D172",0x5CF9],
+ ["D173",0x5E29],
+ ["D174",0x5E28],
+ ["D175",0x5EA8],
+ ["D176",0x5EAE],
+ ["D177",0x5EAA],
+ ["D178",0x5EAC],
+ ["D179",0x5F33],
+ ["D17A",0x5F30],
+ ["D17B",0x5F67],
+ ["D17C",0x605D],
+ ["D17D",0x605A],
+ ["D17E",0x6067],
+ ["D1A1",0x6041],
+ ["D1A2",0x60A2],
+ ["D1A3",0x6088],
+ ["D1A4",0x6080],
+ ["D1A5",0x6092],
+ ["D1A6",0x6081],
+ ["D1A7",0x609D],
+ ["D1A8",0x6083],
+ ["D1A9",0x6095],
+ ["D1AA",0x609B],
+ ["D1AB",0x6097],
+ ["D1AC",0x6087],
+ ["D1AD",0x609C],
+ ["D1AE",0x608E],
+ ["D1AF",0x6219],
+ ["D1B0",0x6246],
+ ["D1B1",0x62F2],
+ ["D1B2",0x6310],
+ ["D1B3",0x6356],
+ ["D1B4",0x632C],
+ ["D1B5",0x6344],
+ ["D1B6",0x6345],
+ ["D1B7",0x6336],
+ ["D1B8",0x6343],
+ ["D1B9",0x63E4],
+ ["D1BA",0x6339],
+ ["D1BB",0x634B],
+ ["D1BC",0x634A],
+ ["D1BD",0x633C],
+ ["D1BE",0x6329],
+ ["D1BF",0x6341],
+ ["D1C0",0x6334],
+ ["D1C1",0x6358],
+ ["D1C2",0x6354],
+ ["D1C3",0x6359],
+ ["D1C4",0x632D],
+ ["D1C5",0x6347],
+ ["D1C6",0x6333],
+ ["D1C7",0x635A],
+ ["D1C8",0x6351],
+ ["D1C9",0x6338],
+ ["D1CA",0x6357],
+ ["D1CB",0x6340],
+ ["D1CC",0x6348],
+ ["D1CD",0x654A],
+ ["D1CE",0x6546],
+ ["D1CF",0x65C6],
+ ["D1D0",0x65C3],
+ ["D1D1",0x65C4],
+ ["D1D2",0x65C2],
+ ["D1D3",0x664A],
+ ["D1D4",0x665F],
+ ["D1D5",0x6647],
+ ["D1D6",0x6651],
+ ["D1D7",0x6712],
+ ["D1D8",0x6713],
+ ["D1D9",0x681F],
+ ["D1DA",0x681A],
+ ["D1DB",0x6849],
+ ["D1DC",0x6832],
+ ["D1DD",0x6833],
+ ["D1DE",0x683B],
+ ["D1DF",0x684B],
+ ["D1E0",0x684F],
+ ["D1E1",0x6816],
+ ["D1E2",0x6831],
+ ["D1E3",0x681C],
+ ["D1E4",0x6835],
+ ["D1E5",0x682B],
+ ["D1E6",0x682D],
+ ["D1E7",0x682F],
+ ["D1E8",0x684E],
+ ["D1E9",0x6844],
+ ["D1EA",0x6834],
+ ["D1EB",0x681D],
+ ["D1EC",0x6812],
+ ["D1ED",0x6814],
+ ["D1EE",0x6826],
+ ["D1EF",0x6828],
+ ["D1F0",0x682E],
+ ["D1F1",0x684D],
+ ["D1F2",0x683A],
+ ["D1F3",0x6825],
+ ["D1F4",0x6820],
+ ["D1F5",0x6B2C],
+ ["D1F6",0x6B2F],
+ ["D1F7",0x6B2D],
+ ["D1F8",0x6B31],
+ ["D1F9",0x6B34],
+ ["D1FA",0x6B6D],
+ ["D1FB",0x8082],
+ ["D1FC",0x6B88],
+ ["D1FD",0x6BE6],
+ ["D1FE",0x6BE4],
+ ["D240",0x6BE8],
+ ["D241",0x6BE3],
+ ["D242",0x6BE2],
+ ["D243",0x6BE7],
+ ["D244",0x6C25],
+ ["D245",0x6D7A],
+ ["D246",0x6D63],
+ ["D247",0x6D64],
+ ["D248",0x6D76],
+ ["D249",0x6D0D],
+ ["D24A",0x6D61],
+ ["D24B",0x6D92],
+ ["D24C",0x6D58],
+ ["D24D",0x6D62],
+ ["D24E",0x6D6D],
+ ["D24F",0x6D6F],
+ ["D250",0x6D91],
+ ["D251",0x6D8D],
+ ["D252",0x6DEF],
+ ["D253",0x6D7F],
+ ["D254",0x6D86],
+ ["D255",0x6D5E],
+ ["D256",0x6D67],
+ ["D257",0x6D60],
+ ["D258",0x6D97],
+ ["D259",0x6D70],
+ ["D25A",0x6D7C],
+ ["D25B",0x6D5F],
+ ["D25C",0x6D82],
+ ["D25D",0x6D98],
+ ["D25E",0x6D2F],
+ ["D25F",0x6D68],
+ ["D260",0x6D8B],
+ ["D261",0x6D7E],
+ ["D262",0x6D80],
+ ["D263",0x6D84],
+ ["D264",0x6D16],
+ ["D265",0x6D83],
+ ["D266",0x6D7B],
+ ["D267",0x6D7D],
+ ["D268",0x6D75],
+ ["D269",0x6D90],
+ ["D26A",0x70DC],
+ ["D26B",0x70D3],
+ ["D26C",0x70D1],
+ ["D26D",0x70DD],
+ ["D26E",0x70CB],
+ ["D26F",0x7F39],
+ ["D270",0x70E2],
+ ["D271",0x70D7],
+ ["D272",0x70D2],
+ ["D273",0x70DE],
+ ["D274",0x70E0],
+ ["D275",0x70D4],
+ ["D276",0x70CD],
+ ["D277",0x70C5],
+ ["D278",0x70C6],
+ ["D279",0x70C7],
+ ["D27A",0x70DA],
+ ["D27B",0x70CE],
+ ["D27C",0x70E1],
+ ["D27D",0x7242],
+ ["D27E",0x7278],
+ ["D2A1",0x7277],
+ ["D2A2",0x7276],
+ ["D2A3",0x7300],
+ ["D2A4",0x72FA],
+ ["D2A5",0x72F4],
+ ["D2A6",0x72FE],
+ ["D2A7",0x72F6],
+ ["D2A8",0x72F3],
+ ["D2A9",0x72FB],
+ ["D2AA",0x7301],
+ ["D2AB",0x73D3],
+ ["D2AC",0x73D9],
+ ["D2AD",0x73E5],
+ ["D2AE",0x73D6],
+ ["D2AF",0x73BC],
+ ["D2B0",0x73E7],
+ ["D2B1",0x73E3],
+ ["D2B2",0x73E9],
+ ["D2B3",0x73DC],
+ ["D2B4",0x73D2],
+ ["D2B5",0x73DB],
+ ["D2B6",0x73D4],
+ ["D2B7",0x73DD],
+ ["D2B8",0x73DA],
+ ["D2B9",0x73D7],
+ ["D2BA",0x73D8],
+ ["D2BB",0x73E8],
+ ["D2BC",0x74DE],
+ ["D2BD",0x74DF],
+ ["D2BE",0x74F4],
+ ["D2BF",0x74F5],
+ ["D2C0",0x7521],
+ ["D2C1",0x755B],
+ ["D2C2",0x755F],
+ ["D2C3",0x75B0],
+ ["D2C4",0x75C1],
+ ["D2C5",0x75BB],
+ ["D2C6",0x75C4],
+ ["D2C7",0x75C0],
+ ["D2C8",0x75BF],
+ ["D2C9",0x75B6],
+ ["D2CA",0x75BA],
+ ["D2CB",0x768A],
+ ["D2CC",0x76C9],
+ ["D2CD",0x771D],
+ ["D2CE",0x771B],
+ ["D2CF",0x7710],
+ ["D2D0",0x7713],
+ ["D2D1",0x7712],
+ ["D2D2",0x7723],
+ ["D2D3",0x7711],
+ ["D2D4",0x7715],
+ ["D2D5",0x7719],
+ ["D2D6",0x771A],
+ ["D2D7",0x7722],
+ ["D2D8",0x7727],
+ ["D2D9",0x7823],
+ ["D2DA",0x782C],
+ ["D2DB",0x7822],
+ ["D2DC",0x7835],
+ ["D2DD",0x782F],
+ ["D2DE",0x7828],
+ ["D2DF",0x782E],
+ ["D2E0",0x782B],
+ ["D2E1",0x7821],
+ ["D2E2",0x7829],
+ ["D2E3",0x7833],
+ ["D2E4",0x782A],
+ ["D2E5",0x7831],
+ ["D2E6",0x7954],
+ ["D2E7",0x795B],
+ ["D2E8",0x794F],
+ ["D2E9",0x795C],
+ ["D2EA",0x7953],
+ ["D2EB",0x7952],
+ ["D2EC",0x7951],
+ ["D2ED",0x79EB],
+ ["D2EE",0x79EC],
+ ["D2EF",0x79E0],
+ ["D2F0",0x79EE],
+ ["D2F1",0x79ED],
+ ["D2F2",0x79EA],
+ ["D2F3",0x79DC],
+ ["D2F4",0x79DE],
+ ["D2F5",0x79DD],
+ ["D2F6",0x7A86],
+ ["D2F7",0x7A89],
+ ["D2F8",0x7A85],
+ ["D2F9",0x7A8B],
+ ["D2FA",0x7A8C],
+ ["D2FB",0x7A8A],
+ ["D2FC",0x7A87],
+ ["D2FD",0x7AD8],
+ ["D2FE",0x7B10],
+ ["D340",0x7B04],
+ ["D341",0x7B13],
+ ["D342",0x7B05],
+ ["D343",0x7B0F],
+ ["D344",0x7B08],
+ ["D345",0x7B0A],
+ ["D346",0x7B0E],
+ ["D347",0x7B09],
+ ["D348",0x7B12],
+ ["D349",0x7C84],
+ ["D34A",0x7C91],
+ ["D34B",0x7C8A],
+ ["D34C",0x7C8C],
+ ["D34D",0x7C88],
+ ["D34E",0x7C8D],
+ ["D34F",0x7C85],
+ ["D350",0x7D1E],
+ ["D351",0x7D1D],
+ ["D352",0x7D11],
+ ["D353",0x7D0E],
+ ["D354",0x7D18],
+ ["D355",0x7D16],
+ ["D356",0x7D13],
+ ["D357",0x7D1F],
+ ["D358",0x7D12],
+ ["D359",0x7D0F],
+ ["D35A",0x7D0C],
+ ["D35B",0x7F5C],
+ ["D35C",0x7F61],
+ ["D35D",0x7F5E],
+ ["D35E",0x7F60],
+ ["D35F",0x7F5D],
+ ["D360",0x7F5B],
+ ["D361",0x7F96],
+ ["D362",0x7F92],
+ ["D363",0x7FC3],
+ ["D364",0x7FC2],
+ ["D365",0x7FC0],
+ ["D366",0x8016],
+ ["D367",0x803E],
+ ["D368",0x8039],
+ ["D369",0x80FA],
+ ["D36A",0x80F2],
+ ["D36B",0x80F9],
+ ["D36C",0x80F5],
+ ["D36D",0x8101],
+ ["D36E",0x80FB],
+ ["D36F",0x8100],
+ ["D370",0x8201],
+ ["D371",0x822F],
+ ["D372",0x8225],
+ ["D373",0x8333],
+ ["D374",0x832D],
+ ["D375",0x8344],
+ ["D376",0x8319],
+ ["D377",0x8351],
+ ["D378",0x8325],
+ ["D379",0x8356],
+ ["D37A",0x833F],
+ ["D37B",0x8341],
+ ["D37C",0x8326],
+ ["D37D",0x831C],
+ ["D37E",0x8322],
+ ["D3A1",0x8342],
+ ["D3A2",0x834E],
+ ["D3A3",0x831B],
+ ["D3A4",0x832A],
+ ["D3A5",0x8308],
+ ["D3A6",0x833C],
+ ["D3A7",0x834D],
+ ["D3A8",0x8316],
+ ["D3A9",0x8324],
+ ["D3AA",0x8320],
+ ["D3AB",0x8337],
+ ["D3AC",0x832F],
+ ["D3AD",0x8329],
+ ["D3AE",0x8347],
+ ["D3AF",0x8345],
+ ["D3B0",0x834C],
+ ["D3B1",0x8353],
+ ["D3B2",0x831E],
+ ["D3B3",0x832C],
+ ["D3B4",0x834B],
+ ["D3B5",0x8327],
+ ["D3B6",0x8348],
+ ["D3B7",0x8653],
+ ["D3B8",0x8652],
+ ["D3B9",0x86A2],
+ ["D3BA",0x86A8],
+ ["D3BB",0x8696],
+ ["D3BC",0x868D],
+ ["D3BD",0x8691],
+ ["D3BE",0x869E],
+ ["D3BF",0x8687],
+ ["D3C0",0x8697],
+ ["D3C1",0x8686],
+ ["D3C2",0x868B],
+ ["D3C3",0x869A],
+ ["D3C4",0x8685],
+ ["D3C5",0x86A5],
+ ["D3C6",0x8699],
+ ["D3C7",0x86A1],
+ ["D3C8",0x86A7],
+ ["D3C9",0x8695],
+ ["D3CA",0x8698],
+ ["D3CB",0x868E],
+ ["D3CC",0x869D],
+ ["D3CD",0x8690],
+ ["D3CE",0x8694],
+ ["D3CF",0x8843],
+ ["D3D0",0x8844],
+ ["D3D1",0x886D],
+ ["D3D2",0x8875],
+ ["D3D3",0x8876],
+ ["D3D4",0x8872],
+ ["D3D5",0x8880],
+ ["D3D6",0x8871],
+ ["D3D7",0x887F],
+ ["D3D8",0x886F],
+ ["D3D9",0x8883],
+ ["D3DA",0x887E],
+ ["D3DB",0x8874],
+ ["D3DC",0x887C],
+ ["D3DD",0x8A12],
+ ["D3DE",0x8C47],
+ ["D3DF",0x8C57],
+ ["D3E0",0x8C7B],
+ ["D3E1",0x8CA4],
+ ["D3E2",0x8CA3],
+ ["D3E3",0x8D76],
+ ["D3E4",0x8D78],
+ ["D3E5",0x8DB5],
+ ["D3E6",0x8DB7],
+ ["D3E7",0x8DB6],
+ ["D3E8",0x8ED1],
+ ["D3E9",0x8ED3],
+ ["D3EA",0x8FFE],
+ ["D3EB",0x8FF5],
+ ["D3EC",0x9002],
+ ["D3ED",0x8FFF],
+ ["D3EE",0x8FFB],
+ ["D3EF",0x9004],
+ ["D3F0",0x8FFC],
+ ["D3F1",0x8FF6],
+ ["D3F2",0x90D6],
+ ["D3F3",0x90E0],
+ ["D3F4",0x90D9],
+ ["D3F5",0x90DA],
+ ["D3F6",0x90E3],
+ ["D3F7",0x90DF],
+ ["D3F8",0x90E5],
+ ["D3F9",0x90D8],
+ ["D3FA",0x90DB],
+ ["D3FB",0x90D7],
+ ["D3FC",0x90DC],
+ ["D3FD",0x90E4],
+ ["D3FE",0x9150],
+ ["D440",0x914E],
+ ["D441",0x914F],
+ ["D442",0x91D5],
+ ["D443",0x91E2],
+ ["D444",0x91DA],
+ ["D445",0x965C],
+ ["D446",0x965F],
+ ["D447",0x96BC],
+ ["D448",0x98E3],
+ ["D449",0x9ADF],
+ ["D44A",0x9B2F],
+ ["D44B",0x4E7F],
+ ["D44C",0x5070],
+ ["D44D",0x506A],
+ ["D44E",0x5061],
+ ["D44F",0x505E],
+ ["D450",0x5060],
+ ["D451",0x5053],
+ ["D452",0x504B],
+ ["D453",0x505D],
+ ["D454",0x5072],
+ ["D455",0x5048],
+ ["D456",0x504D],
+ ["D457",0x5041],
+ ["D458",0x505B],
+ ["D459",0x504A],
+ ["D45A",0x5062],
+ ["D45B",0x5015],
+ ["D45C",0x5045],
+ ["D45D",0x505F],
+ ["D45E",0x5069],
+ ["D45F",0x506B],
+ ["D460",0x5063],
+ ["D461",0x5064],
+ ["D462",0x5046],
+ ["D463",0x5040],
+ ["D464",0x506E],
+ ["D465",0x5073],
+ ["D466",0x5057],
+ ["D467",0x5051],
+ ["D468",0x51D0],
+ ["D469",0x526B],
+ ["D46A",0x526D],
+ ["D46B",0x526C],
+ ["D46C",0x526E],
+ ["D46D",0x52D6],
+ ["D46E",0x52D3],
+ ["D46F",0x532D],
+ ["D470",0x539C],
+ ["D471",0x5575],
+ ["D472",0x5576],
+ ["D473",0x553C],
+ ["D474",0x554D],
+ ["D475",0x5550],
+ ["D476",0x5534],
+ ["D477",0x552A],
+ ["D478",0x5551],
+ ["D479",0x5562],
+ ["D47A",0x5536],
+ ["D47B",0x5535],
+ ["D47C",0x5530],
+ ["D47D",0x5552],
+ ["D47E",0x5545],
+ ["D4A1",0x550C],
+ ["D4A2",0x5532],
+ ["D4A3",0x5565],
+ ["D4A4",0x554E],
+ ["D4A5",0x5539],
+ ["D4A6",0x5548],
+ ["D4A7",0x552D],
+ ["D4A8",0x553B],
+ ["D4A9",0x5540],
+ ["D4AA",0x554B],
+ ["D4AB",0x570A],
+ ["D4AC",0x5707],
+ ["D4AD",0x57FB],
+ ["D4AE",0x5814],
+ ["D4AF",0x57E2],
+ ["D4B0",0x57F6],
+ ["D4B1",0x57DC],
+ ["D4B2",0x57F4],
+ ["D4B3",0x5800],
+ ["D4B4",0x57ED],
+ ["D4B5",0x57FD],
+ ["D4B6",0x5808],
+ ["D4B7",0x57F8],
+ ["D4B8",0x580B],
+ ["D4B9",0x57F3],
+ ["D4BA",0x57CF],
+ ["D4BB",0x5807],
+ ["D4BC",0x57EE],
+ ["D4BD",0x57E3],
+ ["D4BE",0x57F2],
+ ["D4BF",0x57E5],
+ ["D4C0",0x57EC],
+ ["D4C1",0x57E1],
+ ["D4C2",0x580E],
+ ["D4C3",0x57FC],
+ ["D4C4",0x5810],
+ ["D4C5",0x57E7],
+ ["D4C6",0x5801],
+ ["D4C7",0x580C],
+ ["D4C8",0x57F1],
+ ["D4C9",0x57E9],
+ ["D4CA",0x57F0],
+ ["D4CB",0x580D],
+ ["D4CC",0x5804],
+ ["D4CD",0x595C],
+ ["D4CE",0x5A60],
+ ["D4CF",0x5A58],
+ ["D4D0",0x5A55],
+ ["D4D1",0x5A67],
+ ["D4D2",0x5A5E],
+ ["D4D3",0x5A38],
+ ["D4D4",0x5A35],
+ ["D4D5",0x5A6D],
+ ["D4D6",0x5A50],
+ ["D4D7",0x5A5F],
+ ["D4D8",0x5A65],
+ ["D4D9",0x5A6C],
+ ["D4DA",0x5A53],
+ ["D4DB",0x5A64],
+ ["D4DC",0x5A57],
+ ["D4DD",0x5A43],
+ ["D4DE",0x5A5D],
+ ["D4DF",0x5A52],
+ ["D4E0",0x5A44],
+ ["D4E1",0x5A5B],
+ ["D4E2",0x5A48],
+ ["D4E3",0x5A8E],
+ ["D4E4",0x5A3E],
+ ["D4E5",0x5A4D],
+ ["D4E6",0x5A39],
+ ["D4E7",0x5A4C],
+ ["D4E8",0x5A70],
+ ["D4E9",0x5A69],
+ ["D4EA",0x5A47],
+ ["D4EB",0x5A51],
+ ["D4EC",0x5A56],
+ ["D4ED",0x5A42],
+ ["D4EE",0x5A5C],
+ ["D4EF",0x5B72],
+ ["D4F0",0x5B6E],
+ ["D4F1",0x5BC1],
+ ["D4F2",0x5BC0],
+ ["D4F3",0x5C59],
+ ["D4F4",0x5D1E],
+ ["D4F5",0x5D0B],
+ ["D4F6",0x5D1D],
+ ["D4F7",0x5D1A],
+ ["D4F8",0x5D20],
+ ["D4F9",0x5D0C],
+ ["D4FA",0x5D28],
+ ["D4FB",0x5D0D],
+ ["D4FC",0x5D26],
+ ["D4FD",0x5D25],
+ ["D4FE",0x5D0F],
+ ["D540",0x5D30],
+ ["D541",0x5D12],
+ ["D542",0x5D23],
+ ["D543",0x5D1F],
+ ["D544",0x5D2E],
+ ["D545",0x5E3E],
+ ["D546",0x5E34],
+ ["D547",0x5EB1],
+ ["D548",0x5EB4],
+ ["D549",0x5EB9],
+ ["D54A",0x5EB2],
+ ["D54B",0x5EB3],
+ ["D54C",0x5F36],
+ ["D54D",0x5F38],
+ ["D54E",0x5F9B],
+ ["D54F",0x5F96],
+ ["D550",0x5F9F],
+ ["D551",0x608A],
+ ["D552",0x6090],
+ ["D553",0x6086],
+ ["D554",0x60BE],
+ ["D555",0x60B0],
+ ["D556",0x60BA],
+ ["D557",0x60D3],
+ ["D558",0x60D4],
+ ["D559",0x60CF],
+ ["D55A",0x60E4],
+ ["D55B",0x60D9],
+ ["D55C",0x60DD],
+ ["D55D",0x60C8],
+ ["D55E",0x60B1],
+ ["D55F",0x60DB],
+ ["D560",0x60B7],
+ ["D561",0x60CA],
+ ["D562",0x60BF],
+ ["D563",0x60C3],
+ ["D564",0x60CD],
+ ["D565",0x60C0],
+ ["D566",0x6332],
+ ["D567",0x6365],
+ ["D568",0x638A],
+ ["D569",0x6382],
+ ["D56A",0x637D],
+ ["D56B",0x63BD],
+ ["D56C",0x639E],
+ ["D56D",0x63AD],
+ ["D56E",0x639D],
+ ["D56F",0x6397],
+ ["D570",0x63AB],
+ ["D571",0x638E],
+ ["D572",0x636F],
+ ["D573",0x6387],
+ ["D574",0x6390],
+ ["D575",0x636E],
+ ["D576",0x63AF],
+ ["D577",0x6375],
+ ["D578",0x639C],
+ ["D579",0x636D],
+ ["D57A",0x63AE],
+ ["D57B",0x637C],
+ ["D57C",0x63A4],
+ ["D57D",0x633B],
+ ["D57E",0x639F],
+ ["D5A1",0x6378],
+ ["D5A2",0x6385],
+ ["D5A3",0x6381],
+ ["D5A4",0x6391],
+ ["D5A5",0x638D],
+ ["D5A6",0x6370],
+ ["D5A7",0x6553],
+ ["D5A8",0x65CD],
+ ["D5A9",0x6665],
+ ["D5AA",0x6661],
+ ["D5AB",0x665B],
+ ["D5AC",0x6659],
+ ["D5AD",0x665C],
+ ["D5AE",0x6662],
+ ["D5AF",0x6718],
+ ["D5B0",0x6879],
+ ["D5B1",0x6887],
+ ["D5B2",0x6890],
+ ["D5B3",0x689C],
+ ["D5B4",0x686D],
+ ["D5B5",0x686E],
+ ["D5B6",0x68AE],
+ ["D5B7",0x68AB],
+ ["D5B8",0x6956],
+ ["D5B9",0x686F],
+ ["D5BA",0x68A3],
+ ["D5BB",0x68AC],
+ ["D5BC",0x68A9],
+ ["D5BD",0x6875],
+ ["D5BE",0x6874],
+ ["D5BF",0x68B2],
+ ["D5C0",0x688F],
+ ["D5C1",0x6877],
+ ["D5C2",0x6892],
+ ["D5C3",0x687C],
+ ["D5C4",0x686B],
+ ["D5C5",0x6872],
+ ["D5C6",0x68AA],
+ ["D5C7",0x6880],
+ ["D5C8",0x6871],
+ ["D5C9",0x687E],
+ ["D5CA",0x689B],
+ ["D5CB",0x6896],
+ ["D5CC",0x688B],
+ ["D5CD",0x68A0],
+ ["D5CE",0x6889],
+ ["D5CF",0x68A4],
+ ["D5D0",0x6878],
+ ["D5D1",0x687B],
+ ["D5D2",0x6891],
+ ["D5D3",0x688C],
+ ["D5D4",0x688A],
+ ["D5D5",0x687D],
+ ["D5D6",0x6B36],
+ ["D5D7",0x6B33],
+ ["D5D8",0x6B37],
+ ["D5D9",0x6B38],
+ ["D5DA",0x6B91],
+ ["D5DB",0x6B8F],
+ ["D5DC",0x6B8D],
+ ["D5DD",0x6B8E],
+ ["D5DE",0x6B8C],
+ ["D5DF",0x6C2A],
+ ["D5E0",0x6DC0],
+ ["D5E1",0x6DAB],
+ ["D5E2",0x6DB4],
+ ["D5E3",0x6DB3],
+ ["D5E4",0x6E74],
+ ["D5E5",0x6DAC],
+ ["D5E6",0x6DE9],
+ ["D5E7",0x6DE2],
+ ["D5E8",0x6DB7],
+ ["D5E9",0x6DF6],
+ ["D5EA",0x6DD4],
+ ["D5EB",0x6E00],
+ ["D5EC",0x6DC8],
+ ["D5ED",0x6DE0],
+ ["D5EE",0x6DDF],
+ ["D5EF",0x6DD6],
+ ["D5F0",0x6DBE],
+ ["D5F1",0x6DE5],
+ ["D5F2",0x6DDC],
+ ["D5F3",0x6DDD],
+ ["D5F4",0x6DDB],
+ ["D5F5",0x6DF4],
+ ["D5F6",0x6DCA],
+ ["D5F7",0x6DBD],
+ ["D5F8",0x6DED],
+ ["D5F9",0x6DF0],
+ ["D5FA",0x6DBA],
+ ["D5FB",0x6DD5],
+ ["D5FC",0x6DC2],
+ ["D5FD",0x6DCF],
+ ["D5FE",0x6DC9],
+ ["D640",0x6DD0],
+ ["D641",0x6DF2],
+ ["D642",0x6DD3],
+ ["D643",0x6DFD],
+ ["D644",0x6DD7],
+ ["D645",0x6DCD],
+ ["D646",0x6DE3],
+ ["D647",0x6DBB],
+ ["D648",0x70FA],
+ ["D649",0x710D],
+ ["D64A",0x70F7],
+ ["D64B",0x7117],
+ ["D64C",0x70F4],
+ ["D64D",0x710C],
+ ["D64E",0x70F0],
+ ["D64F",0x7104],
+ ["D650",0x70F3],
+ ["D651",0x7110],
+ ["D652",0x70FC],
+ ["D653",0x70FF],
+ ["D654",0x7106],
+ ["D655",0x7113],
+ ["D656",0x7100],
+ ["D657",0x70F8],
+ ["D658",0x70F6],
+ ["D659",0x710B],
+ ["D65A",0x7102],
+ ["D65B",0x710E],
+ ["D65C",0x727E],
+ ["D65D",0x727B],
+ ["D65E",0x727C],
+ ["D65F",0x727F],
+ ["D660",0x731D],
+ ["D661",0x7317],
+ ["D662",0x7307],
+ ["D663",0x7311],
+ ["D664",0x7318],
+ ["D665",0x730A],
+ ["D666",0x7308],
+ ["D667",0x72FF],
+ ["D668",0x730F],
+ ["D669",0x731E],
+ ["D66A",0x7388],
+ ["D66B",0x73F6],
+ ["D66C",0x73F8],
+ ["D66D",0x73F5],
+ ["D66E",0x7404],
+ ["D66F",0x7401],
+ ["D670",0x73FD],
+ ["D671",0x7407],
+ ["D672",0x7400],
+ ["D673",0x73FA],
+ ["D674",0x73FC],
+ ["D675",0x73FF],
+ ["D676",0x740C],
+ ["D677",0x740B],
+ ["D678",0x73F4],
+ ["D679",0x7408],
+ ["D67A",0x7564],
+ ["D67B",0x7563],
+ ["D67C",0x75CE],
+ ["D67D",0x75D2],
+ ["D67E",0x75CF],
+ ["D6A1",0x75CB],
+ ["D6A2",0x75CC],
+ ["D6A3",0x75D1],
+ ["D6A4",0x75D0],
+ ["D6A5",0x768F],
+ ["D6A6",0x7689],
+ ["D6A7",0x76D3],
+ ["D6A8",0x7739],
+ ["D6A9",0x772F],
+ ["D6AA",0x772D],
+ ["D6AB",0x7731],
+ ["D6AC",0x7732],
+ ["D6AD",0x7734],
+ ["D6AE",0x7733],
+ ["D6AF",0x773D],
+ ["D6B0",0x7725],
+ ["D6B1",0x773B],
+ ["D6B2",0x7735],
+ ["D6B3",0x7848],
+ ["D6B4",0x7852],
+ ["D6B5",0x7849],
+ ["D6B6",0x784D],
+ ["D6B7",0x784A],
+ ["D6B8",0x784C],
+ ["D6B9",0x7826],
+ ["D6BA",0x7845],
+ ["D6BB",0x7850],
+ ["D6BC",0x7964],
+ ["D6BD",0x7967],
+ ["D6BE",0x7969],
+ ["D6BF",0x796A],
+ ["D6C0",0x7963],
+ ["D6C1",0x796B],
+ ["D6C2",0x7961],
+ ["D6C3",0x79BB],
+ ["D6C4",0x79FA],
+ ["D6C5",0x79F8],
+ ["D6C6",0x79F6],
+ ["D6C7",0x79F7],
+ ["D6C8",0x7A8F],
+ ["D6C9",0x7A94],
+ ["D6CA",0x7A90],
+ ["D6CB",0x7B35],
+ ["D6CC",0x7B47],
+ ["D6CD",0x7B34],
+ ["D6CE",0x7B25],
+ ["D6CF",0x7B30],
+ ["D6D0",0x7B22],
+ ["D6D1",0x7B24],
+ ["D6D2",0x7B33],
+ ["D6D3",0x7B18],
+ ["D6D4",0x7B2A],
+ ["D6D5",0x7B1D],
+ ["D6D6",0x7B31],
+ ["D6D7",0x7B2B],
+ ["D6D8",0x7B2D],
+ ["D6D9",0x7B2F],
+ ["D6DA",0x7B32],
+ ["D6DB",0x7B38],
+ ["D6DC",0x7B1A],
+ ["D6DD",0x7B23],
+ ["D6DE",0x7C94],
+ ["D6DF",0x7C98],
+ ["D6E0",0x7C96],
+ ["D6E1",0x7CA3],
+ ["D6E2",0x7D35],
+ ["D6E3",0x7D3D],
+ ["D6E4",0x7D38],
+ ["D6E5",0x7D36],
+ ["D6E6",0x7D3A],
+ ["D6E7",0x7D45],
+ ["D6E8",0x7D2C],
+ ["D6E9",0x7D29],
+ ["D6EA",0x7D41],
+ ["D6EB",0x7D47],
+ ["D6EC",0x7D3E],
+ ["D6ED",0x7D3F],
+ ["D6EE",0x7D4A],
+ ["D6EF",0x7D3B],
+ ["D6F0",0x7D28],
+ ["D6F1",0x7F63],
+ ["D6F2",0x7F95],
+ ["D6F3",0x7F9C],
+ ["D6F4",0x7F9D],
+ ["D6F5",0x7F9B],
+ ["D6F6",0x7FCA],
+ ["D6F7",0x7FCB],
+ ["D6F8",0x7FCD],
+ ["D6F9",0x7FD0],
+ ["D6FA",0x7FD1],
+ ["D6FB",0x7FC7],
+ ["D6FC",0x7FCF],
+ ["D6FD",0x7FC9],
+ ["D6FE",0x801F],
+ ["D740",0x801E],
+ ["D741",0x801B],
+ ["D742",0x8047],
+ ["D743",0x8043],
+ ["D744",0x8048],
+ ["D745",0x8118],
+ ["D746",0x8125],
+ ["D747",0x8119],
+ ["D748",0x811B],
+ ["D749",0x812D],
+ ["D74A",0x811F],
+ ["D74B",0x812C],
+ ["D74C",0x811E],
+ ["D74D",0x8121],
+ ["D74E",0x8115],
+ ["D74F",0x8127],
+ ["D750",0x811D],
+ ["D751",0x8122],
+ ["D752",0x8211],
+ ["D753",0x8238],
+ ["D754",0x8233],
+ ["D755",0x823A],
+ ["D756",0x8234],
+ ["D757",0x8232],
+ ["D758",0x8274],
+ ["D759",0x8390],
+ ["D75A",0x83A3],
+ ["D75B",0x83A8],
+ ["D75C",0x838D],
+ ["D75D",0x837A],
+ ["D75E",0x8373],
+ ["D75F",0x83A4],
+ ["D760",0x8374],
+ ["D761",0x838F],
+ ["D762",0x8381],
+ ["D763",0x8395],
+ ["D764",0x8399],
+ ["D765",0x8375],
+ ["D766",0x8394],
+ ["D767",0x83A9],
+ ["D768",0x837D],
+ ["D769",0x8383],
+ ["D76A",0x838C],
+ ["D76B",0x839D],
+ ["D76C",0x839B],
+ ["D76D",0x83AA],
+ ["D76E",0x838B],
+ ["D76F",0x837E],
+ ["D770",0x83A5],
+ ["D771",0x83AF],
+ ["D772",0x8388],
+ ["D773",0x8397],
+ ["D774",0x83B0],
+ ["D775",0x837F],
+ ["D776",0x83A6],
+ ["D777",0x8387],
+ ["D778",0x83AE],
+ ["D779",0x8376],
+ ["D77A",0x839A],
+ ["D77B",0x8659],
+ ["D77C",0x8656],
+ ["D77D",0x86BF],
+ ["D77E",0x86B7],
+ ["D7A1",0x86C2],
+ ["D7A2",0x86C1],
+ ["D7A3",0x86C5],
+ ["D7A4",0x86BA],
+ ["D7A5",0x86B0],
+ ["D7A6",0x86C8],
+ ["D7A7",0x86B9],
+ ["D7A8",0x86B3],
+ ["D7A9",0x86B8],
+ ["D7AA",0x86CC],
+ ["D7AB",0x86B4],
+ ["D7AC",0x86BB],
+ ["D7AD",0x86BC],
+ ["D7AE",0x86C3],
+ ["D7AF",0x86BD],
+ ["D7B0",0x86BE],
+ ["D7B1",0x8852],
+ ["D7B2",0x8889],
+ ["D7B3",0x8895],
+ ["D7B4",0x88A8],
+ ["D7B5",0x88A2],
+ ["D7B6",0x88AA],
+ ["D7B7",0x889A],
+ ["D7B8",0x8891],
+ ["D7B9",0x88A1],
+ ["D7BA",0x889F],
+ ["D7BB",0x8898],
+ ["D7BC",0x88A7],
+ ["D7BD",0x8899],
+ ["D7BE",0x889B],
+ ["D7BF",0x8897],
+ ["D7C0",0x88A4],
+ ["D7C1",0x88AC],
+ ["D7C2",0x888C],
+ ["D7C3",0x8893],
+ ["D7C4",0x888E],
+ ["D7C5",0x8982],
+ ["D7C6",0x89D6],
+ ["D7C7",0x89D9],
+ ["D7C8",0x89D5],
+ ["D7C9",0x8A30],
+ ["D7CA",0x8A27],
+ ["D7CB",0x8A2C],
+ ["D7CC",0x8A1E],
+ ["D7CD",0x8C39],
+ ["D7CE",0x8C3B],
+ ["D7CF",0x8C5C],
+ ["D7D0",0x8C5D],
+ ["D7D1",0x8C7D],
+ ["D7D2",0x8CA5],
+ ["D7D3",0x8D7D],
+ ["D7D4",0x8D7B],
+ ["D7D5",0x8D79],
+ ["D7D6",0x8DBC],
+ ["D7D7",0x8DC2],
+ ["D7D8",0x8DB9],
+ ["D7D9",0x8DBF],
+ ["D7DA",0x8DC1],
+ ["D7DB",0x8ED8],
+ ["D7DC",0x8EDE],
+ ["D7DD",0x8EDD],
+ ["D7DE",0x8EDC],
+ ["D7DF",0x8ED7],
+ ["D7E0",0x8EE0],
+ ["D7E1",0x8EE1],
+ ["D7E2",0x9024],
+ ["D7E3",0x900B],
+ ["D7E4",0x9011],
+ ["D7E5",0x901C],
+ ["D7E6",0x900C],
+ ["D7E7",0x9021],
+ ["D7E8",0x90EF],
+ ["D7E9",0x90EA],
+ ["D7EA",0x90F0],
+ ["D7EB",0x90F4],
+ ["D7EC",0x90F2],
+ ["D7ED",0x90F3],
+ ["D7EE",0x90D4],
+ ["D7EF",0x90EB],
+ ["D7F0",0x90EC],
+ ["D7F1",0x90E9],
+ ["D7F2",0x9156],
+ ["D7F3",0x9158],
+ ["D7F4",0x915A],
+ ["D7F5",0x9153],
+ ["D7F6",0x9155],
+ ["D7F7",0x91EC],
+ ["D7F8",0x91F4],
+ ["D7F9",0x91F1],
+ ["D7FA",0x91F3],
+ ["D7FB",0x91F8],
+ ["D7FC",0x91E4],
+ ["D7FD",0x91F9],
+ ["D7FE",0x91EA],
+ ["D840",0x91EB],
+ ["D841",0x91F7],
+ ["D842",0x91E8],
+ ["D843",0x91EE],
+ ["D844",0x957A],
+ ["D845",0x9586],
+ ["D846",0x9588],
+ ["D847",0x967C],
+ ["D848",0x966D],
+ ["D849",0x966B],
+ ["D84A",0x9671],
+ ["D84B",0x966F],
+ ["D84C",0x96BF],
+ ["D84D",0x976A],
+ ["D84E",0x9804],
+ ["D84F",0x98E5],
+ ["D850",0x9997],
+ ["D851",0x509B],
+ ["D852",0x5095],
+ ["D853",0x5094],
+ ["D854",0x509E],
+ ["D855",0x508B],
+ ["D856",0x50A3],
+ ["D857",0x5083],
+ ["D858",0x508C],
+ ["D859",0x508E],
+ ["D85A",0x509D],
+ ["D85B",0x5068],
+ ["D85C",0x509C],
+ ["D85D",0x5092],
+ ["D85E",0x5082],
+ ["D85F",0x5087],
+ ["D860",0x515F],
+ ["D861",0x51D4],
+ ["D862",0x5312],
+ ["D863",0x5311],
+ ["D864",0x53A4],
+ ["D865",0x53A7],
+ ["D866",0x5591],
+ ["D867",0x55A8],
+ ["D868",0x55A5],
+ ["D869",0x55AD],
+ ["D86A",0x5577],
+ ["D86B",0x5645],
+ ["D86C",0x55A2],
+ ["D86D",0x5593],
+ ["D86E",0x5588],
+ ["D86F",0x558F],
+ ["D870",0x55B5],
+ ["D871",0x5581],
+ ["D872",0x55A3],
+ ["D873",0x5592],
+ ["D874",0x55A4],
+ ["D875",0x557D],
+ ["D876",0x558C],
+ ["D877",0x55A6],
+ ["D878",0x557F],
+ ["D879",0x5595],
+ ["D87A",0x55A1],
+ ["D87B",0x558E],
+ ["D87C",0x570C],
+ ["D87D",0x5829],
+ ["D87E",0x5837],
+ ["D8A1",0x5819],
+ ["D8A2",0x581E],
+ ["D8A3",0x5827],
+ ["D8A4",0x5823],
+ ["D8A5",0x5828],
+ ["D8A6",0x57F5],
+ ["D8A7",0x5848],
+ ["D8A8",0x5825],
+ ["D8A9",0x581C],
+ ["D8AA",0x581B],
+ ["D8AB",0x5833],
+ ["D8AC",0x583F],
+ ["D8AD",0x5836],
+ ["D8AE",0x582E],
+ ["D8AF",0x5839],
+ ["D8B0",0x5838],
+ ["D8B1",0x582D],
+ ["D8B2",0x582C],
+ ["D8B3",0x583B],
+ ["D8B4",0x5961],
+ ["D8B5",0x5AAF],
+ ["D8B6",0x5A94],
+ ["D8B7",0x5A9F],
+ ["D8B8",0x5A7A],
+ ["D8B9",0x5AA2],
+ ["D8BA",0x5A9E],
+ ["D8BB",0x5A78],
+ ["D8BC",0x5AA6],
+ ["D8BD",0x5A7C],
+ ["D8BE",0x5AA5],
+ ["D8BF",0x5AAC],
+ ["D8C0",0x5A95],
+ ["D8C1",0x5AAE],
+ ["D8C2",0x5A37],
+ ["D8C3",0x5A84],
+ ["D8C4",0x5A8A],
+ ["D8C5",0x5A97],
+ ["D8C6",0x5A83],
+ ["D8C7",0x5A8B],
+ ["D8C8",0x5AA9],
+ ["D8C9",0x5A7B],
+ ["D8CA",0x5A7D],
+ ["D8CB",0x5A8C],
+ ["D8CC",0x5A9C],
+ ["D8CD",0x5A8F],
+ ["D8CE",0x5A93],
+ ["D8CF",0x5A9D],
+ ["D8D0",0x5BEA],
+ ["D8D1",0x5BCD],
+ ["D8D2",0x5BCB],
+ ["D8D3",0x5BD4],
+ ["D8D4",0x5BD1],
+ ["D8D5",0x5BCA],
+ ["D8D6",0x5BCE],
+ ["D8D7",0x5C0C],
+ ["D8D8",0x5C30],
+ ["D8D9",0x5D37],
+ ["D8DA",0x5D43],
+ ["D8DB",0x5D6B],
+ ["D8DC",0x5D41],
+ ["D8DD",0x5D4B],
+ ["D8DE",0x5D3F],
+ ["D8DF",0x5D35],
+ ["D8E0",0x5D51],
+ ["D8E1",0x5D4E],
+ ["D8E2",0x5D55],
+ ["D8E3",0x5D33],
+ ["D8E4",0x5D3A],
+ ["D8E5",0x5D52],
+ ["D8E6",0x5D3D],
+ ["D8E7",0x5D31],
+ ["D8E8",0x5D59],
+ ["D8E9",0x5D42],
+ ["D8EA",0x5D39],
+ ["D8EB",0x5D49],
+ ["D8EC",0x5D38],
+ ["D8ED",0x5D3C],
+ ["D8EE",0x5D32],
+ ["D8EF",0x5D36],
+ ["D8F0",0x5D40],
+ ["D8F1",0x5D45],
+ ["D8F2",0x5E44],
+ ["D8F3",0x5E41],
+ ["D8F4",0x5F58],
+ ["D8F5",0x5FA6],
+ ["D8F6",0x5FA5],
+ ["D8F7",0x5FAB],
+ ["D8F8",0x60C9],
+ ["D8F9",0x60B9],
+ ["D8FA",0x60CC],
+ ["D8FB",0x60E2],
+ ["D8FC",0x60CE],
+ ["D8FD",0x60C4],
+ ["D8FE",0x6114],
+ ["D940",0x60F2],
+ ["D941",0x610A],
+ ["D942",0x6116],
+ ["D943",0x6105],
+ ["D944",0x60F5],
+ ["D945",0x6113],
+ ["D946",0x60F8],
+ ["D947",0x60FC],
+ ["D948",0x60FE],
+ ["D949",0x60C1],
+ ["D94A",0x6103],
+ ["D94B",0x6118],
+ ["D94C",0x611D],
+ ["D94D",0x6110],
+ ["D94E",0x60FF],
+ ["D94F",0x6104],
+ ["D950",0x610B],
+ ["D951",0x624A],
+ ["D952",0x6394],
+ ["D953",0x63B1],
+ ["D954",0x63B0],
+ ["D955",0x63CE],
+ ["D956",0x63E5],
+ ["D957",0x63E8],
+ ["D958",0x63EF],
+ ["D959",0x63C3],
+ ["D95A",0x649D],
+ ["D95B",0x63F3],
+ ["D95C",0x63CA],
+ ["D95D",0x63E0],
+ ["D95E",0x63F6],
+ ["D95F",0x63D5],
+ ["D960",0x63F2],
+ ["D961",0x63F5],
+ ["D962",0x6461],
+ ["D963",0x63DF],
+ ["D964",0x63BE],
+ ["D965",0x63DD],
+ ["D966",0x63DC],
+ ["D967",0x63C4],
+ ["D968",0x63D8],
+ ["D969",0x63D3],
+ ["D96A",0x63C2],
+ ["D96B",0x63C7],
+ ["D96C",0x63CC],
+ ["D96D",0x63CB],
+ ["D96E",0x63C8],
+ ["D96F",0x63F0],
+ ["D970",0x63D7],
+ ["D971",0x63D9],
+ ["D972",0x6532],
+ ["D973",0x6567],
+ ["D974",0x656A],
+ ["D975",0x6564],
+ ["D976",0x655C],
+ ["D977",0x6568],
+ ["D978",0x6565],
+ ["D979",0x658C],
+ ["D97A",0x659D],
+ ["D97B",0x659E],
+ ["D97C",0x65AE],
+ ["D97D",0x65D0],
+ ["D97E",0x65D2],
+ ["D9A1",0x667C],
+ ["D9A2",0x666C],
+ ["D9A3",0x667B],
+ ["D9A4",0x6680],
+ ["D9A5",0x6671],
+ ["D9A6",0x6679],
+ ["D9A7",0x666A],
+ ["D9A8",0x6672],
+ ["D9A9",0x6701],
+ ["D9AA",0x690C],
+ ["D9AB",0x68D3],
+ ["D9AC",0x6904],
+ ["D9AD",0x68DC],
+ ["D9AE",0x692A],
+ ["D9AF",0x68EC],
+ ["D9B0",0x68EA],
+ ["D9B1",0x68F1],
+ ["D9B2",0x690F],
+ ["D9B3",0x68D6],
+ ["D9B4",0x68F7],
+ ["D9B5",0x68EB],
+ ["D9B6",0x68E4],
+ ["D9B7",0x68F6],
+ ["D9B8",0x6913],
+ ["D9B9",0x6910],
+ ["D9BA",0x68F3],
+ ["D9BB",0x68E1],
+ ["D9BC",0x6907],
+ ["D9BD",0x68CC],
+ ["D9BE",0x6908],
+ ["D9BF",0x6970],
+ ["D9C0",0x68B4],
+ ["D9C1",0x6911],
+ ["D9C2",0x68EF],
+ ["D9C3",0x68C6],
+ ["D9C4",0x6914],
+ ["D9C5",0x68F8],
+ ["D9C6",0x68D0],
+ ["D9C7",0x68FD],
+ ["D9C8",0x68FC],
+ ["D9C9",0x68E8],
+ ["D9CA",0x690B],
+ ["D9CB",0x690A],
+ ["D9CC",0x6917],
+ ["D9CD",0x68CE],
+ ["D9CE",0x68C8],
+ ["D9CF",0x68DD],
+ ["D9D0",0x68DE],
+ ["D9D1",0x68E6],
+ ["D9D2",0x68F4],
+ ["D9D3",0x68D1],
+ ["D9D4",0x6906],
+ ["D9D5",0x68D4],
+ ["D9D6",0x68E9],
+ ["D9D7",0x6915],
+ ["D9D8",0x6925],
+ ["D9D9",0x68C7],
+ ["D9DA",0x6B39],
+ ["D9DB",0x6B3B],
+ ["D9DC",0x6B3F],
+ ["D9DD",0x6B3C],
+ ["D9DE",0x6B94],
+ ["D9DF",0x6B97],
+ ["D9E0",0x6B99],
+ ["D9E1",0x6B95],
+ ["D9E2",0x6BBD],
+ ["D9E3",0x6BF0],
+ ["D9E4",0x6BF2],
+ ["D9E5",0x6BF3],
+ ["D9E6",0x6C30],
+ ["D9E7",0x6DFC],
+ ["D9E8",0x6E46],
+ ["D9E9",0x6E47],
+ ["D9EA",0x6E1F],
+ ["D9EB",0x6E49],
+ ["D9EC",0x6E88],
+ ["D9ED",0x6E3C],
+ ["D9EE",0x6E3D],
+ ["D9EF",0x6E45],
+ ["D9F0",0x6E62],
+ ["D9F1",0x6E2B],
+ ["D9F2",0x6E3F],
+ ["D9F3",0x6E41],
+ ["D9F4",0x6E5D],
+ ["D9F5",0x6E73],
+ ["D9F6",0x6E1C],
+ ["D9F7",0x6E33],
+ ["D9F8",0x6E4B],
+ ["D9F9",0x6E40],
+ ["D9FA",0x6E51],
+ ["D9FB",0x6E3B],
+ ["D9FC",0x6E03],
+ ["D9FD",0x6E2E],
+ ["D9FE",0x6E5E],
+ ["DA40",0x6E68],
+ ["DA41",0x6E5C],
+ ["DA42",0x6E61],
+ ["DA43",0x6E31],
+ ["DA44",0x6E28],
+ ["DA45",0x6E60],
+ ["DA46",0x6E71],
+ ["DA47",0x6E6B],
+ ["DA48",0x6E39],
+ ["DA49",0x6E22],
+ ["DA4A",0x6E30],
+ ["DA4B",0x6E53],
+ ["DA4C",0x6E65],
+ ["DA4D",0x6E27],
+ ["DA4E",0x6E78],
+ ["DA4F",0x6E64],
+ ["DA50",0x6E77],
+ ["DA51",0x6E55],
+ ["DA52",0x6E79],
+ ["DA53",0x6E52],
+ ["DA54",0x6E66],
+ ["DA55",0x6E35],
+ ["DA56",0x6E36],
+ ["DA57",0x6E5A],
+ ["DA58",0x7120],
+ ["DA59",0x711E],
+ ["DA5A",0x712F],
+ ["DA5B",0x70FB],
+ ["DA5C",0x712E],
+ ["DA5D",0x7131],
+ ["DA5E",0x7123],
+ ["DA5F",0x7125],
+ ["DA60",0x7122],
+ ["DA61",0x7132],
+ ["DA62",0x711F],
+ ["DA63",0x7128],
+ ["DA64",0x713A],
+ ["DA65",0x711B],
+ ["DA66",0x724B],
+ ["DA67",0x725A],
+ ["DA68",0x7288],
+ ["DA69",0x7289],
+ ["DA6A",0x7286],
+ ["DA6B",0x7285],
+ ["DA6C",0x728B],
+ ["DA6D",0x7312],
+ ["DA6E",0x730B],
+ ["DA6F",0x7330],
+ ["DA70",0x7322],
+ ["DA71",0x7331],
+ ["DA72",0x7333],
+ ["DA73",0x7327],
+ ["DA74",0x7332],
+ ["DA75",0x732D],
+ ["DA76",0x7326],
+ ["DA77",0x7323],
+ ["DA78",0x7335],
+ ["DA79",0x730C],
+ ["DA7A",0x742E],
+ ["DA7B",0x742C],
+ ["DA7C",0x7430],
+ ["DA7D",0x742B],
+ ["DA7E",0x7416],
+ ["DAA1",0x741A],
+ ["DAA2",0x7421],
+ ["DAA3",0x742D],
+ ["DAA4",0x7431],
+ ["DAA5",0x7424],
+ ["DAA6",0x7423],
+ ["DAA7",0x741D],
+ ["DAA8",0x7429],
+ ["DAA9",0x7420],
+ ["DAAA",0x7432],
+ ["DAAB",0x74FB],
+ ["DAAC",0x752F],
+ ["DAAD",0x756F],
+ ["DAAE",0x756C],
+ ["DAAF",0x75E7],
+ ["DAB0",0x75DA],
+ ["DAB1",0x75E1],
+ ["DAB2",0x75E6],
+ ["DAB3",0x75DD],
+ ["DAB4",0x75DF],
+ ["DAB5",0x75E4],
+ ["DAB6",0x75D7],
+ ["DAB7",0x7695],
+ ["DAB8",0x7692],
+ ["DAB9",0x76DA],
+ ["DABA",0x7746],
+ ["DABB",0x7747],
+ ["DABC",0x7744],
+ ["DABD",0x774D],
+ ["DABE",0x7745],
+ ["DABF",0x774A],
+ ["DAC0",0x774E],
+ ["DAC1",0x774B],
+ ["DAC2",0x774C],
+ ["DAC3",0x77DE],
+ ["DAC4",0x77EC],
+ ["DAC5",0x7860],
+ ["DAC6",0x7864],
+ ["DAC7",0x7865],
+ ["DAC8",0x785C],
+ ["DAC9",0x786D],
+ ["DACA",0x7871],
+ ["DACB",0x786A],
+ ["DACC",0x786E],
+ ["DACD",0x7870],
+ ["DACE",0x7869],
+ ["DACF",0x7868],
+ ["DAD0",0x785E],
+ ["DAD1",0x7862],
+ ["DAD2",0x7974],
+ ["DAD3",0x7973],
+ ["DAD4",0x7972],
+ ["DAD5",0x7970],
+ ["DAD6",0x7A02],
+ ["DAD7",0x7A0A],
+ ["DAD8",0x7A03],
+ ["DAD9",0x7A0C],
+ ["DADA",0x7A04],
+ ["DADB",0x7A99],
+ ["DADC",0x7AE6],
+ ["DADD",0x7AE4],
+ ["DADE",0x7B4A],
+ ["DADF",0x7B3B],
+ ["DAE0",0x7B44],
+ ["DAE1",0x7B48],
+ ["DAE2",0x7B4C],
+ ["DAE3",0x7B4E],
+ ["DAE4",0x7B40],
+ ["DAE5",0x7B58],
+ ["DAE6",0x7B45],
+ ["DAE7",0x7CA2],
+ ["DAE8",0x7C9E],
+ ["DAE9",0x7CA8],
+ ["DAEA",0x7CA1],
+ ["DAEB",0x7D58],
+ ["DAEC",0x7D6F],
+ ["DAED",0x7D63],
+ ["DAEE",0x7D53],
+ ["DAEF",0x7D56],
+ ["DAF0",0x7D67],
+ ["DAF1",0x7D6A],
+ ["DAF2",0x7D4F],
+ ["DAF3",0x7D6D],
+ ["DAF4",0x7D5C],
+ ["DAF5",0x7D6B],
+ ["DAF6",0x7D52],
+ ["DAF7",0x7D54],
+ ["DAF8",0x7D69],
+ ["DAF9",0x7D51],
+ ["DAFA",0x7D5F],
+ ["DAFB",0x7D4E],
+ ["DAFC",0x7F3E],
+ ["DAFD",0x7F3F],
+ ["DAFE",0x7F65],
+ ["DB40",0x7F66],
+ ["DB41",0x7FA2],
+ ["DB42",0x7FA0],
+ ["DB43",0x7FA1],
+ ["DB44",0x7FD7],
+ ["DB45",0x8051],
+ ["DB46",0x804F],
+ ["DB47",0x8050],
+ ["DB48",0x80FE],
+ ["DB49",0x80D4],
+ ["DB4A",0x8143],
+ ["DB4B",0x814A],
+ ["DB4C",0x8152],
+ ["DB4D",0x814F],
+ ["DB4E",0x8147],
+ ["DB4F",0x813D],
+ ["DB50",0x814D],
+ ["DB51",0x813A],
+ ["DB52",0x81E6],
+ ["DB53",0x81EE],
+ ["DB54",0x81F7],
+ ["DB55",0x81F8],
+ ["DB56",0x81F9],
+ ["DB57",0x8204],
+ ["DB58",0x823C],
+ ["DB59",0x823D],
+ ["DB5A",0x823F],
+ ["DB5B",0x8275],
+ ["DB5C",0x833B],
+ ["DB5D",0x83CF],
+ ["DB5E",0x83F9],
+ ["DB5F",0x8423],
+ ["DB60",0x83C0],
+ ["DB61",0x83E8],
+ ["DB62",0x8412],
+ ["DB63",0x83E7],
+ ["DB64",0x83E4],
+ ["DB65",0x83FC],
+ ["DB66",0x83F6],
+ ["DB67",0x8410],
+ ["DB68",0x83C6],
+ ["DB69",0x83C8],
+ ["DB6A",0x83EB],
+ ["DB6B",0x83E3],
+ ["DB6C",0x83BF],
+ ["DB6D",0x8401],
+ ["DB6E",0x83DD],
+ ["DB6F",0x83E5],
+ ["DB70",0x83D8],
+ ["DB71",0x83FF],
+ ["DB72",0x83E1],
+ ["DB73",0x83CB],
+ ["DB74",0x83CE],
+ ["DB75",0x83D6],
+ ["DB76",0x83F5],
+ ["DB77",0x83C9],
+ ["DB78",0x8409],
+ ["DB79",0x840F],
+ ["DB7A",0x83DE],
+ ["DB7B",0x8411],
+ ["DB7C",0x8406],
+ ["DB7D",0x83C2],
+ ["DB7E",0x83F3],
+ ["DBA1",0x83D5],
+ ["DBA2",0x83FA],
+ ["DBA3",0x83C7],
+ ["DBA4",0x83D1],
+ ["DBA5",0x83EA],
+ ["DBA6",0x8413],
+ ["DBA7",0x83C3],
+ ["DBA8",0x83EC],
+ ["DBA9",0x83EE],
+ ["DBAA",0x83C4],
+ ["DBAB",0x83FB],
+ ["DBAC",0x83D7],
+ ["DBAD",0x83E2],
+ ["DBAE",0x841B],
+ ["DBAF",0x83DB],
+ ["DBB0",0x83FE],
+ ["DBB1",0x86D8],
+ ["DBB2",0x86E2],
+ ["DBB3",0x86E6],
+ ["DBB4",0x86D3],
+ ["DBB5",0x86E3],
+ ["DBB6",0x86DA],
+ ["DBB7",0x86EA],
+ ["DBB8",0x86DD],
+ ["DBB9",0x86EB],
+ ["DBBA",0x86DC],
+ ["DBBB",0x86EC],
+ ["DBBC",0x86E9],
+ ["DBBD",0x86D7],
+ ["DBBE",0x86E8],
+ ["DBBF",0x86D1],
+ ["DBC0",0x8848],
+ ["DBC1",0x8856],
+ ["DBC2",0x8855],
+ ["DBC3",0x88BA],
+ ["DBC4",0x88D7],
+ ["DBC5",0x88B9],
+ ["DBC6",0x88B8],
+ ["DBC7",0x88C0],
+ ["DBC8",0x88BE],
+ ["DBC9",0x88B6],
+ ["DBCA",0x88BC],
+ ["DBCB",0x88B7],
+ ["DBCC",0x88BD],
+ ["DBCD",0x88B2],
+ ["DBCE",0x8901],
+ ["DBCF",0x88C9],
+ ["DBD0",0x8995],
+ ["DBD1",0x8998],
+ ["DBD2",0x8997],
+ ["DBD3",0x89DD],
+ ["DBD4",0x89DA],
+ ["DBD5",0x89DB],
+ ["DBD6",0x8A4E],
+ ["DBD7",0x8A4D],
+ ["DBD8",0x8A39],
+ ["DBD9",0x8A59],
+ ["DBDA",0x8A40],
+ ["DBDB",0x8A57],
+ ["DBDC",0x8A58],
+ ["DBDD",0x8A44],
+ ["DBDE",0x8A45],
+ ["DBDF",0x8A52],
+ ["DBE0",0x8A48],
+ ["DBE1",0x8A51],
+ ["DBE2",0x8A4A],
+ ["DBE3",0x8A4C],
+ ["DBE4",0x8A4F],
+ ["DBE5",0x8C5F],
+ ["DBE6",0x8C81],
+ ["DBE7",0x8C80],
+ ["DBE8",0x8CBA],
+ ["DBE9",0x8CBE],
+ ["DBEA",0x8CB0],
+ ["DBEB",0x8CB9],
+ ["DBEC",0x8CB5],
+ ["DBED",0x8D84],
+ ["DBEE",0x8D80],
+ ["DBEF",0x8D89],
+ ["DBF0",0x8DD8],
+ ["DBF1",0x8DD3],
+ ["DBF2",0x8DCD],
+ ["DBF3",0x8DC7],
+ ["DBF4",0x8DD6],
+ ["DBF5",0x8DDC],
+ ["DBF6",0x8DCF],
+ ["DBF7",0x8DD5],
+ ["DBF8",0x8DD9],
+ ["DBF9",0x8DC8],
+ ["DBFA",0x8DD7],
+ ["DBFB",0x8DC5],
+ ["DBFC",0x8EEF],
+ ["DBFD",0x8EF7],
+ ["DBFE",0x8EFA],
+ ["DC40",0x8EF9],
+ ["DC41",0x8EE6],
+ ["DC42",0x8EEE],
+ ["DC43",0x8EE5],
+ ["DC44",0x8EF5],
+ ["DC45",0x8EE7],
+ ["DC46",0x8EE8],
+ ["DC47",0x8EF6],
+ ["DC48",0x8EEB],
+ ["DC49",0x8EF1],
+ ["DC4A",0x8EEC],
+ ["DC4B",0x8EF4],
+ ["DC4C",0x8EE9],
+ ["DC4D",0x902D],
+ ["DC4E",0x9034],
+ ["DC4F",0x902F],
+ ["DC50",0x9106],
+ ["DC51",0x912C],
+ ["DC52",0x9104],
+ ["DC53",0x90FF],
+ ["DC54",0x90FC],
+ ["DC55",0x9108],
+ ["DC56",0x90F9],
+ ["DC57",0x90FB],
+ ["DC58",0x9101],
+ ["DC59",0x9100],
+ ["DC5A",0x9107],
+ ["DC5B",0x9105],
+ ["DC5C",0x9103],
+ ["DC5D",0x9161],
+ ["DC5E",0x9164],
+ ["DC5F",0x915F],
+ ["DC60",0x9162],
+ ["DC61",0x9160],
+ ["DC62",0x9201],
+ ["DC63",0x920A],
+ ["DC64",0x9225],
+ ["DC65",0x9203],
+ ["DC66",0x921A],
+ ["DC67",0x9226],
+ ["DC68",0x920F],
+ ["DC69",0x920C],
+ ["DC6A",0x9200],
+ ["DC6B",0x9212],
+ ["DC6C",0x91FF],
+ ["DC6D",0x91FD],
+ ["DC6E",0x9206],
+ ["DC6F",0x9204],
+ ["DC70",0x9227],
+ ["DC71",0x9202],
+ ["DC72",0x921C],
+ ["DC73",0x9224],
+ ["DC74",0x9219],
+ ["DC75",0x9217],
+ ["DC76",0x9205],
+ ["DC77",0x9216],
+ ["DC78",0x957B],
+ ["DC79",0x958D],
+ ["DC7A",0x958C],
+ ["DC7B",0x9590],
+ ["DC7C",0x9687],
+ ["DC7D",0x967E],
+ ["DC7E",0x9688],
+ ["DCA1",0x9689],
+ ["DCA2",0x9683],
+ ["DCA3",0x9680],
+ ["DCA4",0x96C2],
+ ["DCA5",0x96C8],
+ ["DCA6",0x96C3],
+ ["DCA7",0x96F1],
+ ["DCA8",0x96F0],
+ ["DCA9",0x976C],
+ ["DCAA",0x9770],
+ ["DCAB",0x976E],
+ ["DCAC",0x9807],
+ ["DCAD",0x98A9],
+ ["DCAE",0x98EB],
+ ["DCAF",0x9CE6],
+ ["DCB0",0x9EF9],
+ ["DCB1",0x4E83],
+ ["DCB2",0x4E84],
+ ["DCB3",0x4EB6],
+ ["DCB4",0x50BD],
+ ["DCB5",0x50BF],
+ ["DCB6",0x50C6],
+ ["DCB7",0x50AE],
+ ["DCB8",0x50C4],
+ ["DCB9",0x50CA],
+ ["DCBA",0x50B4],
+ ["DCBB",0x50C8],
+ ["DCBC",0x50C2],
+ ["DCBD",0x50B0],
+ ["DCBE",0x50C1],
+ ["DCBF",0x50BA],
+ ["DCC0",0x50B1],
+ ["DCC1",0x50CB],
+ ["DCC2",0x50C9],
+ ["DCC3",0x50B6],
+ ["DCC4",0x50B8],
+ ["DCC5",0x51D7],
+ ["DCC6",0x527A],
+ ["DCC7",0x5278],
+ ["DCC8",0x527B],
+ ["DCC9",0x527C],
+ ["DCCA",0x55C3],
+ ["DCCB",0x55DB],
+ ["DCCC",0x55CC],
+ ["DCCD",0x55D0],
+ ["DCCE",0x55CB],
+ ["DCCF",0x55CA],
+ ["DCD0",0x55DD],
+ ["DCD1",0x55C0],
+ ["DCD2",0x55D4],
+ ["DCD3",0x55C4],
+ ["DCD4",0x55E9],
+ ["DCD5",0x55BF],
+ ["DCD6",0x55D2],
+ ["DCD7",0x558D],
+ ["DCD8",0x55CF],
+ ["DCD9",0x55D5],
+ ["DCDA",0x55E2],
+ ["DCDB",0x55D6],
+ ["DCDC",0x55C8],
+ ["DCDD",0x55F2],
+ ["DCDE",0x55CD],
+ ["DCDF",0x55D9],
+ ["DCE0",0x55C2],
+ ["DCE1",0x5714],
+ ["DCE2",0x5853],
+ ["DCE3",0x5868],
+ ["DCE4",0x5864],
+ ["DCE5",0x584F],
+ ["DCE6",0x584D],
+ ["DCE7",0x5849],
+ ["DCE8",0x586F],
+ ["DCE9",0x5855],
+ ["DCEA",0x584E],
+ ["DCEB",0x585D],
+ ["DCEC",0x5859],
+ ["DCED",0x5865],
+ ["DCEE",0x585B],
+ ["DCEF",0x583D],
+ ["DCF0",0x5863],
+ ["DCF1",0x5871],
+ ["DCF2",0x58FC],
+ ["DCF3",0x5AC7],
+ ["DCF4",0x5AC4],
+ ["DCF5",0x5ACB],
+ ["DCF6",0x5ABA],
+ ["DCF7",0x5AB8],
+ ["DCF8",0x5AB1],
+ ["DCF9",0x5AB5],
+ ["DCFA",0x5AB0],
+ ["DCFB",0x5ABF],
+ ["DCFC",0x5AC8],
+ ["DCFD",0x5ABB],
+ ["DCFE",0x5AC6],
+ ["DD40",0x5AB7],
+ ["DD41",0x5AC0],
+ ["DD42",0x5ACA],
+ ["DD43",0x5AB4],
+ ["DD44",0x5AB6],
+ ["DD45",0x5ACD],
+ ["DD46",0x5AB9],
+ ["DD47",0x5A90],
+ ["DD48",0x5BD6],
+ ["DD49",0x5BD8],
+ ["DD4A",0x5BD9],
+ ["DD4B",0x5C1F],
+ ["DD4C",0x5C33],
+ ["DD4D",0x5D71],
+ ["DD4E",0x5D63],
+ ["DD4F",0x5D4A],
+ ["DD50",0x5D65],
+ ["DD51",0x5D72],
+ ["DD52",0x5D6C],
+ ["DD53",0x5D5E],
+ ["DD54",0x5D68],
+ ["DD55",0x5D67],
+ ["DD56",0x5D62],
+ ["DD57",0x5DF0],
+ ["DD58",0x5E4F],
+ ["DD59",0x5E4E],
+ ["DD5A",0x5E4A],
+ ["DD5B",0x5E4D],
+ ["DD5C",0x5E4B],
+ ["DD5D",0x5EC5],
+ ["DD5E",0x5ECC],
+ ["DD5F",0x5EC6],
+ ["DD60",0x5ECB],
+ ["DD61",0x5EC7],
+ ["DD62",0x5F40],
+ ["DD63",0x5FAF],
+ ["DD64",0x5FAD],
+ ["DD65",0x60F7],
+ ["DD66",0x6149],
+ ["DD67",0x614A],
+ ["DD68",0x612B],
+ ["DD69",0x6145],
+ ["DD6A",0x6136],
+ ["DD6B",0x6132],
+ ["DD6C",0x612E],
+ ["DD6D",0x6146],
+ ["DD6E",0x612F],
+ ["DD6F",0x614F],
+ ["DD70",0x6129],
+ ["DD71",0x6140],
+ ["DD72",0x6220],
+ ["DD73",0x9168],
+ ["DD74",0x6223],
+ ["DD75",0x6225],
+ ["DD76",0x6224],
+ ["DD77",0x63C5],
+ ["DD78",0x63F1],
+ ["DD79",0x63EB],
+ ["DD7A",0x6410],
+ ["DD7B",0x6412],
+ ["DD7C",0x6409],
+ ["DD7D",0x6420],
+ ["DD7E",0x6424],
+ ["DDA1",0x6433],
+ ["DDA2",0x6443],
+ ["DDA3",0x641F],
+ ["DDA4",0x6415],
+ ["DDA5",0x6418],
+ ["DDA6",0x6439],
+ ["DDA7",0x6437],
+ ["DDA8",0x6422],
+ ["DDA9",0x6423],
+ ["DDAA",0x640C],
+ ["DDAB",0x6426],
+ ["DDAC",0x6430],
+ ["DDAD",0x6428],
+ ["DDAE",0x6441],
+ ["DDAF",0x6435],
+ ["DDB0",0x642F],
+ ["DDB1",0x640A],
+ ["DDB2",0x641A],
+ ["DDB3",0x6440],
+ ["DDB4",0x6425],
+ ["DDB5",0x6427],
+ ["DDB6",0x640B],
+ ["DDB7",0x63E7],
+ ["DDB8",0x641B],
+ ["DDB9",0x642E],
+ ["DDBA",0x6421],
+ ["DDBB",0x640E],
+ ["DDBC",0x656F],
+ ["DDBD",0x6592],
+ ["DDBE",0x65D3],
+ ["DDBF",0x6686],
+ ["DDC0",0x668C],
+ ["DDC1",0x6695],
+ ["DDC2",0x6690],
+ ["DDC3",0x668B],
+ ["DDC4",0x668A],
+ ["DDC5",0x6699],
+ ["DDC6",0x6694],
+ ["DDC7",0x6678],
+ ["DDC8",0x6720],
+ ["DDC9",0x6966],
+ ["DDCA",0x695F],
+ ["DDCB",0x6938],
+ ["DDCC",0x694E],
+ ["DDCD",0x6962],
+ ["DDCE",0x6971],
+ ["DDCF",0x693F],
+ ["DDD0",0x6945],
+ ["DDD1",0x696A],
+ ["DDD2",0x6939],
+ ["DDD3",0x6942],
+ ["DDD4",0x6957],
+ ["DDD5",0x6959],
+ ["DDD6",0x697A],
+ ["DDD7",0x6948],
+ ["DDD8",0x6949],
+ ["DDD9",0x6935],
+ ["DDDA",0x696C],
+ ["DDDB",0x6933],
+ ["DDDC",0x693D],
+ ["DDDD",0x6965],
+ ["DDDE",0x68F0],
+ ["DDDF",0x6978],
+ ["DDE0",0x6934],
+ ["DDE1",0x6969],
+ ["DDE2",0x6940],
+ ["DDE3",0x696F],
+ ["DDE4",0x6944],
+ ["DDE5",0x6976],
+ ["DDE6",0x6958],
+ ["DDE7",0x6941],
+ ["DDE8",0x6974],
+ ["DDE9",0x694C],
+ ["DDEA",0x693B],
+ ["DDEB",0x694B],
+ ["DDEC",0x6937],
+ ["DDED",0x695C],
+ ["DDEE",0x694F],
+ ["DDEF",0x6951],
+ ["DDF0",0x6932],
+ ["DDF1",0x6952],
+ ["DDF2",0x692F],
+ ["DDF3",0x697B],
+ ["DDF4",0x693C],
+ ["DDF5",0x6B46],
+ ["DDF6",0x6B45],
+ ["DDF7",0x6B43],
+ ["DDF8",0x6B42],
+ ["DDF9",0x6B48],
+ ["DDFA",0x6B41],
+ ["DDFB",0x6B9B],
+ ["DDFC",0xFA0D],
+ ["DDFD",0x6BFB],
+ ["DDFE",0x6BFC],
+ ["DE40",0x6BF9],
+ ["DE41",0x6BF7],
+ ["DE42",0x6BF8],
+ ["DE43",0x6E9B],
+ ["DE44",0x6ED6],
+ ["DE45",0x6EC8],
+ ["DE46",0x6E8F],
+ ["DE47",0x6EC0],
+ ["DE48",0x6E9F],
+ ["DE49",0x6E93],
+ ["DE4A",0x6E94],
+ ["DE4B",0x6EA0],
+ ["DE4C",0x6EB1],
+ ["DE4D",0x6EB9],
+ ["DE4E",0x6EC6],
+ ["DE4F",0x6ED2],
+ ["DE50",0x6EBD],
+ ["DE51",0x6EC1],
+ ["DE52",0x6E9E],
+ ["DE53",0x6EC9],
+ ["DE54",0x6EB7],
+ ["DE55",0x6EB0],
+ ["DE56",0x6ECD],
+ ["DE57",0x6EA6],
+ ["DE58",0x6ECF],
+ ["DE59",0x6EB2],
+ ["DE5A",0x6EBE],
+ ["DE5B",0x6EC3],
+ ["DE5C",0x6EDC],
+ ["DE5D",0x6ED8],
+ ["DE5E",0x6E99],
+ ["DE5F",0x6E92],
+ ["DE60",0x6E8E],
+ ["DE61",0x6E8D],
+ ["DE62",0x6EA4],
+ ["DE63",0x6EA1],
+ ["DE64",0x6EBF],
+ ["DE65",0x6EB3],
+ ["DE66",0x6ED0],
+ ["DE67",0x6ECA],
+ ["DE68",0x6E97],
+ ["DE69",0x6EAE],
+ ["DE6A",0x6EA3],
+ ["DE6B",0x7147],
+ ["DE6C",0x7154],
+ ["DE6D",0x7152],
+ ["DE6E",0x7163],
+ ["DE6F",0x7160],
+ ["DE70",0x7141],
+ ["DE71",0x715D],
+ ["DE72",0x7162],
+ ["DE73",0x7172],
+ ["DE74",0x7178],
+ ["DE75",0x716A],
+ ["DE76",0x7161],
+ ["DE77",0x7142],
+ ["DE78",0x7158],
+ ["DE79",0x7143],
+ ["DE7A",0x714B],
+ ["DE7B",0x7170],
+ ["DE7C",0x715F],
+ ["DE7D",0x7150],
+ ["DE7E",0x7153],
+ ["DEA1",0x7144],
+ ["DEA2",0x714D],
+ ["DEA3",0x715A],
+ ["DEA4",0x724F],
+ ["DEA5",0x728D],
+ ["DEA6",0x728C],
+ ["DEA7",0x7291],
+ ["DEA8",0x7290],
+ ["DEA9",0x728E],
+ ["DEAA",0x733C],
+ ["DEAB",0x7342],
+ ["DEAC",0x733B],
+ ["DEAD",0x733A],
+ ["DEAE",0x7340],
+ ["DEAF",0x734A],
+ ["DEB0",0x7349],
+ ["DEB1",0x7444],
+ ["DEB2",0x744A],
+ ["DEB3",0x744B],
+ ["DEB4",0x7452],
+ ["DEB5",0x7451],
+ ["DEB6",0x7457],
+ ["DEB7",0x7440],
+ ["DEB8",0x744F],
+ ["DEB9",0x7450],
+ ["DEBA",0x744E],
+ ["DEBB",0x7442],
+ ["DEBC",0x7446],
+ ["DEBD",0x744D],
+ ["DEBE",0x7454],
+ ["DEBF",0x74E1],
+ ["DEC0",0x74FF],
+ ["DEC1",0x74FE],
+ ["DEC2",0x74FD],
+ ["DEC3",0x751D],
+ ["DEC4",0x7579],
+ ["DEC5",0x7577],
+ ["DEC6",0x6983],
+ ["DEC7",0x75EF],
+ ["DEC8",0x760F],
+ ["DEC9",0x7603],
+ ["DECA",0x75F7],
+ ["DECB",0x75FE],
+ ["DECC",0x75FC],
+ ["DECD",0x75F9],
+ ["DECE",0x75F8],
+ ["DECF",0x7610],
+ ["DED0",0x75FB],
+ ["DED1",0x75F6],
+ ["DED2",0x75ED],
+ ["DED3",0x75F5],
+ ["DED4",0x75FD],
+ ["DED5",0x7699],
+ ["DED6",0x76B5],
+ ["DED7",0x76DD],
+ ["DED8",0x7755],
+ ["DED9",0x775F],
+ ["DEDA",0x7760],
+ ["DEDB",0x7752],
+ ["DEDC",0x7756],
+ ["DEDD",0x775A],
+ ["DEDE",0x7769],
+ ["DEDF",0x7767],
+ ["DEE0",0x7754],
+ ["DEE1",0x7759],
+ ["DEE2",0x776D],
+ ["DEE3",0x77E0],
+ ["DEE4",0x7887],
+ ["DEE5",0x789A],
+ ["DEE6",0x7894],
+ ["DEE7",0x788F],
+ ["DEE8",0x7884],
+ ["DEE9",0x7895],
+ ["DEEA",0x7885],
+ ["DEEB",0x7886],
+ ["DEEC",0x78A1],
+ ["DEED",0x7883],
+ ["DEEE",0x7879],
+ ["DEEF",0x7899],
+ ["DEF0",0x7880],
+ ["DEF1",0x7896],
+ ["DEF2",0x787B],
+ ["DEF3",0x797C],
+ ["DEF4",0x7982],
+ ["DEF5",0x797D],
+ ["DEF6",0x7979],
+ ["DEF7",0x7A11],
+ ["DEF8",0x7A18],
+ ["DEF9",0x7A19],
+ ["DEFA",0x7A12],
+ ["DEFB",0x7A17],
+ ["DEFC",0x7A15],
+ ["DEFD",0x7A22],
+ ["DEFE",0x7A13],
+ ["DF40",0x7A1B],
+ ["DF41",0x7A10],
+ ["DF42",0x7AA3],
+ ["DF43",0x7AA2],
+ ["DF44",0x7A9E],
+ ["DF45",0x7AEB],
+ ["DF46",0x7B66],
+ ["DF47",0x7B64],
+ ["DF48",0x7B6D],
+ ["DF49",0x7B74],
+ ["DF4A",0x7B69],
+ ["DF4B",0x7B72],
+ ["DF4C",0x7B65],
+ ["DF4D",0x7B73],
+ ["DF4E",0x7B71],
+ ["DF4F",0x7B70],
+ ["DF50",0x7B61],
+ ["DF51",0x7B78],
+ ["DF52",0x7B76],
+ ["DF53",0x7B63],
+ ["DF54",0x7CB2],
+ ["DF55",0x7CB4],
+ ["DF56",0x7CAF],
+ ["DF57",0x7D88],
+ ["DF58",0x7D86],
+ ["DF59",0x7D80],
+ ["DF5A",0x7D8D],
+ ["DF5B",0x7D7F],
+ ["DF5C",0x7D85],
+ ["DF5D",0x7D7A],
+ ["DF5E",0x7D8E],
+ ["DF5F",0x7D7B],
+ ["DF60",0x7D83],
+ ["DF61",0x7D7C],
+ ["DF62",0x7D8C],
+ ["DF63",0x7D94],
+ ["DF64",0x7D84],
+ ["DF65",0x7D7D],
+ ["DF66",0x7D92],
+ ["DF67",0x7F6D],
+ ["DF68",0x7F6B],
+ ["DF69",0x7F67],
+ ["DF6A",0x7F68],
+ ["DF6B",0x7F6C],
+ ["DF6C",0x7FA6],
+ ["DF6D",0x7FA5],
+ ["DF6E",0x7FA7],
+ ["DF6F",0x7FDB],
+ ["DF70",0x7FDC],
+ ["DF71",0x8021],
+ ["DF72",0x8164],
+ ["DF73",0x8160],
+ ["DF74",0x8177],
+ ["DF75",0x815C],
+ ["DF76",0x8169],
+ ["DF77",0x815B],
+ ["DF78",0x8162],
+ ["DF79",0x8172],
+ ["DF7A",0x6721],
+ ["DF7B",0x815E],
+ ["DF7C",0x8176],
+ ["DF7D",0x8167],
+ ["DF7E",0x816F],
+ ["DFA1",0x8144],
+ ["DFA2",0x8161],
+ ["DFA3",0x821D],
+ ["DFA4",0x8249],
+ ["DFA5",0x8244],
+ ["DFA6",0x8240],
+ ["DFA7",0x8242],
+ ["DFA8",0x8245],
+ ["DFA9",0x84F1],
+ ["DFAA",0x843F],
+ ["DFAB",0x8456],
+ ["DFAC",0x8476],
+ ["DFAD",0x8479],
+ ["DFAE",0x848F],
+ ["DFAF",0x848D],
+ ["DFB0",0x8465],
+ ["DFB1",0x8451],
+ ["DFB2",0x8440],
+ ["DFB3",0x8486],
+ ["DFB4",0x8467],
+ ["DFB5",0x8430],
+ ["DFB6",0x844D],
+ ["DFB7",0x847D],
+ ["DFB8",0x845A],
+ ["DFB9",0x8459],
+ ["DFBA",0x8474],
+ ["DFBB",0x8473],
+ ["DFBC",0x845D],
+ ["DFBD",0x8507],
+ ["DFBE",0x845E],
+ ["DFBF",0x8437],
+ ["DFC0",0x843A],
+ ["DFC1",0x8434],
+ ["DFC2",0x847A],
+ ["DFC3",0x8443],
+ ["DFC4",0x8478],
+ ["DFC5",0x8432],
+ ["DFC6",0x8445],
+ ["DFC7",0x8429],
+ ["DFC8",0x83D9],
+ ["DFC9",0x844B],
+ ["DFCA",0x842F],
+ ["DFCB",0x8442],
+ ["DFCC",0x842D],
+ ["DFCD",0x845F],
+ ["DFCE",0x8470],
+ ["DFCF",0x8439],
+ ["DFD0",0x844E],
+ ["DFD1",0x844C],
+ ["DFD2",0x8452],
+ ["DFD3",0x846F],
+ ["DFD4",0x84C5],
+ ["DFD5",0x848E],
+ ["DFD6",0x843B],
+ ["DFD7",0x8447],
+ ["DFD8",0x8436],
+ ["DFD9",0x8433],
+ ["DFDA",0x8468],
+ ["DFDB",0x847E],
+ ["DFDC",0x8444],
+ ["DFDD",0x842B],
+ ["DFDE",0x8460],
+ ["DFDF",0x8454],
+ ["DFE0",0x846E],
+ ["DFE1",0x8450],
+ ["DFE2",0x870B],
+ ["DFE3",0x8704],
+ ["DFE4",0x86F7],
+ ["DFE5",0x870C],
+ ["DFE6",0x86FA],
+ ["DFE7",0x86D6],
+ ["DFE8",0x86F5],
+ ["DFE9",0x874D],
+ ["DFEA",0x86F8],
+ ["DFEB",0x870E],
+ ["DFEC",0x8709],
+ ["DFED",0x8701],
+ ["DFEE",0x86F6],
+ ["DFEF",0x870D],
+ ["DFF0",0x8705],
+ ["DFF1",0x88D6],
+ ["DFF2",0x88CB],
+ ["DFF3",0x88CD],
+ ["DFF4",0x88CE],
+ ["DFF5",0x88DE],
+ ["DFF6",0x88DB],
+ ["DFF7",0x88DA],
+ ["DFF8",0x88CC],
+ ["DFF9",0x88D0],
+ ["DFFA",0x8985],
+ ["DFFB",0x899B],
+ ["DFFC",0x89DF],
+ ["DFFD",0x89E5],
+ ["DFFE",0x89E4],
+ ["E040",0x89E1],
+ ["E041",0x89E0],
+ ["E042",0x89E2],
+ ["E043",0x89DC],
+ ["E044",0x89E6],
+ ["E045",0x8A76],
+ ["E046",0x8A86],
+ ["E047",0x8A7F],
+ ["E048",0x8A61],
+ ["E049",0x8A3F],
+ ["E04A",0x8A77],
+ ["E04B",0x8A82],
+ ["E04C",0x8A84],
+ ["E04D",0x8A75],
+ ["E04E",0x8A83],
+ ["E04F",0x8A81],
+ ["E050",0x8A74],
+ ["E051",0x8A7A],
+ ["E052",0x8C3C],
+ ["E053",0x8C4B],
+ ["E054",0x8C4A],
+ ["E055",0x8C65],
+ ["E056",0x8C64],
+ ["E057",0x8C66],
+ ["E058",0x8C86],
+ ["E059",0x8C84],
+ ["E05A",0x8C85],
+ ["E05B",0x8CCC],
+ ["E05C",0x8D68],
+ ["E05D",0x8D69],
+ ["E05E",0x8D91],
+ ["E05F",0x8D8C],
+ ["E060",0x8D8E],
+ ["E061",0x8D8F],
+ ["E062",0x8D8D],
+ ["E063",0x8D93],
+ ["E064",0x8D94],
+ ["E065",0x8D90],
+ ["E066",0x8D92],
+ ["E067",0x8DF0],
+ ["E068",0x8DE0],
+ ["E069",0x8DEC],
+ ["E06A",0x8DF1],
+ ["E06B",0x8DEE],
+ ["E06C",0x8DD0],
+ ["E06D",0x8DE9],
+ ["E06E",0x8DE3],
+ ["E06F",0x8DE2],
+ ["E070",0x8DE7],
+ ["E071",0x8DF2],
+ ["E072",0x8DEB],
+ ["E073",0x8DF4],
+ ["E074",0x8F06],
+ ["E075",0x8EFF],
+ ["E076",0x8F01],
+ ["E077",0x8F00],
+ ["E078",0x8F05],
+ ["E079",0x8F07],
+ ["E07A",0x8F08],
+ ["E07B",0x8F02],
+ ["E07C",0x8F0B],
+ ["E07D",0x9052],
+ ["E07E",0x903F],
+ ["E0A1",0x9044],
+ ["E0A2",0x9049],
+ ["E0A3",0x903D],
+ ["E0A4",0x9110],
+ ["E0A5",0x910D],
+ ["E0A6",0x910F],
+ ["E0A7",0x9111],
+ ["E0A8",0x9116],
+ ["E0A9",0x9114],
+ ["E0AA",0x910B],
+ ["E0AB",0x910E],
+ ["E0AC",0x916E],
+ ["E0AD",0x916F],
+ ["E0AE",0x9248],
+ ["E0AF",0x9252],
+ ["E0B0",0x9230],
+ ["E0B1",0x923A],
+ ["E0B2",0x9266],
+ ["E0B3",0x9233],
+ ["E0B4",0x9265],
+ ["E0B5",0x925E],
+ ["E0B6",0x9283],
+ ["E0B7",0x922E],
+ ["E0B8",0x924A],
+ ["E0B9",0x9246],
+ ["E0BA",0x926D],
+ ["E0BB",0x926C],
+ ["E0BC",0x924F],
+ ["E0BD",0x9260],
+ ["E0BE",0x9267],
+ ["E0BF",0x926F],
+ ["E0C0",0x9236],
+ ["E0C1",0x9261],
+ ["E0C2",0x9270],
+ ["E0C3",0x9231],
+ ["E0C4",0x9254],
+ ["E0C5",0x9263],
+ ["E0C6",0x9250],
+ ["E0C7",0x9272],
+ ["E0C8",0x924E],
+ ["E0C9",0x9253],
+ ["E0CA",0x924C],
+ ["E0CB",0x9256],
+ ["E0CC",0x9232],
+ ["E0CD",0x959F],
+ ["E0CE",0x959C],
+ ["E0CF",0x959E],
+ ["E0D0",0x959B],
+ ["E0D1",0x9692],
+ ["E0D2",0x9693],
+ ["E0D3",0x9691],
+ ["E0D4",0x9697],
+ ["E0D5",0x96CE],
+ ["E0D6",0x96FA],
+ ["E0D7",0x96FD],
+ ["E0D8",0x96F8],
+ ["E0D9",0x96F5],
+ ["E0DA",0x9773],
+ ["E0DB",0x9777],
+ ["E0DC",0x9778],
+ ["E0DD",0x9772],
+ ["E0DE",0x980F],
+ ["E0DF",0x980D],
+ ["E0E0",0x980E],
+ ["E0E1",0x98AC],
+ ["E0E2",0x98F6],
+ ["E0E3",0x98F9],
+ ["E0E4",0x99AF],
+ ["E0E5",0x99B2],
+ ["E0E6",0x99B0],
+ ["E0E7",0x99B5],
+ ["E0E8",0x9AAD],
+ ["E0E9",0x9AAB],
+ ["E0EA",0x9B5B],
+ ["E0EB",0x9CEA],
+ ["E0EC",0x9CED],
+ ["E0ED",0x9CE7],
+ ["E0EE",0x9E80],
+ ["E0EF",0x9EFD],
+ ["E0F0",0x50E6],
+ ["E0F1",0x50D4],
+ ["E0F2",0x50D7],
+ ["E0F3",0x50E8],
+ ["E0F4",0x50F3],
+ ["E0F5",0x50DB],
+ ["E0F6",0x50EA],
+ ["E0F7",0x50DD],
+ ["E0F8",0x50E4],
+ ["E0F9",0x50D3],
+ ["E0FA",0x50EC],
+ ["E0FB",0x50F0],
+ ["E0FC",0x50EF],
+ ["E0FD",0x50E3],
+ ["E0FE",0x50E0],
+ ["E140",0x51D8],
+ ["E141",0x5280],
+ ["E142",0x5281],
+ ["E143",0x52E9],
+ ["E144",0x52EB],
+ ["E145",0x5330],
+ ["E146",0x53AC],
+ ["E147",0x5627],
+ ["E148",0x5615],
+ ["E149",0x560C],
+ ["E14A",0x5612],
+ ["E14B",0x55FC],
+ ["E14C",0x560F],
+ ["E14D",0x561C],
+ ["E14E",0x5601],
+ ["E14F",0x5613],
+ ["E150",0x5602],
+ ["E151",0x55FA],
+ ["E152",0x561D],
+ ["E153",0x5604],
+ ["E154",0x55FF],
+ ["E155",0x55F9],
+ ["E156",0x5889],
+ ["E157",0x587C],
+ ["E158",0x5890],
+ ["E159",0x5898],
+ ["E15A",0x5886],
+ ["E15B",0x5881],
+ ["E15C",0x587F],
+ ["E15D",0x5874],
+ ["E15E",0x588B],
+ ["E15F",0x587A],
+ ["E160",0x5887],
+ ["E161",0x5891],
+ ["E162",0x588E],
+ ["E163",0x5876],
+ ["E164",0x5882],
+ ["E165",0x5888],
+ ["E166",0x587B],
+ ["E167",0x5894],
+ ["E168",0x588F],
+ ["E169",0x58FE],
+ ["E16A",0x596B],
+ ["E16B",0x5ADC],
+ ["E16C",0x5AEE],
+ ["E16D",0x5AE5],
+ ["E16E",0x5AD5],
+ ["E16F",0x5AEA],
+ ["E170",0x5ADA],
+ ["E171",0x5AED],
+ ["E172",0x5AEB],
+ ["E173",0x5AF3],
+ ["E174",0x5AE2],
+ ["E175",0x5AE0],
+ ["E176",0x5ADB],
+ ["E177",0x5AEC],
+ ["E178",0x5ADE],
+ ["E179",0x5ADD],
+ ["E17A",0x5AD9],
+ ["E17B",0x5AE8],
+ ["E17C",0x5ADF],
+ ["E17D",0x5B77],
+ ["E17E",0x5BE0],
+ ["E1A1",0x5BE3],
+ ["E1A2",0x5C63],
+ ["E1A3",0x5D82],
+ ["E1A4",0x5D80],
+ ["E1A5",0x5D7D],
+ ["E1A6",0x5D86],
+ ["E1A7",0x5D7A],
+ ["E1A8",0x5D81],
+ ["E1A9",0x5D77],
+ ["E1AA",0x5D8A],
+ ["E1AB",0x5D89],
+ ["E1AC",0x5D88],
+ ["E1AD",0x5D7E],
+ ["E1AE",0x5D7C],
+ ["E1AF",0x5D8D],
+ ["E1B0",0x5D79],
+ ["E1B1",0x5D7F],
+ ["E1B2",0x5E58],
+ ["E1B3",0x5E59],
+ ["E1B4",0x5E53],
+ ["E1B5",0x5ED8],
+ ["E1B6",0x5ED1],
+ ["E1B7",0x5ED7],
+ ["E1B8",0x5ECE],
+ ["E1B9",0x5EDC],
+ ["E1BA",0x5ED5],
+ ["E1BB",0x5ED9],
+ ["E1BC",0x5ED2],
+ ["E1BD",0x5ED4],
+ ["E1BE",0x5F44],
+ ["E1BF",0x5F43],
+ ["E1C0",0x5F6F],
+ ["E1C1",0x5FB6],
+ ["E1C2",0x612C],
+ ["E1C3",0x6128],
+ ["E1C4",0x6141],
+ ["E1C5",0x615E],
+ ["E1C6",0x6171],
+ ["E1C7",0x6173],
+ ["E1C8",0x6152],
+ ["E1C9",0x6153],
+ ["E1CA",0x6172],
+ ["E1CB",0x616C],
+ ["E1CC",0x6180],
+ ["E1CD",0x6174],
+ ["E1CE",0x6154],
+ ["E1CF",0x617A],
+ ["E1D0",0x615B],
+ ["E1D1",0x6165],
+ ["E1D2",0x613B],
+ ["E1D3",0x616A],
+ ["E1D4",0x6161],
+ ["E1D5",0x6156],
+ ["E1D6",0x6229],
+ ["E1D7",0x6227],
+ ["E1D8",0x622B],
+ ["E1D9",0x642B],
+ ["E1DA",0x644D],
+ ["E1DB",0x645B],
+ ["E1DC",0x645D],
+ ["E1DD",0x6474],
+ ["E1DE",0x6476],
+ ["E1DF",0x6472],
+ ["E1E0",0x6473],
+ ["E1E1",0x647D],
+ ["E1E2",0x6475],
+ ["E1E3",0x6466],
+ ["E1E4",0x64A6],
+ ["E1E5",0x644E],
+ ["E1E6",0x6482],
+ ["E1E7",0x645E],
+ ["E1E8",0x645C],
+ ["E1E9",0x644B],
+ ["E1EA",0x6453],
+ ["E1EB",0x6460],
+ ["E1EC",0x6450],
+ ["E1ED",0x647F],
+ ["E1EE",0x643F],
+ ["E1EF",0x646C],
+ ["E1F0",0x646B],
+ ["E1F1",0x6459],
+ ["E1F2",0x6465],
+ ["E1F3",0x6477],
+ ["E1F4",0x6573],
+ ["E1F5",0x65A0],
+ ["E1F6",0x66A1],
+ ["E1F7",0x66A0],
+ ["E1F8",0x669F],
+ ["E1F9",0x6705],
+ ["E1FA",0x6704],
+ ["E1FB",0x6722],
+ ["E1FC",0x69B1],
+ ["E1FD",0x69B6],
+ ["E1FE",0x69C9],
+ ["E240",0x69A0],
+ ["E241",0x69CE],
+ ["E242",0x6996],
+ ["E243",0x69B0],
+ ["E244",0x69AC],
+ ["E245",0x69BC],
+ ["E246",0x6991],
+ ["E247",0x6999],
+ ["E248",0x698E],
+ ["E249",0x69A7],
+ ["E24A",0x698D],
+ ["E24B",0x69A9],
+ ["E24C",0x69BE],
+ ["E24D",0x69AF],
+ ["E24E",0x69BF],
+ ["E24F",0x69C4],
+ ["E250",0x69BD],
+ ["E251",0x69A4],
+ ["E252",0x69D4],
+ ["E253",0x69B9],
+ ["E254",0x69CA],
+ ["E255",0x699A],
+ ["E256",0x69CF],
+ ["E257",0x69B3],
+ ["E258",0x6993],
+ ["E259",0x69AA],
+ ["E25A",0x69A1],
+ ["E25B",0x699E],
+ ["E25C",0x69D9],
+ ["E25D",0x6997],
+ ["E25E",0x6990],
+ ["E25F",0x69C2],
+ ["E260",0x69B5],
+ ["E261",0x69A5],
+ ["E262",0x69C6],
+ ["E263",0x6B4A],
+ ["E264",0x6B4D],
+ ["E265",0x6B4B],
+ ["E266",0x6B9E],
+ ["E267",0x6B9F],
+ ["E268",0x6BA0],
+ ["E269",0x6BC3],
+ ["E26A",0x6BC4],
+ ["E26B",0x6BFE],
+ ["E26C",0x6ECE],
+ ["E26D",0x6EF5],
+ ["E26E",0x6EF1],
+ ["E26F",0x6F03],
+ ["E270",0x6F25],
+ ["E271",0x6EF8],
+ ["E272",0x6F37],
+ ["E273",0x6EFB],
+ ["E274",0x6F2E],
+ ["E275",0x6F09],
+ ["E276",0x6F4E],
+ ["E277",0x6F19],
+ ["E278",0x6F1A],
+ ["E279",0x6F27],
+ ["E27A",0x6F18],
+ ["E27B",0x6F3B],
+ ["E27C",0x6F12],
+ ["E27D",0x6EED],
+ ["E27E",0x6F0A],
+ ["E2A1",0x6F36],
+ ["E2A2",0x6F73],
+ ["E2A3",0x6EF9],
+ ["E2A4",0x6EEE],
+ ["E2A5",0x6F2D],
+ ["E2A6",0x6F40],
+ ["E2A7",0x6F30],
+ ["E2A8",0x6F3C],
+ ["E2A9",0x6F35],
+ ["E2AA",0x6EEB],
+ ["E2AB",0x6F07],
+ ["E2AC",0x6F0E],
+ ["E2AD",0x6F43],
+ ["E2AE",0x6F05],
+ ["E2AF",0x6EFD],
+ ["E2B0",0x6EF6],
+ ["E2B1",0x6F39],
+ ["E2B2",0x6F1C],
+ ["E2B3",0x6EFC],
+ ["E2B4",0x6F3A],
+ ["E2B5",0x6F1F],
+ ["E2B6",0x6F0D],
+ ["E2B7",0x6F1E],
+ ["E2B8",0x6F08],
+ ["E2B9",0x6F21],
+ ["E2BA",0x7187],
+ ["E2BB",0x7190],
+ ["E2BC",0x7189],
+ ["E2BD",0x7180],
+ ["E2BE",0x7185],
+ ["E2BF",0x7182],
+ ["E2C0",0x718F],
+ ["E2C1",0x717B],
+ ["E2C2",0x7186],
+ ["E2C3",0x7181],
+ ["E2C4",0x7197],
+ ["E2C5",0x7244],
+ ["E2C6",0x7253],
+ ["E2C7",0x7297],
+ ["E2C8",0x7295],
+ ["E2C9",0x7293],
+ ["E2CA",0x7343],
+ ["E2CB",0x734D],
+ ["E2CC",0x7351],
+ ["E2CD",0x734C],
+ ["E2CE",0x7462],
+ ["E2CF",0x7473],
+ ["E2D0",0x7471],
+ ["E2D1",0x7475],
+ ["E2D2",0x7472],
+ ["E2D3",0x7467],
+ ["E2D4",0x746E],
+ ["E2D5",0x7500],
+ ["E2D6",0x7502],
+ ["E2D7",0x7503],
+ ["E2D8",0x757D],
+ ["E2D9",0x7590],
+ ["E2DA",0x7616],
+ ["E2DB",0x7608],
+ ["E2DC",0x760C],
+ ["E2DD",0x7615],
+ ["E2DE",0x7611],
+ ["E2DF",0x760A],
+ ["E2E0",0x7614],
+ ["E2E1",0x76B8],
+ ["E2E2",0x7781],
+ ["E2E3",0x777C],
+ ["E2E4",0x7785],
+ ["E2E5",0x7782],
+ ["E2E6",0x776E],
+ ["E2E7",0x7780],
+ ["E2E8",0x776F],
+ ["E2E9",0x777E],
+ ["E2EA",0x7783],
+ ["E2EB",0x78B2],
+ ["E2EC",0x78AA],
+ ["E2ED",0x78B4],
+ ["E2EE",0x78AD],
+ ["E2EF",0x78A8],
+ ["E2F0",0x787E],
+ ["E2F1",0x78AB],
+ ["E2F2",0x789E],
+ ["E2F3",0x78A5],
+ ["E2F4",0x78A0],
+ ["E2F5",0x78AC],
+ ["E2F6",0x78A2],
+ ["E2F7",0x78A4],
+ ["E2F8",0x7998],
+ ["E2F9",0x798A],
+ ["E2FA",0x798B],
+ ["E2FB",0x7996],
+ ["E2FC",0x7995],
+ ["E2FD",0x7994],
+ ["E2FE",0x7993],
+ ["E340",0x7997],
+ ["E341",0x7988],
+ ["E342",0x7992],
+ ["E343",0x7990],
+ ["E344",0x7A2B],
+ ["E345",0x7A4A],
+ ["E346",0x7A30],
+ ["E347",0x7A2F],
+ ["E348",0x7A28],
+ ["E349",0x7A26],
+ ["E34A",0x7AA8],
+ ["E34B",0x7AAB],
+ ["E34C",0x7AAC],
+ ["E34D",0x7AEE],
+ ["E34E",0x7B88],
+ ["E34F",0x7B9C],
+ ["E350",0x7B8A],
+ ["E351",0x7B91],
+ ["E352",0x7B90],
+ ["E353",0x7B96],
+ ["E354",0x7B8D],
+ ["E355",0x7B8C],
+ ["E356",0x7B9B],
+ ["E357",0x7B8E],
+ ["E358",0x7B85],
+ ["E359",0x7B98],
+ ["E35A",0x5284],
+ ["E35B",0x7B99],
+ ["E35C",0x7BA4],
+ ["E35D",0x7B82],
+ ["E35E",0x7CBB],
+ ["E35F",0x7CBF],
+ ["E360",0x7CBC],
+ ["E361",0x7CBA],
+ ["E362",0x7DA7],
+ ["E363",0x7DB7],
+ ["E364",0x7DC2],
+ ["E365",0x7DA3],
+ ["E366",0x7DAA],
+ ["E367",0x7DC1],
+ ["E368",0x7DC0],
+ ["E369",0x7DC5],
+ ["E36A",0x7D9D],
+ ["E36B",0x7DCE],
+ ["E36C",0x7DC4],
+ ["E36D",0x7DC6],
+ ["E36E",0x7DCB],
+ ["E36F",0x7DCC],
+ ["E370",0x7DAF],
+ ["E371",0x7DB9],
+ ["E372",0x7D96],
+ ["E373",0x7DBC],
+ ["E374",0x7D9F],
+ ["E375",0x7DA6],
+ ["E376",0x7DAE],
+ ["E377",0x7DA9],
+ ["E378",0x7DA1],
+ ["E379",0x7DC9],
+ ["E37A",0x7F73],
+ ["E37B",0x7FE2],
+ ["E37C",0x7FE3],
+ ["E37D",0x7FE5],
+ ["E37E",0x7FDE],
+ ["E3A1",0x8024],
+ ["E3A2",0x805D],
+ ["E3A3",0x805C],
+ ["E3A4",0x8189],
+ ["E3A5",0x8186],
+ ["E3A6",0x8183],
+ ["E3A7",0x8187],
+ ["E3A8",0x818D],
+ ["E3A9",0x818C],
+ ["E3AA",0x818B],
+ ["E3AB",0x8215],
+ ["E3AC",0x8497],
+ ["E3AD",0x84A4],
+ ["E3AE",0x84A1],
+ ["E3AF",0x849F],
+ ["E3B0",0x84BA],
+ ["E3B1",0x84CE],
+ ["E3B2",0x84C2],
+ ["E3B3",0x84AC],
+ ["E3B4",0x84AE],
+ ["E3B5",0x84AB],
+ ["E3B6",0x84B9],
+ ["E3B7",0x84B4],
+ ["E3B8",0x84C1],
+ ["E3B9",0x84CD],
+ ["E3BA",0x84AA],
+ ["E3BB",0x849A],
+ ["E3BC",0x84B1],
+ ["E3BD",0x84D0],
+ ["E3BE",0x849D],
+ ["E3BF",0x84A7],
+ ["E3C0",0x84BB],
+ ["E3C1",0x84A2],
+ ["E3C2",0x8494],
+ ["E3C3",0x84C7],
+ ["E3C4",0x84CC],
+ ["E3C5",0x849B],
+ ["E3C6",0x84A9],
+ ["E3C7",0x84AF],
+ ["E3C8",0x84A8],
+ ["E3C9",0x84D6],
+ ["E3CA",0x8498],
+ ["E3CB",0x84B6],
+ ["E3CC",0x84CF],
+ ["E3CD",0x84A0],
+ ["E3CE",0x84D7],
+ ["E3CF",0x84D4],
+ ["E3D0",0x84D2],
+ ["E3D1",0x84DB],
+ ["E3D2",0x84B0],
+ ["E3D3",0x8491],
+ ["E3D4",0x8661],
+ ["E3D5",0x8733],
+ ["E3D6",0x8723],
+ ["E3D7",0x8728],
+ ["E3D8",0x876B],
+ ["E3D9",0x8740],
+ ["E3DA",0x872E],
+ ["E3DB",0x871E],
+ ["E3DC",0x8721],
+ ["E3DD",0x8719],
+ ["E3DE",0x871B],
+ ["E3DF",0x8743],
+ ["E3E0",0x872C],
+ ["E3E1",0x8741],
+ ["E3E2",0x873E],
+ ["E3E3",0x8746],
+ ["E3E4",0x8720],
+ ["E3E5",0x8732],
+ ["E3E6",0x872A],
+ ["E3E7",0x872D],
+ ["E3E8",0x873C],
+ ["E3E9",0x8712],
+ ["E3EA",0x873A],
+ ["E3EB",0x8731],
+ ["E3EC",0x8735],
+ ["E3ED",0x8742],
+ ["E3EE",0x8726],
+ ["E3EF",0x8727],
+ ["E3F0",0x8738],
+ ["E3F1",0x8724],
+ ["E3F2",0x871A],
+ ["E3F3",0x8730],
+ ["E3F4",0x8711],
+ ["E3F5",0x88F7],
+ ["E3F6",0x88E7],
+ ["E3F7",0x88F1],
+ ["E3F8",0x88F2],
+ ["E3F9",0x88FA],
+ ["E3FA",0x88FE],
+ ["E3FB",0x88EE],
+ ["E3FC",0x88FC],
+ ["E3FD",0x88F6],
+ ["E3FE",0x88FB],
+ ["E440",0x88F0],
+ ["E441",0x88EC],
+ ["E442",0x88EB],
+ ["E443",0x899D],
+ ["E444",0x89A1],
+ ["E445",0x899F],
+ ["E446",0x899E],
+ ["E447",0x89E9],
+ ["E448",0x89EB],
+ ["E449",0x89E8],
+ ["E44A",0x8AAB],
+ ["E44B",0x8A99],
+ ["E44C",0x8A8B],
+ ["E44D",0x8A92],
+ ["E44E",0x8A8F],
+ ["E44F",0x8A96],
+ ["E450",0x8C3D],
+ ["E451",0x8C68],
+ ["E452",0x8C69],
+ ["E453",0x8CD5],
+ ["E454",0x8CCF],
+ ["E455",0x8CD7],
+ ["E456",0x8D96],
+ ["E457",0x8E09],
+ ["E458",0x8E02],
+ ["E459",0x8DFF],
+ ["E45A",0x8E0D],
+ ["E45B",0x8DFD],
+ ["E45C",0x8E0A],
+ ["E45D",0x8E03],
+ ["E45E",0x8E07],
+ ["E45F",0x8E06],
+ ["E460",0x8E05],
+ ["E461",0x8DFE],
+ ["E462",0x8E00],
+ ["E463",0x8E04],
+ ["E464",0x8F10],
+ ["E465",0x8F11],
+ ["E466",0x8F0E],
+ ["E467",0x8F0D],
+ ["E468",0x9123],
+ ["E469",0x911C],
+ ["E46A",0x9120],
+ ["E46B",0x9122],
+ ["E46C",0x911F],
+ ["E46D",0x911D],
+ ["E46E",0x911A],
+ ["E46F",0x9124],
+ ["E470",0x9121],
+ ["E471",0x911B],
+ ["E472",0x917A],
+ ["E473",0x9172],
+ ["E474",0x9179],
+ ["E475",0x9173],
+ ["E476",0x92A5],
+ ["E477",0x92A4],
+ ["E478",0x9276],
+ ["E479",0x929B],
+ ["E47A",0x927A],
+ ["E47B",0x92A0],
+ ["E47C",0x9294],
+ ["E47D",0x92AA],
+ ["E47E",0x928D],
+ ["E4A1",0x92A6],
+ ["E4A2",0x929A],
+ ["E4A3",0x92AB],
+ ["E4A4",0x9279],
+ ["E4A5",0x9297],
+ ["E4A6",0x927F],
+ ["E4A7",0x92A3],
+ ["E4A8",0x92EE],
+ ["E4A9",0x928E],
+ ["E4AA",0x9282],
+ ["E4AB",0x9295],
+ ["E4AC",0x92A2],
+ ["E4AD",0x927D],
+ ["E4AE",0x9288],
+ ["E4AF",0x92A1],
+ ["E4B0",0x928A],
+ ["E4B1",0x9286],
+ ["E4B2",0x928C],
+ ["E4B3",0x9299],
+ ["E4B4",0x92A7],
+ ["E4B5",0x927E],
+ ["E4B6",0x9287],
+ ["E4B7",0x92A9],
+ ["E4B8",0x929D],
+ ["E4B9",0x928B],
+ ["E4BA",0x922D],
+ ["E4BB",0x969E],
+ ["E4BC",0x96A1],
+ ["E4BD",0x96FF],
+ ["E4BE",0x9758],
+ ["E4BF",0x977D],
+ ["E4C0",0x977A],
+ ["E4C1",0x977E],
+ ["E4C2",0x9783],
+ ["E4C3",0x9780],
+ ["E4C4",0x9782],
+ ["E4C5",0x977B],
+ ["E4C6",0x9784],
+ ["E4C7",0x9781],
+ ["E4C8",0x977F],
+ ["E4C9",0x97CE],
+ ["E4CA",0x97CD],
+ ["E4CB",0x9816],
+ ["E4CC",0x98AD],
+ ["E4CD",0x98AE],
+ ["E4CE",0x9902],
+ ["E4CF",0x9900],
+ ["E4D0",0x9907],
+ ["E4D1",0x999D],
+ ["E4D2",0x999C],
+ ["E4D3",0x99C3],
+ ["E4D4",0x99B9],
+ ["E4D5",0x99BB],
+ ["E4D6",0x99BA],
+ ["E4D7",0x99C2],
+ ["E4D8",0x99BD],
+ ["E4D9",0x99C7],
+ ["E4DA",0x9AB1],
+ ["E4DB",0x9AE3],
+ ["E4DC",0x9AE7],
+ ["E4DD",0x9B3E],
+ ["E4DE",0x9B3F],
+ ["E4DF",0x9B60],
+ ["E4E0",0x9B61],
+ ["E4E1",0x9B5F],
+ ["E4E2",0x9CF1],
+ ["E4E3",0x9CF2],
+ ["E4E4",0x9CF5],
+ ["E4E5",0x9EA7],
+ ["E4E6",0x50FF],
+ ["E4E7",0x5103],
+ ["E4E8",0x5130],
+ ["E4E9",0x50F8],
+ ["E4EA",0x5106],
+ ["E4EB",0x5107],
+ ["E4EC",0x50F6],
+ ["E4ED",0x50FE],
+ ["E4EE",0x510B],
+ ["E4EF",0x510C],
+ ["E4F0",0x50FD],
+ ["E4F1",0x510A],
+ ["E4F2",0x528B],
+ ["E4F3",0x528C],
+ ["E4F4",0x52F1],
+ ["E4F5",0x52EF],
+ ["E4F6",0x5648],
+ ["E4F7",0x5642],
+ ["E4F8",0x564C],
+ ["E4F9",0x5635],
+ ["E4FA",0x5641],
+ ["E4FB",0x564A],
+ ["E4FC",0x5649],
+ ["E4FD",0x5646],
+ ["E4FE",0x5658],
+ ["E540",0x565A],
+ ["E541",0x5640],
+ ["E542",0x5633],
+ ["E543",0x563D],
+ ["E544",0x562C],
+ ["E545",0x563E],
+ ["E546",0x5638],
+ ["E547",0x562A],
+ ["E548",0x563A],
+ ["E549",0x571A],
+ ["E54A",0x58AB],
+ ["E54B",0x589D],
+ ["E54C",0x58B1],
+ ["E54D",0x58A0],
+ ["E54E",0x58A3],
+ ["E54F",0x58AF],
+ ["E550",0x58AC],
+ ["E551",0x58A5],
+ ["E552",0x58A1],
+ ["E553",0x58FF],
+ ["E554",0x5AFF],
+ ["E555",0x5AF4],
+ ["E556",0x5AFD],
+ ["E557",0x5AF7],
+ ["E558",0x5AF6],
+ ["E559",0x5B03],
+ ["E55A",0x5AF8],
+ ["E55B",0x5B02],
+ ["E55C",0x5AF9],
+ ["E55D",0x5B01],
+ ["E55E",0x5B07],
+ ["E55F",0x5B05],
+ ["E560",0x5B0F],
+ ["E561",0x5C67],
+ ["E562",0x5D99],
+ ["E563",0x5D97],
+ ["E564",0x5D9F],
+ ["E565",0x5D92],
+ ["E566",0x5DA2],
+ ["E567",0x5D93],
+ ["E568",0x5D95],
+ ["E569",0x5DA0],
+ ["E56A",0x5D9C],
+ ["E56B",0x5DA1],
+ ["E56C",0x5D9A],
+ ["E56D",0x5D9E],
+ ["E56E",0x5E69],
+ ["E56F",0x5E5D],
+ ["E570",0x5E60],
+ ["E571",0x5E5C],
+ ["E572",0x7DF3],
+ ["E573",0x5EDB],
+ ["E574",0x5EDE],
+ ["E575",0x5EE1],
+ ["E576",0x5F49],
+ ["E577",0x5FB2],
+ ["E578",0x618B],
+ ["E579",0x6183],
+ ["E57A",0x6179],
+ ["E57B",0x61B1],
+ ["E57C",0x61B0],
+ ["E57D",0x61A2],
+ ["E57E",0x6189],
+ ["E5A1",0x619B],
+ ["E5A2",0x6193],
+ ["E5A3",0x61AF],
+ ["E5A4",0x61AD],
+ ["E5A5",0x619F],
+ ["E5A6",0x6192],
+ ["E5A7",0x61AA],
+ ["E5A8",0x61A1],
+ ["E5A9",0x618D],
+ ["E5AA",0x6166],
+ ["E5AB",0x61B3],
+ ["E5AC",0x622D],
+ ["E5AD",0x646E],
+ ["E5AE",0x6470],
+ ["E5AF",0x6496],
+ ["E5B0",0x64A0],
+ ["E5B1",0x6485],
+ ["E5B2",0x6497],
+ ["E5B3",0x649C],
+ ["E5B4",0x648F],
+ ["E5B5",0x648B],
+ ["E5B6",0x648A],
+ ["E5B7",0x648C],
+ ["E5B8",0x64A3],
+ ["E5B9",0x649F],
+ ["E5BA",0x6468],
+ ["E5BB",0x64B1],
+ ["E5BC",0x6498],
+ ["E5BD",0x6576],
+ ["E5BE",0x657A],
+ ["E5BF",0x6579],
+ ["E5C0",0x657B],
+ ["E5C1",0x65B2],
+ ["E5C2",0x65B3],
+ ["E5C3",0x66B5],
+ ["E5C4",0x66B0],
+ ["E5C5",0x66A9],
+ ["E5C6",0x66B2],
+ ["E5C7",0x66B7],
+ ["E5C8",0x66AA],
+ ["E5C9",0x66AF],
+ ["E5CA",0x6A00],
+ ["E5CB",0x6A06],
+ ["E5CC",0x6A17],
+ ["E5CD",0x69E5],
+ ["E5CE",0x69F8],
+ ["E5CF",0x6A15],
+ ["E5D0",0x69F1],
+ ["E5D1",0x69E4],
+ ["E5D2",0x6A20],
+ ["E5D3",0x69FF],
+ ["E5D4",0x69EC],
+ ["E5D5",0x69E2],
+ ["E5D6",0x6A1B],
+ ["E5D7",0x6A1D],
+ ["E5D8",0x69FE],
+ ["E5D9",0x6A27],
+ ["E5DA",0x69F2],
+ ["E5DB",0x69EE],
+ ["E5DC",0x6A14],
+ ["E5DD",0x69F7],
+ ["E5DE",0x69E7],
+ ["E5DF",0x6A40],
+ ["E5E0",0x6A08],
+ ["E5E1",0x69E6],
+ ["E5E2",0x69FB],
+ ["E5E3",0x6A0D],
+ ["E5E4",0x69FC],
+ ["E5E5",0x69EB],
+ ["E5E6",0x6A09],
+ ["E5E7",0x6A04],
+ ["E5E8",0x6A18],
+ ["E5E9",0x6A25],
+ ["E5EA",0x6A0F],
+ ["E5EB",0x69F6],
+ ["E5EC",0x6A26],
+ ["E5ED",0x6A07],
+ ["E5EE",0x69F4],
+ ["E5EF",0x6A16],
+ ["E5F0",0x6B51],
+ ["E5F1",0x6BA5],
+ ["E5F2",0x6BA3],
+ ["E5F3",0x6BA2],
+ ["E5F4",0x6BA6],
+ ["E5F5",0x6C01],
+ ["E5F6",0x6C00],
+ ["E5F7",0x6BFF],
+ ["E5F8",0x6C02],
+ ["E5F9",0x6F41],
+ ["E5FA",0x6F26],
+ ["E5FB",0x6F7E],
+ ["E5FC",0x6F87],
+ ["E5FD",0x6FC6],
+ ["E5FE",0x6F92],
+ ["E640",0x6F8D],
+ ["E641",0x6F89],
+ ["E642",0x6F8C],
+ ["E643",0x6F62],
+ ["E644",0x6F4F],
+ ["E645",0x6F85],
+ ["E646",0x6F5A],
+ ["E647",0x6F96],
+ ["E648",0x6F76],
+ ["E649",0x6F6C],
+ ["E64A",0x6F82],
+ ["E64B",0x6F55],
+ ["E64C",0x6F72],
+ ["E64D",0x6F52],
+ ["E64E",0x6F50],
+ ["E64F",0x6F57],
+ ["E650",0x6F94],
+ ["E651",0x6F93],
+ ["E652",0x6F5D],
+ ["E653",0x6F00],
+ ["E654",0x6F61],
+ ["E655",0x6F6B],
+ ["E656",0x6F7D],
+ ["E657",0x6F67],
+ ["E658",0x6F90],
+ ["E659",0x6F53],
+ ["E65A",0x6F8B],
+ ["E65B",0x6F69],
+ ["E65C",0x6F7F],
+ ["E65D",0x6F95],
+ ["E65E",0x6F63],
+ ["E65F",0x6F77],
+ ["E660",0x6F6A],
+ ["E661",0x6F7B],
+ ["E662",0x71B2],
+ ["E663",0x71AF],
+ ["E664",0x719B],
+ ["E665",0x71B0],
+ ["E666",0x71A0],
+ ["E667",0x719A],
+ ["E668",0x71A9],
+ ["E669",0x71B5],
+ ["E66A",0x719D],
+ ["E66B",0x71A5],
+ ["E66C",0x719E],
+ ["E66D",0x71A4],
+ ["E66E",0x71A1],
+ ["E66F",0x71AA],
+ ["E670",0x719C],
+ ["E671",0x71A7],
+ ["E672",0x71B3],
+ ["E673",0x7298],
+ ["E674",0x729A],
+ ["E675",0x7358],
+ ["E676",0x7352],
+ ["E677",0x735E],
+ ["E678",0x735F],
+ ["E679",0x7360],
+ ["E67A",0x735D],
+ ["E67B",0x735B],
+ ["E67C",0x7361],
+ ["E67D",0x735A],
+ ["E67E",0x7359],
+ ["E6A1",0x7362],
+ ["E6A2",0x7487],
+ ["E6A3",0x7489],
+ ["E6A4",0x748A],
+ ["E6A5",0x7486],
+ ["E6A6",0x7481],
+ ["E6A7",0x747D],
+ ["E6A8",0x7485],
+ ["E6A9",0x7488],
+ ["E6AA",0x747C],
+ ["E6AB",0x7479],
+ ["E6AC",0x7508],
+ ["E6AD",0x7507],
+ ["E6AE",0x757E],
+ ["E6AF",0x7625],
+ ["E6B0",0x761E],
+ ["E6B1",0x7619],
+ ["E6B2",0x761D],
+ ["E6B3",0x761C],
+ ["E6B4",0x7623],
+ ["E6B5",0x761A],
+ ["E6B6",0x7628],
+ ["E6B7",0x761B],
+ ["E6B8",0x769C],
+ ["E6B9",0x769D],
+ ["E6BA",0x769E],
+ ["E6BB",0x769B],
+ ["E6BC",0x778D],
+ ["E6BD",0x778F],
+ ["E6BE",0x7789],
+ ["E6BF",0x7788],
+ ["E6C0",0x78CD],
+ ["E6C1",0x78BB],
+ ["E6C2",0x78CF],
+ ["E6C3",0x78CC],
+ ["E6C4",0x78D1],
+ ["E6C5",0x78CE],
+ ["E6C6",0x78D4],
+ ["E6C7",0x78C8],
+ ["E6C8",0x78C3],
+ ["E6C9",0x78C4],
+ ["E6CA",0x78C9],
+ ["E6CB",0x799A],
+ ["E6CC",0x79A1],
+ ["E6CD",0x79A0],
+ ["E6CE",0x799C],
+ ["E6CF",0x79A2],
+ ["E6D0",0x799B],
+ ["E6D1",0x6B76],
+ ["E6D2",0x7A39],
+ ["E6D3",0x7AB2],
+ ["E6D4",0x7AB4],
+ ["E6D5",0x7AB3],
+ ["E6D6",0x7BB7],
+ ["E6D7",0x7BCB],
+ ["E6D8",0x7BBE],
+ ["E6D9",0x7BAC],
+ ["E6DA",0x7BCE],
+ ["E6DB",0x7BAF],
+ ["E6DC",0x7BB9],
+ ["E6DD",0x7BCA],
+ ["E6DE",0x7BB5],
+ ["E6DF",0x7CC5],
+ ["E6E0",0x7CC8],
+ ["E6E1",0x7CCC],
+ ["E6E2",0x7CCB],
+ ["E6E3",0x7DF7],
+ ["E6E4",0x7DDB],
+ ["E6E5",0x7DEA],
+ ["E6E6",0x7DE7],
+ ["E6E7",0x7DD7],
+ ["E6E8",0x7DE1],
+ ["E6E9",0x7E03],
+ ["E6EA",0x7DFA],
+ ["E6EB",0x7DE6],
+ ["E6EC",0x7DF6],
+ ["E6ED",0x7DF1],
+ ["E6EE",0x7DF0],
+ ["E6EF",0x7DEE],
+ ["E6F0",0x7DDF],
+ ["E6F1",0x7F76],
+ ["E6F2",0x7FAC],
+ ["E6F3",0x7FB0],
+ ["E6F4",0x7FAD],
+ ["E6F5",0x7FED],
+ ["E6F6",0x7FEB],
+ ["E6F7",0x7FEA],
+ ["E6F8",0x7FEC],
+ ["E6F9",0x7FE6],
+ ["E6FA",0x7FE8],
+ ["E6FB",0x8064],
+ ["E6FC",0x8067],
+ ["E6FD",0x81A3],
+ ["E6FE",0x819F],
+ ["E740",0x819E],
+ ["E741",0x8195],
+ ["E742",0x81A2],
+ ["E743",0x8199],
+ ["E744",0x8197],
+ ["E745",0x8216],
+ ["E746",0x824F],
+ ["E747",0x8253],
+ ["E748",0x8252],
+ ["E749",0x8250],
+ ["E74A",0x824E],
+ ["E74B",0x8251],
+ ["E74C",0x8524],
+ ["E74D",0x853B],
+ ["E74E",0x850F],
+ ["E74F",0x8500],
+ ["E750",0x8529],
+ ["E751",0x850E],
+ ["E752",0x8509],
+ ["E753",0x850D],
+ ["E754",0x851F],
+ ["E755",0x850A],
+ ["E756",0x8527],
+ ["E757",0x851C],
+ ["E758",0x84FB],
+ ["E759",0x852B],
+ ["E75A",0x84FA],
+ ["E75B",0x8508],
+ ["E75C",0x850C],
+ ["E75D",0x84F4],
+ ["E75E",0x852A],
+ ["E75F",0x84F2],
+ ["E760",0x8515],
+ ["E761",0x84F7],
+ ["E762",0x84EB],
+ ["E763",0x84F3],
+ ["E764",0x84FC],
+ ["E765",0x8512],
+ ["E766",0x84EA],
+ ["E767",0x84E9],
+ ["E768",0x8516],
+ ["E769",0x84FE],
+ ["E76A",0x8528],
+ ["E76B",0x851D],
+ ["E76C",0x852E],
+ ["E76D",0x8502],
+ ["E76E",0x84FD],
+ ["E76F",0x851E],
+ ["E770",0x84F6],
+ ["E771",0x8531],
+ ["E772",0x8526],
+ ["E773",0x84E7],
+ ["E774",0x84E8],
+ ["E775",0x84F0],
+ ["E776",0x84EF],
+ ["E777",0x84F9],
+ ["E778",0x8518],
+ ["E779",0x8520],
+ ["E77A",0x8530],
+ ["E77B",0x850B],
+ ["E77C",0x8519],
+ ["E77D",0x852F],
+ ["E77E",0x8662],
+ ["E7A1",0x8756],
+ ["E7A2",0x8763],
+ ["E7A3",0x8764],
+ ["E7A4",0x8777],
+ ["E7A5",0x87E1],
+ ["E7A6",0x8773],
+ ["E7A7",0x8758],
+ ["E7A8",0x8754],
+ ["E7A9",0x875B],
+ ["E7AA",0x8752],
+ ["E7AB",0x8761],
+ ["E7AC",0x875A],
+ ["E7AD",0x8751],
+ ["E7AE",0x875E],
+ ["E7AF",0x876D],
+ ["E7B0",0x876A],
+ ["E7B1",0x8750],
+ ["E7B2",0x874E],
+ ["E7B3",0x875F],
+ ["E7B4",0x875D],
+ ["E7B5",0x876F],
+ ["E7B6",0x876C],
+ ["E7B7",0x877A],
+ ["E7B8",0x876E],
+ ["E7B9",0x875C],
+ ["E7BA",0x8765],
+ ["E7BB",0x874F],
+ ["E7BC",0x877B],
+ ["E7BD",0x8775],
+ ["E7BE",0x8762],
+ ["E7BF",0x8767],
+ ["E7C0",0x8769],
+ ["E7C1",0x885A],
+ ["E7C2",0x8905],
+ ["E7C3",0x890C],
+ ["E7C4",0x8914],
+ ["E7C5",0x890B],
+ ["E7C6",0x8917],
+ ["E7C7",0x8918],
+ ["E7C8",0x8919],
+ ["E7C9",0x8906],
+ ["E7CA",0x8916],
+ ["E7CB",0x8911],
+ ["E7CC",0x890E],
+ ["E7CD",0x8909],
+ ["E7CE",0x89A2],
+ ["E7CF",0x89A4],
+ ["E7D0",0x89A3],
+ ["E7D1",0x89ED],
+ ["E7D2",0x89F0],
+ ["E7D3",0x89EC],
+ ["E7D4",0x8ACF],
+ ["E7D5",0x8AC6],
+ ["E7D6",0x8AB8],
+ ["E7D7",0x8AD3],
+ ["E7D8",0x8AD1],
+ ["E7D9",0x8AD4],
+ ["E7DA",0x8AD5],
+ ["E7DB",0x8ABB],
+ ["E7DC",0x8AD7],
+ ["E7DD",0x8ABE],
+ ["E7DE",0x8AC0],
+ ["E7DF",0x8AC5],
+ ["E7E0",0x8AD8],
+ ["E7E1",0x8AC3],
+ ["E7E2",0x8ABA],
+ ["E7E3",0x8ABD],
+ ["E7E4",0x8AD9],
+ ["E7E5",0x8C3E],
+ ["E7E6",0x8C4D],
+ ["E7E7",0x8C8F],
+ ["E7E8",0x8CE5],
+ ["E7E9",0x8CDF],
+ ["E7EA",0x8CD9],
+ ["E7EB",0x8CE8],
+ ["E7EC",0x8CDA],
+ ["E7ED",0x8CDD],
+ ["E7EE",0x8CE7],
+ ["E7EF",0x8DA0],
+ ["E7F0",0x8D9C],
+ ["E7F1",0x8DA1],
+ ["E7F2",0x8D9B],
+ ["E7F3",0x8E20],
+ ["E7F4",0x8E23],
+ ["E7F5",0x8E25],
+ ["E7F6",0x8E24],
+ ["E7F7",0x8E2E],
+ ["E7F8",0x8E15],
+ ["E7F9",0x8E1B],
+ ["E7FA",0x8E16],
+ ["E7FB",0x8E11],
+ ["E7FC",0x8E19],
+ ["E7FD",0x8E26],
+ ["E7FE",0x8E27],
+ ["E840",0x8E14],
+ ["E841",0x8E12],
+ ["E842",0x8E18],
+ ["E843",0x8E13],
+ ["E844",0x8E1C],
+ ["E845",0x8E17],
+ ["E846",0x8E1A],
+ ["E847",0x8F2C],
+ ["E848",0x8F24],
+ ["E849",0x8F18],
+ ["E84A",0x8F1A],
+ ["E84B",0x8F20],
+ ["E84C",0x8F23],
+ ["E84D",0x8F16],
+ ["E84E",0x8F17],
+ ["E84F",0x9073],
+ ["E850",0x9070],
+ ["E851",0x906F],
+ ["E852",0x9067],
+ ["E853",0x906B],
+ ["E854",0x912F],
+ ["E855",0x912B],
+ ["E856",0x9129],
+ ["E857",0x912A],
+ ["E858",0x9132],
+ ["E859",0x9126],
+ ["E85A",0x912E],
+ ["E85B",0x9185],
+ ["E85C",0x9186],
+ ["E85D",0x918A],
+ ["E85E",0x9181],
+ ["E85F",0x9182],
+ ["E860",0x9184],
+ ["E861",0x9180],
+ ["E862",0x92D0],
+ ["E863",0x92C3],
+ ["E864",0x92C4],
+ ["E865",0x92C0],
+ ["E866",0x92D9],
+ ["E867",0x92B6],
+ ["E868",0x92CF],
+ ["E869",0x92F1],
+ ["E86A",0x92DF],
+ ["E86B",0x92D8],
+ ["E86C",0x92E9],
+ ["E86D",0x92D7],
+ ["E86E",0x92DD],
+ ["E86F",0x92CC],
+ ["E870",0x92EF],
+ ["E871",0x92C2],
+ ["E872",0x92E8],
+ ["E873",0x92CA],
+ ["E874",0x92C8],
+ ["E875",0x92CE],
+ ["E876",0x92E6],
+ ["E877",0x92CD],
+ ["E878",0x92D5],
+ ["E879",0x92C9],
+ ["E87A",0x92E0],
+ ["E87B",0x92DE],
+ ["E87C",0x92E7],
+ ["E87D",0x92D1],
+ ["E87E",0x92D3],
+ ["E8A1",0x92B5],
+ ["E8A2",0x92E1],
+ ["E8A3",0x92C6],
+ ["E8A4",0x92B4],
+ ["E8A5",0x957C],
+ ["E8A6",0x95AC],
+ ["E8A7",0x95AB],
+ ["E8A8",0x95AE],
+ ["E8A9",0x95B0],
+ ["E8AA",0x96A4],
+ ["E8AB",0x96A2],
+ ["E8AC",0x96D3],
+ ["E8AD",0x9705],
+ ["E8AE",0x9708],
+ ["E8AF",0x9702],
+ ["E8B0",0x975A],
+ ["E8B1",0x978A],
+ ["E8B2",0x978E],
+ ["E8B3",0x9788],
+ ["E8B4",0x97D0],
+ ["E8B5",0x97CF],
+ ["E8B6",0x981E],
+ ["E8B7",0x981D],
+ ["E8B8",0x9826],
+ ["E8B9",0x9829],
+ ["E8BA",0x9828],
+ ["E8BB",0x9820],
+ ["E8BC",0x981B],
+ ["E8BD",0x9827],
+ ["E8BE",0x98B2],
+ ["E8BF",0x9908],
+ ["E8C0",0x98FA],
+ ["E8C1",0x9911],
+ ["E8C2",0x9914],
+ ["E8C3",0x9916],
+ ["E8C4",0x9917],
+ ["E8C5",0x9915],
+ ["E8C6",0x99DC],
+ ["E8C7",0x99CD],
+ ["E8C8",0x99CF],
+ ["E8C9",0x99D3],
+ ["E8CA",0x99D4],
+ ["E8CB",0x99CE],
+ ["E8CC",0x99C9],
+ ["E8CD",0x99D6],
+ ["E8CE",0x99D8],
+ ["E8CF",0x99CB],
+ ["E8D0",0x99D7],
+ ["E8D1",0x99CC],
+ ["E8D2",0x9AB3],
+ ["E8D3",0x9AEC],
+ ["E8D4",0x9AEB],
+ ["E8D5",0x9AF3],
+ ["E8D6",0x9AF2],
+ ["E8D7",0x9AF1],
+ ["E8D8",0x9B46],
+ ["E8D9",0x9B43],
+ ["E8DA",0x9B67],
+ ["E8DB",0x9B74],
+ ["E8DC",0x9B71],
+ ["E8DD",0x9B66],
+ ["E8DE",0x9B76],
+ ["E8DF",0x9B75],
+ ["E8E0",0x9B70],
+ ["E8E1",0x9B68],
+ ["E8E2",0x9B64],
+ ["E8E3",0x9B6C],
+ ["E8E4",0x9CFC],
+ ["E8E5",0x9CFA],
+ ["E8E6",0x9CFD],
+ ["E8E7",0x9CFF],
+ ["E8E8",0x9CF7],
+ ["E8E9",0x9D07],
+ ["E8EA",0x9D00],
+ ["E8EB",0x9CF9],
+ ["E8EC",0x9CFB],
+ ["E8ED",0x9D08],
+ ["E8EE",0x9D05],
+ ["E8EF",0x9D04],
+ ["E8F0",0x9E83],
+ ["E8F1",0x9ED3],
+ ["E8F2",0x9F0F],
+ ["E8F3",0x9F10],
+ ["E8F4",0x511C],
+ ["E8F5",0x5113],
+ ["E8F6",0x5117],
+ ["E8F7",0x511A],
+ ["E8F8",0x5111],
+ ["E8F9",0x51DE],
+ ["E8FA",0x5334],
+ ["E8FB",0x53E1],
+ ["E8FC",0x5670],
+ ["E8FD",0x5660],
+ ["E8FE",0x566E],
+ ["E940",0x5673],
+ ["E941",0x5666],
+ ["E942",0x5663],
+ ["E943",0x566D],
+ ["E944",0x5672],
+ ["E945",0x565E],
+ ["E946",0x5677],
+ ["E947",0x571C],
+ ["E948",0x571B],
+ ["E949",0x58C8],
+ ["E94A",0x58BD],
+ ["E94B",0x58C9],
+ ["E94C",0x58BF],
+ ["E94D",0x58BA],
+ ["E94E",0x58C2],
+ ["E94F",0x58BC],
+ ["E950",0x58C6],
+ ["E951",0x5B17],
+ ["E952",0x5B19],
+ ["E953",0x5B1B],
+ ["E954",0x5B21],
+ ["E955",0x5B14],
+ ["E956",0x5B13],
+ ["E957",0x5B10],
+ ["E958",0x5B16],
+ ["E959",0x5B28],
+ ["E95A",0x5B1A],
+ ["E95B",0x5B20],
+ ["E95C",0x5B1E],
+ ["E95D",0x5BEF],
+ ["E95E",0x5DAC],
+ ["E95F",0x5DB1],
+ ["E960",0x5DA9],
+ ["E961",0x5DA7],
+ ["E962",0x5DB5],
+ ["E963",0x5DB0],
+ ["E964",0x5DAE],
+ ["E965",0x5DAA],
+ ["E966",0x5DA8],
+ ["E967",0x5DB2],
+ ["E968",0x5DAD],
+ ["E969",0x5DAF],
+ ["E96A",0x5DB4],
+ ["E96B",0x5E67],
+ ["E96C",0x5E68],
+ ["E96D",0x5E66],
+ ["E96E",0x5E6F],
+ ["E96F",0x5EE9],
+ ["E970",0x5EE7],
+ ["E971",0x5EE6],
+ ["E972",0x5EE8],
+ ["E973",0x5EE5],
+ ["E974",0x5F4B],
+ ["E975",0x5FBC],
+ ["E976",0x619D],
+ ["E977",0x61A8],
+ ["E978",0x6196],
+ ["E979",0x61C5],
+ ["E97A",0x61B4],
+ ["E97B",0x61C6],
+ ["E97C",0x61C1],
+ ["E97D",0x61CC],
+ ["E97E",0x61BA],
+ ["E9A1",0x61BF],
+ ["E9A2",0x61B8],
+ ["E9A3",0x618C],
+ ["E9A4",0x64D7],
+ ["E9A5",0x64D6],
+ ["E9A6",0x64D0],
+ ["E9A7",0x64CF],
+ ["E9A8",0x64C9],
+ ["E9A9",0x64BD],
+ ["E9AA",0x6489],
+ ["E9AB",0x64C3],
+ ["E9AC",0x64DB],
+ ["E9AD",0x64F3],
+ ["E9AE",0x64D9],
+ ["E9AF",0x6533],
+ ["E9B0",0x657F],
+ ["E9B1",0x657C],
+ ["E9B2",0x65A2],
+ ["E9B3",0x66C8],
+ ["E9B4",0x66BE],
+ ["E9B5",0x66C0],
+ ["E9B6",0x66CA],
+ ["E9B7",0x66CB],
+ ["E9B8",0x66CF],
+ ["E9B9",0x66BD],
+ ["E9BA",0x66BB],
+ ["E9BB",0x66BA],
+ ["E9BC",0x66CC],
+ ["E9BD",0x6723],
+ ["E9BE",0x6A34],
+ ["E9BF",0x6A66],
+ ["E9C0",0x6A49],
+ ["E9C1",0x6A67],
+ ["E9C2",0x6A32],
+ ["E9C3",0x6A68],
+ ["E9C4",0x6A3E],
+ ["E9C5",0x6A5D],
+ ["E9C6",0x6A6D],
+ ["E9C7",0x6A76],
+ ["E9C8",0x6A5B],
+ ["E9C9",0x6A51],
+ ["E9CA",0x6A28],
+ ["E9CB",0x6A5A],
+ ["E9CC",0x6A3B],
+ ["E9CD",0x6A3F],
+ ["E9CE",0x6A41],
+ ["E9CF",0x6A6A],
+ ["E9D0",0x6A64],
+ ["E9D1",0x6A50],
+ ["E9D2",0x6A4F],
+ ["E9D3",0x6A54],
+ ["E9D4",0x6A6F],
+ ["E9D5",0x6A69],
+ ["E9D6",0x6A60],
+ ["E9D7",0x6A3C],
+ ["E9D8",0x6A5E],
+ ["E9D9",0x6A56],
+ ["E9DA",0x6A55],
+ ["E9DB",0x6A4D],
+ ["E9DC",0x6A4E],
+ ["E9DD",0x6A46],
+ ["E9DE",0x6B55],
+ ["E9DF",0x6B54],
+ ["E9E0",0x6B56],
+ ["E9E1",0x6BA7],
+ ["E9E2",0x6BAA],
+ ["E9E3",0x6BAB],
+ ["E9E4",0x6BC8],
+ ["E9E5",0x6BC7],
+ ["E9E6",0x6C04],
+ ["E9E7",0x6C03],
+ ["E9E8",0x6C06],
+ ["E9E9",0x6FAD],
+ ["E9EA",0x6FCB],
+ ["E9EB",0x6FA3],
+ ["E9EC",0x6FC7],
+ ["E9ED",0x6FBC],
+ ["E9EE",0x6FCE],
+ ["E9EF",0x6FC8],
+ ["E9F0",0x6F5E],
+ ["E9F1",0x6FC4],
+ ["E9F2",0x6FBD],
+ ["E9F3",0x6F9E],
+ ["E9F4",0x6FCA],
+ ["E9F5",0x6FA8],
+ ["E9F6",0x7004],
+ ["E9F7",0x6FA5],
+ ["E9F8",0x6FAE],
+ ["E9F9",0x6FBA],
+ ["E9FA",0x6FAC],
+ ["E9FB",0x6FAA],
+ ["E9FC",0x6FCF],
+ ["E9FD",0x6FBF],
+ ["E9FE",0x6FB8],
+ ["EA40",0x6FA2],
+ ["EA41",0x6FC9],
+ ["EA42",0x6FAB],
+ ["EA43",0x6FCD],
+ ["EA44",0x6FAF],
+ ["EA45",0x6FB2],
+ ["EA46",0x6FB0],
+ ["EA47",0x71C5],
+ ["EA48",0x71C2],
+ ["EA49",0x71BF],
+ ["EA4A",0x71B8],
+ ["EA4B",0x71D6],
+ ["EA4C",0x71C0],
+ ["EA4D",0x71C1],
+ ["EA4E",0x71CB],
+ ["EA4F",0x71D4],
+ ["EA50",0x71CA],
+ ["EA51",0x71C7],
+ ["EA52",0x71CF],
+ ["EA53",0x71BD],
+ ["EA54",0x71D8],
+ ["EA55",0x71BC],
+ ["EA56",0x71C6],
+ ["EA57",0x71DA],
+ ["EA58",0x71DB],
+ ["EA59",0x729D],
+ ["EA5A",0x729E],
+ ["EA5B",0x7369],
+ ["EA5C",0x7366],
+ ["EA5D",0x7367],
+ ["EA5E",0x736C],
+ ["EA5F",0x7365],
+ ["EA60",0x736B],
+ ["EA61",0x736A],
+ ["EA62",0x747F],
+ ["EA63",0x749A],
+ ["EA64",0x74A0],
+ ["EA65",0x7494],
+ ["EA66",0x7492],
+ ["EA67",0x7495],
+ ["EA68",0x74A1],
+ ["EA69",0x750B],
+ ["EA6A",0x7580],
+ ["EA6B",0x762F],
+ ["EA6C",0x762D],
+ ["EA6D",0x7631],
+ ["EA6E",0x763D],
+ ["EA6F",0x7633],
+ ["EA70",0x763C],
+ ["EA71",0x7635],
+ ["EA72",0x7632],
+ ["EA73",0x7630],
+ ["EA74",0x76BB],
+ ["EA75",0x76E6],
+ ["EA76",0x779A],
+ ["EA77",0x779D],
+ ["EA78",0x77A1],
+ ["EA79",0x779C],
+ ["EA7A",0x779B],
+ ["EA7B",0x77A2],
+ ["EA7C",0x77A3],
+ ["EA7D",0x7795],
+ ["EA7E",0x7799],
+ ["EAA1",0x7797],
+ ["EAA2",0x78DD],
+ ["EAA3",0x78E9],
+ ["EAA4",0x78E5],
+ ["EAA5",0x78EA],
+ ["EAA6",0x78DE],
+ ["EAA7",0x78E3],
+ ["EAA8",0x78DB],
+ ["EAA9",0x78E1],
+ ["EAAA",0x78E2],
+ ["EAAB",0x78ED],
+ ["EAAC",0x78DF],
+ ["EAAD",0x78E0],
+ ["EAAE",0x79A4],
+ ["EAAF",0x7A44],
+ ["EAB0",0x7A48],
+ ["EAB1",0x7A47],
+ ["EAB2",0x7AB6],
+ ["EAB3",0x7AB8],
+ ["EAB4",0x7AB5],
+ ["EAB5",0x7AB1],
+ ["EAB6",0x7AB7],
+ ["EAB7",0x7BDE],
+ ["EAB8",0x7BE3],
+ ["EAB9",0x7BE7],
+ ["EABA",0x7BDD],
+ ["EABB",0x7BD5],
+ ["EABC",0x7BE5],
+ ["EABD",0x7BDA],
+ ["EABE",0x7BE8],
+ ["EABF",0x7BF9],
+ ["EAC0",0x7BD4],
+ ["EAC1",0x7BEA],
+ ["EAC2",0x7BE2],
+ ["EAC3",0x7BDC],
+ ["EAC4",0x7BEB],
+ ["EAC5",0x7BD8],
+ ["EAC6",0x7BDF],
+ ["EAC7",0x7CD2],
+ ["EAC8",0x7CD4],
+ ["EAC9",0x7CD7],
+ ["EACA",0x7CD0],
+ ["EACB",0x7CD1],
+ ["EACC",0x7E12],
+ ["EACD",0x7E21],
+ ["EACE",0x7E17],
+ ["EACF",0x7E0C],
+ ["EAD0",0x7E1F],
+ ["EAD1",0x7E20],
+ ["EAD2",0x7E13],
+ ["EAD3",0x7E0E],
+ ["EAD4",0x7E1C],
+ ["EAD5",0x7E15],
+ ["EAD6",0x7E1A],
+ ["EAD7",0x7E22],
+ ["EAD8",0x7E0B],
+ ["EAD9",0x7E0F],
+ ["EADA",0x7E16],
+ ["EADB",0x7E0D],
+ ["EADC",0x7E14],
+ ["EADD",0x7E25],
+ ["EADE",0x7E24],
+ ["EADF",0x7F43],
+ ["EAE0",0x7F7B],
+ ["EAE1",0x7F7C],
+ ["EAE2",0x7F7A],
+ ["EAE3",0x7FB1],
+ ["EAE4",0x7FEF],
+ ["EAE5",0x802A],
+ ["EAE6",0x8029],
+ ["EAE7",0x806C],
+ ["EAE8",0x81B1],
+ ["EAE9",0x81A6],
+ ["EAEA",0x81AE],
+ ["EAEB",0x81B9],
+ ["EAEC",0x81B5],
+ ["EAED",0x81AB],
+ ["EAEE",0x81B0],
+ ["EAEF",0x81AC],
+ ["EAF0",0x81B4],
+ ["EAF1",0x81B2],
+ ["EAF2",0x81B7],
+ ["EAF3",0x81A7],
+ ["EAF4",0x81F2],
+ ["EAF5",0x8255],
+ ["EAF6",0x8256],
+ ["EAF7",0x8257],
+ ["EAF8",0x8556],
+ ["EAF9",0x8545],
+ ["EAFA",0x856B],
+ ["EAFB",0x854D],
+ ["EAFC",0x8553],
+ ["EAFD",0x8561],
+ ["EAFE",0x8558],
+ ["EB40",0x8540],
+ ["EB41",0x8546],
+ ["EB42",0x8564],
+ ["EB43",0x8541],
+ ["EB44",0x8562],
+ ["EB45",0x8544],
+ ["EB46",0x8551],
+ ["EB47",0x8547],
+ ["EB48",0x8563],
+ ["EB49",0x853E],
+ ["EB4A",0x855B],
+ ["EB4B",0x8571],
+ ["EB4C",0x854E],
+ ["EB4D",0x856E],
+ ["EB4E",0x8575],
+ ["EB4F",0x8555],
+ ["EB50",0x8567],
+ ["EB51",0x8560],
+ ["EB52",0x858C],
+ ["EB53",0x8566],
+ ["EB54",0x855D],
+ ["EB55",0x8554],
+ ["EB56",0x8565],
+ ["EB57",0x856C],
+ ["EB58",0x8663],
+ ["EB59",0x8665],
+ ["EB5A",0x8664],
+ ["EB5B",0x879B],
+ ["EB5C",0x878F],
+ ["EB5D",0x8797],
+ ["EB5E",0x8793],
+ ["EB5F",0x8792],
+ ["EB60",0x8788],
+ ["EB61",0x8781],
+ ["EB62",0x8796],
+ ["EB63",0x8798],
+ ["EB64",0x8779],
+ ["EB65",0x8787],
+ ["EB66",0x87A3],
+ ["EB67",0x8785],
+ ["EB68",0x8790],
+ ["EB69",0x8791],
+ ["EB6A",0x879D],
+ ["EB6B",0x8784],
+ ["EB6C",0x8794],
+ ["EB6D",0x879C],
+ ["EB6E",0x879A],
+ ["EB6F",0x8789],
+ ["EB70",0x891E],
+ ["EB71",0x8926],
+ ["EB72",0x8930],
+ ["EB73",0x892D],
+ ["EB74",0x892E],
+ ["EB75",0x8927],
+ ["EB76",0x8931],
+ ["EB77",0x8922],
+ ["EB78",0x8929],
+ ["EB79",0x8923],
+ ["EB7A",0x892F],
+ ["EB7B",0x892C],
+ ["EB7C",0x891F],
+ ["EB7D",0x89F1],
+ ["EB7E",0x8AE0],
+ ["EBA1",0x8AE2],
+ ["EBA2",0x8AF2],
+ ["EBA3",0x8AF4],
+ ["EBA4",0x8AF5],
+ ["EBA5",0x8ADD],
+ ["EBA6",0x8B14],
+ ["EBA7",0x8AE4],
+ ["EBA8",0x8ADF],
+ ["EBA9",0x8AF0],
+ ["EBAA",0x8AC8],
+ ["EBAB",0x8ADE],
+ ["EBAC",0x8AE1],
+ ["EBAD",0x8AE8],
+ ["EBAE",0x8AFF],
+ ["EBAF",0x8AEF],
+ ["EBB0",0x8AFB],
+ ["EBB1",0x8C91],
+ ["EBB2",0x8C92],
+ ["EBB3",0x8C90],
+ ["EBB4",0x8CF5],
+ ["EBB5",0x8CEE],
+ ["EBB6",0x8CF1],
+ ["EBB7",0x8CF0],
+ ["EBB8",0x8CF3],
+ ["EBB9",0x8D6C],
+ ["EBBA",0x8D6E],
+ ["EBBB",0x8DA5],
+ ["EBBC",0x8DA7],
+ ["EBBD",0x8E33],
+ ["EBBE",0x8E3E],
+ ["EBBF",0x8E38],
+ ["EBC0",0x8E40],
+ ["EBC1",0x8E45],
+ ["EBC2",0x8E36],
+ ["EBC3",0x8E3C],
+ ["EBC4",0x8E3D],
+ ["EBC5",0x8E41],
+ ["EBC6",0x8E30],
+ ["EBC7",0x8E3F],
+ ["EBC8",0x8EBD],
+ ["EBC9",0x8F36],
+ ["EBCA",0x8F2E],
+ ["EBCB",0x8F35],
+ ["EBCC",0x8F32],
+ ["EBCD",0x8F39],
+ ["EBCE",0x8F37],
+ ["EBCF",0x8F34],
+ ["EBD0",0x9076],
+ ["EBD1",0x9079],
+ ["EBD2",0x907B],
+ ["EBD3",0x9086],
+ ["EBD4",0x90FA],
+ ["EBD5",0x9133],
+ ["EBD6",0x9135],
+ ["EBD7",0x9136],
+ ["EBD8",0x9193],
+ ["EBD9",0x9190],
+ ["EBDA",0x9191],
+ ["EBDB",0x918D],
+ ["EBDC",0x918F],
+ ["EBDD",0x9327],
+ ["EBDE",0x931E],
+ ["EBDF",0x9308],
+ ["EBE0",0x931F],
+ ["EBE1",0x9306],
+ ["EBE2",0x930F],
+ ["EBE3",0x937A],
+ ["EBE4",0x9338],
+ ["EBE5",0x933C],
+ ["EBE6",0x931B],
+ ["EBE7",0x9323],
+ ["EBE8",0x9312],
+ ["EBE9",0x9301],
+ ["EBEA",0x9346],
+ ["EBEB",0x932D],
+ ["EBEC",0x930E],
+ ["EBED",0x930D],
+ ["EBEE",0x92CB],
+ ["EBEF",0x931D],
+ ["EBF0",0x92FA],
+ ["EBF1",0x9325],
+ ["EBF2",0x9313],
+ ["EBF3",0x92F9],
+ ["EBF4",0x92F7],
+ ["EBF5",0x9334],
+ ["EBF6",0x9302],
+ ["EBF7",0x9324],
+ ["EBF8",0x92FF],
+ ["EBF9",0x9329],
+ ["EBFA",0x9339],
+ ["EBFB",0x9335],
+ ["EBFC",0x932A],
+ ["EBFD",0x9314],
+ ["EBFE",0x930C],
+ ["EC40",0x930B],
+ ["EC41",0x92FE],
+ ["EC42",0x9309],
+ ["EC43",0x9300],
+ ["EC44",0x92FB],
+ ["EC45",0x9316],
+ ["EC46",0x95BC],
+ ["EC47",0x95CD],
+ ["EC48",0x95BE],
+ ["EC49",0x95B9],
+ ["EC4A",0x95BA],
+ ["EC4B",0x95B6],
+ ["EC4C",0x95BF],
+ ["EC4D",0x95B5],
+ ["EC4E",0x95BD],
+ ["EC4F",0x96A9],
+ ["EC50",0x96D4],
+ ["EC51",0x970B],
+ ["EC52",0x9712],
+ ["EC53",0x9710],
+ ["EC54",0x9799],
+ ["EC55",0x9797],
+ ["EC56",0x9794],
+ ["EC57",0x97F0],
+ ["EC58",0x97F8],
+ ["EC59",0x9835],
+ ["EC5A",0x982F],
+ ["EC5B",0x9832],
+ ["EC5C",0x9924],
+ ["EC5D",0x991F],
+ ["EC5E",0x9927],
+ ["EC5F",0x9929],
+ ["EC60",0x999E],
+ ["EC61",0x99EE],
+ ["EC62",0x99EC],
+ ["EC63",0x99E5],
+ ["EC64",0x99E4],
+ ["EC65",0x99F0],
+ ["EC66",0x99E3],
+ ["EC67",0x99EA],
+ ["EC68",0x99E9],
+ ["EC69",0x99E7],
+ ["EC6A",0x9AB9],
+ ["EC6B",0x9ABF],
+ ["EC6C",0x9AB4],
+ ["EC6D",0x9ABB],
+ ["EC6E",0x9AF6],
+ ["EC6F",0x9AFA],
+ ["EC70",0x9AF9],
+ ["EC71",0x9AF7],
+ ["EC72",0x9B33],
+ ["EC73",0x9B80],
+ ["EC74",0x9B85],
+ ["EC75",0x9B87],
+ ["EC76",0x9B7C],
+ ["EC77",0x9B7E],
+ ["EC78",0x9B7B],
+ ["EC79",0x9B82],
+ ["EC7A",0x9B93],
+ ["EC7B",0x9B92],
+ ["EC7C",0x9B90],
+ ["EC7D",0x9B7A],
+ ["EC7E",0x9B95],
+ ["ECA1",0x9B7D],
+ ["ECA2",0x9B88],
+ ["ECA3",0x9D25],
+ ["ECA4",0x9D17],
+ ["ECA5",0x9D20],
+ ["ECA6",0x9D1E],
+ ["ECA7",0x9D14],
+ ["ECA8",0x9D29],
+ ["ECA9",0x9D1D],
+ ["ECAA",0x9D18],
+ ["ECAB",0x9D22],
+ ["ECAC",0x9D10],
+ ["ECAD",0x9D19],
+ ["ECAE",0x9D1F],
+ ["ECAF",0x9E88],
+ ["ECB0",0x9E86],
+ ["ECB1",0x9E87],
+ ["ECB2",0x9EAE],
+ ["ECB3",0x9EAD],
+ ["ECB4",0x9ED5],
+ ["ECB5",0x9ED6],
+ ["ECB6",0x9EFA],
+ ["ECB7",0x9F12],
+ ["ECB8",0x9F3D],
+ ["ECB9",0x5126],
+ ["ECBA",0x5125],
+ ["ECBB",0x5122],
+ ["ECBC",0x5124],
+ ["ECBD",0x5120],
+ ["ECBE",0x5129],
+ ["ECBF",0x52F4],
+ ["ECC0",0x5693],
+ ["ECC1",0x568C],
+ ["ECC2",0x568D],
+ ["ECC3",0x5686],
+ ["ECC4",0x5684],
+ ["ECC5",0x5683],
+ ["ECC6",0x567E],
+ ["ECC7",0x5682],
+ ["ECC8",0x567F],
+ ["ECC9",0x5681],
+ ["ECCA",0x58D6],
+ ["ECCB",0x58D4],
+ ["ECCC",0x58CF],
+ ["ECCD",0x58D2],
+ ["ECCE",0x5B2D],
+ ["ECCF",0x5B25],
+ ["ECD0",0x5B32],
+ ["ECD1",0x5B23],
+ ["ECD2",0x5B2C],
+ ["ECD3",0x5B27],
+ ["ECD4",0x5B26],
+ ["ECD5",0x5B2F],
+ ["ECD6",0x5B2E],
+ ["ECD7",0x5B7B],
+ ["ECD8",0x5BF1],
+ ["ECD9",0x5BF2],
+ ["ECDA",0x5DB7],
+ ["ECDB",0x5E6C],
+ ["ECDC",0x5E6A],
+ ["ECDD",0x5FBE],
+ ["ECDE",0x5FBB],
+ ["ECDF",0x61C3],
+ ["ECE0",0x61B5],
+ ["ECE1",0x61BC],
+ ["ECE2",0x61E7],
+ ["ECE3",0x61E0],
+ ["ECE4",0x61E5],
+ ["ECE5",0x61E4],
+ ["ECE6",0x61E8],
+ ["ECE7",0x61DE],
+ ["ECE8",0x64EF],
+ ["ECE9",0x64E9],
+ ["ECEA",0x64E3],
+ ["ECEB",0x64EB],
+ ["ECEC",0x64E4],
+ ["ECED",0x64E8],
+ ["ECEE",0x6581],
+ ["ECEF",0x6580],
+ ["ECF0",0x65B6],
+ ["ECF1",0x65DA],
+ ["ECF2",0x66D2],
+ ["ECF3",0x6A8D],
+ ["ECF4",0x6A96],
+ ["ECF5",0x6A81],
+ ["ECF6",0x6AA5],
+ ["ECF7",0x6A89],
+ ["ECF8",0x6A9F],
+ ["ECF9",0x6A9B],
+ ["ECFA",0x6AA1],
+ ["ECFB",0x6A9E],
+ ["ECFC",0x6A87],
+ ["ECFD",0x6A93],
+ ["ECFE",0x6A8E],
+ ["ED40",0x6A95],
+ ["ED41",0x6A83],
+ ["ED42",0x6AA8],
+ ["ED43",0x6AA4],
+ ["ED44",0x6A91],
+ ["ED45",0x6A7F],
+ ["ED46",0x6AA6],
+ ["ED47",0x6A9A],
+ ["ED48",0x6A85],
+ ["ED49",0x6A8C],
+ ["ED4A",0x6A92],
+ ["ED4B",0x6B5B],
+ ["ED4C",0x6BAD],
+ ["ED4D",0x6C09],
+ ["ED4E",0x6FCC],
+ ["ED4F",0x6FA9],
+ ["ED50",0x6FF4],
+ ["ED51",0x6FD4],
+ ["ED52",0x6FE3],
+ ["ED53",0x6FDC],
+ ["ED54",0x6FED],
+ ["ED55",0x6FE7],
+ ["ED56",0x6FE6],
+ ["ED57",0x6FDE],
+ ["ED58",0x6FF2],
+ ["ED59",0x6FDD],
+ ["ED5A",0x6FE2],
+ ["ED5B",0x6FE8],
+ ["ED5C",0x71E1],
+ ["ED5D",0x71F1],
+ ["ED5E",0x71E8],
+ ["ED5F",0x71F2],
+ ["ED60",0x71E4],
+ ["ED61",0x71F0],
+ ["ED62",0x71E2],
+ ["ED63",0x7373],
+ ["ED64",0x736E],
+ ["ED65",0x736F],
+ ["ED66",0x7497],
+ ["ED67",0x74B2],
+ ["ED68",0x74AB],
+ ["ED69",0x7490],
+ ["ED6A",0x74AA],
+ ["ED6B",0x74AD],
+ ["ED6C",0x74B1],
+ ["ED6D",0x74A5],
+ ["ED6E",0x74AF],
+ ["ED6F",0x7510],
+ ["ED70",0x7511],
+ ["ED71",0x7512],
+ ["ED72",0x750F],
+ ["ED73",0x7584],
+ ["ED74",0x7643],
+ ["ED75",0x7648],
+ ["ED76",0x7649],
+ ["ED77",0x7647],
+ ["ED78",0x76A4],
+ ["ED79",0x76E9],
+ ["ED7A",0x77B5],
+ ["ED7B",0x77AB],
+ ["ED7C",0x77B2],
+ ["ED7D",0x77B7],
+ ["ED7E",0x77B6],
+ ["EDA1",0x77B4],
+ ["EDA2",0x77B1],
+ ["EDA3",0x77A8],
+ ["EDA4",0x77F0],
+ ["EDA5",0x78F3],
+ ["EDA6",0x78FD],
+ ["EDA7",0x7902],
+ ["EDA8",0x78FB],
+ ["EDA9",0x78FC],
+ ["EDAA",0x78F2],
+ ["EDAB",0x7905],
+ ["EDAC",0x78F9],
+ ["EDAD",0x78FE],
+ ["EDAE",0x7904],
+ ["EDAF",0x79AB],
+ ["EDB0",0x79A8],
+ ["EDB1",0x7A5C],
+ ["EDB2",0x7A5B],
+ ["EDB3",0x7A56],
+ ["EDB4",0x7A58],
+ ["EDB5",0x7A54],
+ ["EDB6",0x7A5A],
+ ["EDB7",0x7ABE],
+ ["EDB8",0x7AC0],
+ ["EDB9",0x7AC1],
+ ["EDBA",0x7C05],
+ ["EDBB",0x7C0F],
+ ["EDBC",0x7BF2],
+ ["EDBD",0x7C00],
+ ["EDBE",0x7BFF],
+ ["EDBF",0x7BFB],
+ ["EDC0",0x7C0E],
+ ["EDC1",0x7BF4],
+ ["EDC2",0x7C0B],
+ ["EDC3",0x7BF3],
+ ["EDC4",0x7C02],
+ ["EDC5",0x7C09],
+ ["EDC6",0x7C03],
+ ["EDC7",0x7C01],
+ ["EDC8",0x7BF8],
+ ["EDC9",0x7BFD],
+ ["EDCA",0x7C06],
+ ["EDCB",0x7BF0],
+ ["EDCC",0x7BF1],
+ ["EDCD",0x7C10],
+ ["EDCE",0x7C0A],
+ ["EDCF",0x7CE8],
+ ["EDD0",0x7E2D],
+ ["EDD1",0x7E3C],
+ ["EDD2",0x7E42],
+ ["EDD3",0x7E33],
+ ["EDD4",0x9848],
+ ["EDD5",0x7E38],
+ ["EDD6",0x7E2A],
+ ["EDD7",0x7E49],
+ ["EDD8",0x7E40],
+ ["EDD9",0x7E47],
+ ["EDDA",0x7E29],
+ ["EDDB",0x7E4C],
+ ["EDDC",0x7E30],
+ ["EDDD",0x7E3B],
+ ["EDDE",0x7E36],
+ ["EDDF",0x7E44],
+ ["EDE0",0x7E3A],
+ ["EDE1",0x7F45],
+ ["EDE2",0x7F7F],
+ ["EDE3",0x7F7E],
+ ["EDE4",0x7F7D],
+ ["EDE5",0x7FF4],
+ ["EDE6",0x7FF2],
+ ["EDE7",0x802C],
+ ["EDE8",0x81BB],
+ ["EDE9",0x81C4],
+ ["EDEA",0x81CC],
+ ["EDEB",0x81CA],
+ ["EDEC",0x81C5],
+ ["EDED",0x81C7],
+ ["EDEE",0x81BC],
+ ["EDEF",0x81E9],
+ ["EDF0",0x825B],
+ ["EDF1",0x825A],
+ ["EDF2",0x825C],
+ ["EDF3",0x8583],
+ ["EDF4",0x8580],
+ ["EDF5",0x858F],
+ ["EDF6",0x85A7],
+ ["EDF7",0x8595],
+ ["EDF8",0x85A0],
+ ["EDF9",0x858B],
+ ["EDFA",0x85A3],
+ ["EDFB",0x857B],
+ ["EDFC",0x85A4],
+ ["EDFD",0x859A],
+ ["EDFE",0x859E],
+ ["EE40",0x8577],
+ ["EE41",0x857C],
+ ["EE42",0x8589],
+ ["EE43",0x85A1],
+ ["EE44",0x857A],
+ ["EE45",0x8578],
+ ["EE46",0x8557],
+ ["EE47",0x858E],
+ ["EE48",0x8596],
+ ["EE49",0x8586],
+ ["EE4A",0x858D],
+ ["EE4B",0x8599],
+ ["EE4C",0x859D],
+ ["EE4D",0x8581],
+ ["EE4E",0x85A2],
+ ["EE4F",0x8582],
+ ["EE50",0x8588],
+ ["EE51",0x8585],
+ ["EE52",0x8579],
+ ["EE53",0x8576],
+ ["EE54",0x8598],
+ ["EE55",0x8590],
+ ["EE56",0x859F],
+ ["EE57",0x8668],
+ ["EE58",0x87BE],
+ ["EE59",0x87AA],
+ ["EE5A",0x87AD],
+ ["EE5B",0x87C5],
+ ["EE5C",0x87B0],
+ ["EE5D",0x87AC],
+ ["EE5E",0x87B9],
+ ["EE5F",0x87B5],
+ ["EE60",0x87BC],
+ ["EE61",0x87AE],
+ ["EE62",0x87C9],
+ ["EE63",0x87C3],
+ ["EE64",0x87C2],
+ ["EE65",0x87CC],
+ ["EE66",0x87B7],
+ ["EE67",0x87AF],
+ ["EE68",0x87C4],
+ ["EE69",0x87CA],
+ ["EE6A",0x87B4],
+ ["EE6B",0x87B6],
+ ["EE6C",0x87BF],
+ ["EE6D",0x87B8],
+ ["EE6E",0x87BD],
+ ["EE6F",0x87DE],
+ ["EE70",0x87B2],
+ ["EE71",0x8935],
+ ["EE72",0x8933],
+ ["EE73",0x893C],
+ ["EE74",0x893E],
+ ["EE75",0x8941],
+ ["EE76",0x8952],
+ ["EE77",0x8937],
+ ["EE78",0x8942],
+ ["EE79",0x89AD],
+ ["EE7A",0x89AF],
+ ["EE7B",0x89AE],
+ ["EE7C",0x89F2],
+ ["EE7D",0x89F3],
+ ["EE7E",0x8B1E],
+ ["EEA1",0x8B18],
+ ["EEA2",0x8B16],
+ ["EEA3",0x8B11],
+ ["EEA4",0x8B05],
+ ["EEA5",0x8B0B],
+ ["EEA6",0x8B22],
+ ["EEA7",0x8B0F],
+ ["EEA8",0x8B12],
+ ["EEA9",0x8B15],
+ ["EEAA",0x8B07],
+ ["EEAB",0x8B0D],
+ ["EEAC",0x8B08],
+ ["EEAD",0x8B06],
+ ["EEAE",0x8B1C],
+ ["EEAF",0x8B13],
+ ["EEB0",0x8B1A],
+ ["EEB1",0x8C4F],
+ ["EEB2",0x8C70],
+ ["EEB3",0x8C72],
+ ["EEB4",0x8C71],
+ ["EEB5",0x8C6F],
+ ["EEB6",0x8C95],
+ ["EEB7",0x8C94],
+ ["EEB8",0x8CF9],
+ ["EEB9",0x8D6F],
+ ["EEBA",0x8E4E],
+ ["EEBB",0x8E4D],
+ ["EEBC",0x8E53],
+ ["EEBD",0x8E50],
+ ["EEBE",0x8E4C],
+ ["EEBF",0x8E47],
+ ["EEC0",0x8F43],
+ ["EEC1",0x8F40],
+ ["EEC2",0x9085],
+ ["EEC3",0x907E],
+ ["EEC4",0x9138],
+ ["EEC5",0x919A],
+ ["EEC6",0x91A2],
+ ["EEC7",0x919B],
+ ["EEC8",0x9199],
+ ["EEC9",0x919F],
+ ["EECA",0x91A1],
+ ["EECB",0x919D],
+ ["EECC",0x91A0],
+ ["EECD",0x93A1],
+ ["EECE",0x9383],
+ ["EECF",0x93AF],
+ ["EED0",0x9364],
+ ["EED1",0x9356],
+ ["EED2",0x9347],
+ ["EED3",0x937C],
+ ["EED4",0x9358],
+ ["EED5",0x935C],
+ ["EED6",0x9376],
+ ["EED7",0x9349],
+ ["EED8",0x9350],
+ ["EED9",0x9351],
+ ["EEDA",0x9360],
+ ["EEDB",0x936D],
+ ["EEDC",0x938F],
+ ["EEDD",0x934C],
+ ["EEDE",0x936A],
+ ["EEDF",0x9379],
+ ["EEE0",0x9357],
+ ["EEE1",0x9355],
+ ["EEE2",0x9352],
+ ["EEE3",0x934F],
+ ["EEE4",0x9371],
+ ["EEE5",0x9377],
+ ["EEE6",0x937B],
+ ["EEE7",0x9361],
+ ["EEE8",0x935E],
+ ["EEE9",0x9363],
+ ["EEEA",0x9367],
+ ["EEEB",0x9380],
+ ["EEEC",0x934E],
+ ["EEED",0x9359],
+ ["EEEE",0x95C7],
+ ["EEEF",0x95C0],
+ ["EEF0",0x95C9],
+ ["EEF1",0x95C3],
+ ["EEF2",0x95C5],
+ ["EEF3",0x95B7],
+ ["EEF4",0x96AE],
+ ["EEF5",0x96B0],
+ ["EEF6",0x96AC],
+ ["EEF7",0x9720],
+ ["EEF8",0x971F],
+ ["EEF9",0x9718],
+ ["EEFA",0x971D],
+ ["EEFB",0x9719],
+ ["EEFC",0x979A],
+ ["EEFD",0x97A1],
+ ["EEFE",0x979C],
+ ["EF40",0x979E],
+ ["EF41",0x979D],
+ ["EF42",0x97D5],
+ ["EF43",0x97D4],
+ ["EF44",0x97F1],
+ ["EF45",0x9841],
+ ["EF46",0x9844],
+ ["EF47",0x984A],
+ ["EF48",0x9849],
+ ["EF49",0x9845],
+ ["EF4A",0x9843],
+ ["EF4B",0x9925],
+ ["EF4C",0x992B],
+ ["EF4D",0x992C],
+ ["EF4E",0x992A],
+ ["EF4F",0x9933],
+ ["EF50",0x9932],
+ ["EF51",0x992F],
+ ["EF52",0x992D],
+ ["EF53",0x9931],
+ ["EF54",0x9930],
+ ["EF55",0x9998],
+ ["EF56",0x99A3],
+ ["EF57",0x99A1],
+ ["EF58",0x9A02],
+ ["EF59",0x99FA],
+ ["EF5A",0x99F4],
+ ["EF5B",0x99F7],
+ ["EF5C",0x99F9],
+ ["EF5D",0x99F8],
+ ["EF5E",0x99F6],
+ ["EF5F",0x99FB],
+ ["EF60",0x99FD],
+ ["EF61",0x99FE],
+ ["EF62",0x99FC],
+ ["EF63",0x9A03],
+ ["EF64",0x9ABE],
+ ["EF65",0x9AFE],
+ ["EF66",0x9AFD],
+ ["EF67",0x9B01],
+ ["EF68",0x9AFC],
+ ["EF69",0x9B48],
+ ["EF6A",0x9B9A],
+ ["EF6B",0x9BA8],
+ ["EF6C",0x9B9E],
+ ["EF6D",0x9B9B],
+ ["EF6E",0x9BA6],
+ ["EF6F",0x9BA1],
+ ["EF70",0x9BA5],
+ ["EF71",0x9BA4],
+ ["EF72",0x9B86],
+ ["EF73",0x9BA2],
+ ["EF74",0x9BA0],
+ ["EF75",0x9BAF],
+ ["EF76",0x9D33],
+ ["EF77",0x9D41],
+ ["EF78",0x9D67],
+ ["EF79",0x9D36],
+ ["EF7A",0x9D2E],
+ ["EF7B",0x9D2F],
+ ["EF7C",0x9D31],
+ ["EF7D",0x9D38],
+ ["EF7E",0x9D30],
+ ["EFA1",0x9D45],
+ ["EFA2",0x9D42],
+ ["EFA3",0x9D43],
+ ["EFA4",0x9D3E],
+ ["EFA5",0x9D37],
+ ["EFA6",0x9D40],
+ ["EFA7",0x9D3D],
+ ["EFA8",0x7FF5],
+ ["EFA9",0x9D2D],
+ ["EFAA",0x9E8A],
+ ["EFAB",0x9E89],
+ ["EFAC",0x9E8D],
+ ["EFAD",0x9EB0],
+ ["EFAE",0x9EC8],
+ ["EFAF",0x9EDA],
+ ["EFB0",0x9EFB],
+ ["EFB1",0x9EFF],
+ ["EFB2",0x9F24],
+ ["EFB3",0x9F23],
+ ["EFB4",0x9F22],
+ ["EFB5",0x9F54],
+ ["EFB6",0x9FA0],
+ ["EFB7",0x5131],
+ ["EFB8",0x512D],
+ ["EFB9",0x512E],
+ ["EFBA",0x5698],
+ ["EFBB",0x569C],
+ ["EFBC",0x5697],
+ ["EFBD",0x569A],
+ ["EFBE",0x569D],
+ ["EFBF",0x5699],
+ ["EFC0",0x5970],
+ ["EFC1",0x5B3C],
+ ["EFC2",0x5C69],
+ ["EFC3",0x5C6A],
+ ["EFC4",0x5DC0],
+ ["EFC5",0x5E6D],
+ ["EFC6",0x5E6E],
+ ["EFC7",0x61D8],
+ ["EFC8",0x61DF],
+ ["EFC9",0x61ED],
+ ["EFCA",0x61EE],
+ ["EFCB",0x61F1],
+ ["EFCC",0x61EA],
+ ["EFCD",0x61F0],
+ ["EFCE",0x61EB],
+ ["EFCF",0x61D6],
+ ["EFD0",0x61E9],
+ ["EFD1",0x64FF],
+ ["EFD2",0x6504],
+ ["EFD3",0x64FD],
+ ["EFD4",0x64F8],
+ ["EFD5",0x6501],
+ ["EFD6",0x6503],
+ ["EFD7",0x64FC],
+ ["EFD8",0x6594],
+ ["EFD9",0x65DB],
+ ["EFDA",0x66DA],
+ ["EFDB",0x66DB],
+ ["EFDC",0x66D8],
+ ["EFDD",0x6AC5],
+ ["EFDE",0x6AB9],
+ ["EFDF",0x6ABD],
+ ["EFE0",0x6AE1],
+ ["EFE1",0x6AC6],
+ ["EFE2",0x6ABA],
+ ["EFE3",0x6AB6],
+ ["EFE4",0x6AB7],
+ ["EFE5",0x6AC7],
+ ["EFE6",0x6AB4],
+ ["EFE7",0x6AAD],
+ ["EFE8",0x6B5E],
+ ["EFE9",0x6BC9],
+ ["EFEA",0x6C0B],
+ ["EFEB",0x7007],
+ ["EFEC",0x700C],
+ ["EFED",0x700D],
+ ["EFEE",0x7001],
+ ["EFEF",0x7005],
+ ["EFF0",0x7014],
+ ["EFF1",0x700E],
+ ["EFF2",0x6FFF],
+ ["EFF3",0x7000],
+ ["EFF4",0x6FFB],
+ ["EFF5",0x7026],
+ ["EFF6",0x6FFC],
+ ["EFF7",0x6FF7],
+ ["EFF8",0x700A],
+ ["EFF9",0x7201],
+ ["EFFA",0x71FF],
+ ["EFFB",0x71F9],
+ ["EFFC",0x7203],
+ ["EFFD",0x71FD],
+ ["EFFE",0x7376],
+ ["F040",0x74B8],
+ ["F041",0x74C0],
+ ["F042",0x74B5],
+ ["F043",0x74C1],
+ ["F044",0x74BE],
+ ["F045",0x74B6],
+ ["F046",0x74BB],
+ ["F047",0x74C2],
+ ["F048",0x7514],
+ ["F049",0x7513],
+ ["F04A",0x765C],
+ ["F04B",0x7664],
+ ["F04C",0x7659],
+ ["F04D",0x7650],
+ ["F04E",0x7653],
+ ["F04F",0x7657],
+ ["F050",0x765A],
+ ["F051",0x76A6],
+ ["F052",0x76BD],
+ ["F053",0x76EC],
+ ["F054",0x77C2],
+ ["F055",0x77BA],
+ ["F056",0x78FF],
+ ["F057",0x790C],
+ ["F058",0x7913],
+ ["F059",0x7914],
+ ["F05A",0x7909],
+ ["F05B",0x7910],
+ ["F05C",0x7912],
+ ["F05D",0x7911],
+ ["F05E",0x79AD],
+ ["F05F",0x79AC],
+ ["F060",0x7A5F],
+ ["F061",0x7C1C],
+ ["F062",0x7C29],
+ ["F063",0x7C19],
+ ["F064",0x7C20],
+ ["F065",0x7C1F],
+ ["F066",0x7C2D],
+ ["F067",0x7C1D],
+ ["F068",0x7C26],
+ ["F069",0x7C28],
+ ["F06A",0x7C22],
+ ["F06B",0x7C25],
+ ["F06C",0x7C30],
+ ["F06D",0x7E5C],
+ ["F06E",0x7E50],
+ ["F06F",0x7E56],
+ ["F070",0x7E63],
+ ["F071",0x7E58],
+ ["F072",0x7E62],
+ ["F073",0x7E5F],
+ ["F074",0x7E51],
+ ["F075",0x7E60],
+ ["F076",0x7E57],
+ ["F077",0x7E53],
+ ["F078",0x7FB5],
+ ["F079",0x7FB3],
+ ["F07A",0x7FF7],
+ ["F07B",0x7FF8],
+ ["F07C",0x8075],
+ ["F07D",0x81D1],
+ ["F07E",0x81D2],
+ ["F0A1",0x81D0],
+ ["F0A2",0x825F],
+ ["F0A3",0x825E],
+ ["F0A4",0x85B4],
+ ["F0A5",0x85C6],
+ ["F0A6",0x85C0],
+ ["F0A7",0x85C3],
+ ["F0A8",0x85C2],
+ ["F0A9",0x85B3],
+ ["F0AA",0x85B5],
+ ["F0AB",0x85BD],
+ ["F0AC",0x85C7],
+ ["F0AD",0x85C4],
+ ["F0AE",0x85BF],
+ ["F0AF",0x85CB],
+ ["F0B0",0x85CE],
+ ["F0B1",0x85C8],
+ ["F0B2",0x85C5],
+ ["F0B3",0x85B1],
+ ["F0B4",0x85B6],
+ ["F0B5",0x85D2],
+ ["F0B6",0x8624],
+ ["F0B7",0x85B8],
+ ["F0B8",0x85B7],
+ ["F0B9",0x85BE],
+ ["F0BA",0x8669],
+ ["F0BB",0x87E7],
+ ["F0BC",0x87E6],
+ ["F0BD",0x87E2],
+ ["F0BE",0x87DB],
+ ["F0BF",0x87EB],
+ ["F0C0",0x87EA],
+ ["F0C1",0x87E5],
+ ["F0C2",0x87DF],
+ ["F0C3",0x87F3],
+ ["F0C4",0x87E4],
+ ["F0C5",0x87D4],
+ ["F0C6",0x87DC],
+ ["F0C7",0x87D3],
+ ["F0C8",0x87ED],
+ ["F0C9",0x87D8],
+ ["F0CA",0x87E3],
+ ["F0CB",0x87A4],
+ ["F0CC",0x87D7],
+ ["F0CD",0x87D9],
+ ["F0CE",0x8801],
+ ["F0CF",0x87F4],
+ ["F0D0",0x87E8],
+ ["F0D1",0x87DD],
+ ["F0D2",0x8953],
+ ["F0D3",0x894B],
+ ["F0D4",0x894F],
+ ["F0D5",0x894C],
+ ["F0D6",0x8946],
+ ["F0D7",0x8950],
+ ["F0D8",0x8951],
+ ["F0D9",0x8949],
+ ["F0DA",0x8B2A],
+ ["F0DB",0x8B27],
+ ["F0DC",0x8B23],
+ ["F0DD",0x8B33],
+ ["F0DE",0x8B30],
+ ["F0DF",0x8B35],
+ ["F0E0",0x8B47],
+ ["F0E1",0x8B2F],
+ ["F0E2",0x8B3C],
+ ["F0E3",0x8B3E],
+ ["F0E4",0x8B31],
+ ["F0E5",0x8B25],
+ ["F0E6",0x8B37],
+ ["F0E7",0x8B26],
+ ["F0E8",0x8B36],
+ ["F0E9",0x8B2E],
+ ["F0EA",0x8B24],
+ ["F0EB",0x8B3B],
+ ["F0EC",0x8B3D],
+ ["F0ED",0x8B3A],
+ ["F0EE",0x8C42],
+ ["F0EF",0x8C75],
+ ["F0F0",0x8C99],
+ ["F0F1",0x8C98],
+ ["F0F2",0x8C97],
+ ["F0F3",0x8CFE],
+ ["F0F4",0x8D04],
+ ["F0F5",0x8D02],
+ ["F0F6",0x8D00],
+ ["F0F7",0x8E5C],
+ ["F0F8",0x8E62],
+ ["F0F9",0x8E60],
+ ["F0FA",0x8E57],
+ ["F0FB",0x8E56],
+ ["F0FC",0x8E5E],
+ ["F0FD",0x8E65],
+ ["F0FE",0x8E67],
+ ["F140",0x8E5B],
+ ["F141",0x8E5A],
+ ["F142",0x8E61],
+ ["F143",0x8E5D],
+ ["F144",0x8E69],
+ ["F145",0x8E54],
+ ["F146",0x8F46],
+ ["F147",0x8F47],
+ ["F148",0x8F48],
+ ["F149",0x8F4B],
+ ["F14A",0x9128],
+ ["F14B",0x913A],
+ ["F14C",0x913B],
+ ["F14D",0x913E],
+ ["F14E",0x91A8],
+ ["F14F",0x91A5],
+ ["F150",0x91A7],
+ ["F151",0x91AF],
+ ["F152",0x91AA],
+ ["F153",0x93B5],
+ ["F154",0x938C],
+ ["F155",0x9392],
+ ["F156",0x93B7],
+ ["F157",0x939B],
+ ["F158",0x939D],
+ ["F159",0x9389],
+ ["F15A",0x93A7],
+ ["F15B",0x938E],
+ ["F15C",0x93AA],
+ ["F15D",0x939E],
+ ["F15E",0x93A6],
+ ["F15F",0x9395],
+ ["F160",0x9388],
+ ["F161",0x9399],
+ ["F162",0x939F],
+ ["F163",0x938D],
+ ["F164",0x93B1],
+ ["F165",0x9391],
+ ["F166",0x93B2],
+ ["F167",0x93A4],
+ ["F168",0x93A8],
+ ["F169",0x93B4],
+ ["F16A",0x93A3],
+ ["F16B",0x93A5],
+ ["F16C",0x95D2],
+ ["F16D",0x95D3],
+ ["F16E",0x95D1],
+ ["F16F",0x96B3],
+ ["F170",0x96D7],
+ ["F171",0x96DA],
+ ["F172",0x5DC2],
+ ["F173",0x96DF],
+ ["F174",0x96D8],
+ ["F175",0x96DD],
+ ["F176",0x9723],
+ ["F177",0x9722],
+ ["F178",0x9725],
+ ["F179",0x97AC],
+ ["F17A",0x97AE],
+ ["F17B",0x97A8],
+ ["F17C",0x97AB],
+ ["F17D",0x97A4],
+ ["F17E",0x97AA],
+ ["F1A1",0x97A2],
+ ["F1A2",0x97A5],
+ ["F1A3",0x97D7],
+ ["F1A4",0x97D9],
+ ["F1A5",0x97D6],
+ ["F1A6",0x97D8],
+ ["F1A7",0x97FA],
+ ["F1A8",0x9850],
+ ["F1A9",0x9851],
+ ["F1AA",0x9852],
+ ["F1AB",0x98B8],
+ ["F1AC",0x9941],
+ ["F1AD",0x993C],
+ ["F1AE",0x993A],
+ ["F1AF",0x9A0F],
+ ["F1B0",0x9A0B],
+ ["F1B1",0x9A09],
+ ["F1B2",0x9A0D],
+ ["F1B3",0x9A04],
+ ["F1B4",0x9A11],
+ ["F1B5",0x9A0A],
+ ["F1B6",0x9A05],
+ ["F1B7",0x9A07],
+ ["F1B8",0x9A06],
+ ["F1B9",0x9AC0],
+ ["F1BA",0x9ADC],
+ ["F1BB",0x9B08],
+ ["F1BC",0x9B04],
+ ["F1BD",0x9B05],
+ ["F1BE",0x9B29],
+ ["F1BF",0x9B35],
+ ["F1C0",0x9B4A],
+ ["F1C1",0x9B4C],
+ ["F1C2",0x9B4B],
+ ["F1C3",0x9BC7],
+ ["F1C4",0x9BC6],
+ ["F1C5",0x9BC3],
+ ["F1C6",0x9BBF],
+ ["F1C7",0x9BC1],
+ ["F1C8",0x9BB5],
+ ["F1C9",0x9BB8],
+ ["F1CA",0x9BD3],
+ ["F1CB",0x9BB6],
+ ["F1CC",0x9BC4],
+ ["F1CD",0x9BB9],
+ ["F1CE",0x9BBD],
+ ["F1CF",0x9D5C],
+ ["F1D0",0x9D53],
+ ["F1D1",0x9D4F],
+ ["F1D2",0x9D4A],
+ ["F1D3",0x9D5B],
+ ["F1D4",0x9D4B],
+ ["F1D5",0x9D59],
+ ["F1D6",0x9D56],
+ ["F1D7",0x9D4C],
+ ["F1D8",0x9D57],
+ ["F1D9",0x9D52],
+ ["F1DA",0x9D54],
+ ["F1DB",0x9D5F],
+ ["F1DC",0x9D58],
+ ["F1DD",0x9D5A],
+ ["F1DE",0x9E8E],
+ ["F1DF",0x9E8C],
+ ["F1E0",0x9EDF],
+ ["F1E1",0x9F01],
+ ["F1E2",0x9F00],
+ ["F1E3",0x9F16],
+ ["F1E4",0x9F25],
+ ["F1E5",0x9F2B],
+ ["F1E6",0x9F2A],
+ ["F1E7",0x9F29],
+ ["F1E8",0x9F28],
+ ["F1E9",0x9F4C],
+ ["F1EA",0x9F55],
+ ["F1EB",0x5134],
+ ["F1EC",0x5135],
+ ["F1ED",0x5296],
+ ["F1EE",0x52F7],
+ ["F1EF",0x53B4],
+ ["F1F0",0x56AB],
+ ["F1F1",0x56AD],
+ ["F1F2",0x56A6],
+ ["F1F3",0x56A7],
+ ["F1F4",0x56AA],
+ ["F1F5",0x56AC],
+ ["F1F6",0x58DA],
+ ["F1F7",0x58DD],
+ ["F1F8",0x58DB],
+ ["F1F9",0x5912],
+ ["F1FA",0x5B3D],
+ ["F1FB",0x5B3E],
+ ["F1FC",0x5B3F],
+ ["F1FD",0x5DC3],
+ ["F1FE",0x5E70],
+ ["F240",0x5FBF],
+ ["F241",0x61FB],
+ ["F242",0x6507],
+ ["F243",0x6510],
+ ["F244",0x650D],
+ ["F245",0x6509],
+ ["F246",0x650C],
+ ["F247",0x650E],
+ ["F248",0x6584],
+ ["F249",0x65DE],
+ ["F24A",0x65DD],
+ ["F24B",0x66DE],
+ ["F24C",0x6AE7],
+ ["F24D",0x6AE0],
+ ["F24E",0x6ACC],
+ ["F24F",0x6AD1],
+ ["F250",0x6AD9],
+ ["F251",0x6ACB],
+ ["F252",0x6ADF],
+ ["F253",0x6ADC],
+ ["F254",0x6AD0],
+ ["F255",0x6AEB],
+ ["F256",0x6ACF],
+ ["F257",0x6ACD],
+ ["F258",0x6ADE],
+ ["F259",0x6B60],
+ ["F25A",0x6BB0],
+ ["F25B",0x6C0C],
+ ["F25C",0x7019],
+ ["F25D",0x7027],
+ ["F25E",0x7020],
+ ["F25F",0x7016],
+ ["F260",0x702B],
+ ["F261",0x7021],
+ ["F262",0x7022],
+ ["F263",0x7023],
+ ["F264",0x7029],
+ ["F265",0x7017],
+ ["F266",0x7024],
+ ["F267",0x701C],
+ ["F268",0x702A],
+ ["F269",0x720C],
+ ["F26A",0x720A],
+ ["F26B",0x7207],
+ ["F26C",0x7202],
+ ["F26D",0x7205],
+ ["F26E",0x72A5],
+ ["F26F",0x72A6],
+ ["F270",0x72A4],
+ ["F271",0x72A3],
+ ["F272",0x72A1],
+ ["F273",0x74CB],
+ ["F274",0x74C5],
+ ["F275",0x74B7],
+ ["F276",0x74C3],
+ ["F277",0x7516],
+ ["F278",0x7660],
+ ["F279",0x77C9],
+ ["F27A",0x77CA],
+ ["F27B",0x77C4],
+ ["F27C",0x77F1],
+ ["F27D",0x791D],
+ ["F27E",0x791B],
+ ["F2A1",0x7921],
+ ["F2A2",0x791C],
+ ["F2A3",0x7917],
+ ["F2A4",0x791E],
+ ["F2A5",0x79B0],
+ ["F2A6",0x7A67],
+ ["F2A7",0x7A68],
+ ["F2A8",0x7C33],
+ ["F2A9",0x7C3C],
+ ["F2AA",0x7C39],
+ ["F2AB",0x7C2C],
+ ["F2AC",0x7C3B],
+ ["F2AD",0x7CEC],
+ ["F2AE",0x7CEA],
+ ["F2AF",0x7E76],
+ ["F2B0",0x7E75],
+ ["F2B1",0x7E78],
+ ["F2B2",0x7E70],
+ ["F2B3",0x7E77],
+ ["F2B4",0x7E6F],
+ ["F2B5",0x7E7A],
+ ["F2B6",0x7E72],
+ ["F2B7",0x7E74],
+ ["F2B8",0x7E68],
+ ["F2B9",0x7F4B],
+ ["F2BA",0x7F4A],
+ ["F2BB",0x7F83],
+ ["F2BC",0x7F86],
+ ["F2BD",0x7FB7],
+ ["F2BE",0x7FFD],
+ ["F2BF",0x7FFE],
+ ["F2C0",0x8078],
+ ["F2C1",0x81D7],
+ ["F2C2",0x81D5],
+ ["F2C3",0x8264],
+ ["F2C4",0x8261],
+ ["F2C5",0x8263],
+ ["F2C6",0x85EB],
+ ["F2C7",0x85F1],
+ ["F2C8",0x85ED],
+ ["F2C9",0x85D9],
+ ["F2CA",0x85E1],
+ ["F2CB",0x85E8],
+ ["F2CC",0x85DA],
+ ["F2CD",0x85D7],
+ ["F2CE",0x85EC],
+ ["F2CF",0x85F2],
+ ["F2D0",0x85F8],
+ ["F2D1",0x85D8],
+ ["F2D2",0x85DF],
+ ["F2D3",0x85E3],
+ ["F2D4",0x85DC],
+ ["F2D5",0x85D1],
+ ["F2D6",0x85F0],
+ ["F2D7",0x85E6],
+ ["F2D8",0x85EF],
+ ["F2D9",0x85DE],
+ ["F2DA",0x85E2],
+ ["F2DB",0x8800],
+ ["F2DC",0x87FA],
+ ["F2DD",0x8803],
+ ["F2DE",0x87F6],
+ ["F2DF",0x87F7],
+ ["F2E0",0x8809],
+ ["F2E1",0x880C],
+ ["F2E2",0x880B],
+ ["F2E3",0x8806],
+ ["F2E4",0x87FC],
+ ["F2E5",0x8808],
+ ["F2E6",0x87FF],
+ ["F2E7",0x880A],
+ ["F2E8",0x8802],
+ ["F2E9",0x8962],
+ ["F2EA",0x895A],
+ ["F2EB",0x895B],
+ ["F2EC",0x8957],
+ ["F2ED",0x8961],
+ ["F2EE",0x895C],
+ ["F2EF",0x8958],
+ ["F2F0",0x895D],
+ ["F2F1",0x8959],
+ ["F2F2",0x8988],
+ ["F2F3",0x89B7],
+ ["F2F4",0x89B6],
+ ["F2F5",0x89F6],
+ ["F2F6",0x8B50],
+ ["F2F7",0x8B48],
+ ["F2F8",0x8B4A],
+ ["F2F9",0x8B40],
+ ["F2FA",0x8B53],
+ ["F2FB",0x8B56],
+ ["F2FC",0x8B54],
+ ["F2FD",0x8B4B],
+ ["F2FE",0x8B55],
+ ["F340",0x8B51],
+ ["F341",0x8B42],
+ ["F342",0x8B52],
+ ["F343",0x8B57],
+ ["F344",0x8C43],
+ ["F345",0x8C77],
+ ["F346",0x8C76],
+ ["F347",0x8C9A],
+ ["F348",0x8D06],
+ ["F349",0x8D07],
+ ["F34A",0x8D09],
+ ["F34B",0x8DAC],
+ ["F34C",0x8DAA],
+ ["F34D",0x8DAD],
+ ["F34E",0x8DAB],
+ ["F34F",0x8E6D],
+ ["F350",0x8E78],
+ ["F351",0x8E73],
+ ["F352",0x8E6A],
+ ["F353",0x8E6F],
+ ["F354",0x8E7B],
+ ["F355",0x8EC2],
+ ["F356",0x8F52],
+ ["F357",0x8F51],
+ ["F358",0x8F4F],
+ ["F359",0x8F50],
+ ["F35A",0x8F53],
+ ["F35B",0x8FB4],
+ ["F35C",0x9140],
+ ["F35D",0x913F],
+ ["F35E",0x91B0],
+ ["F35F",0x91AD],
+ ["F360",0x93DE],
+ ["F361",0x93C7],
+ ["F362",0x93CF],
+ ["F363",0x93C2],
+ ["F364",0x93DA],
+ ["F365",0x93D0],
+ ["F366",0x93F9],
+ ["F367",0x93EC],
+ ["F368",0x93CC],
+ ["F369",0x93D9],
+ ["F36A",0x93A9],
+ ["F36B",0x93E6],
+ ["F36C",0x93CA],
+ ["F36D",0x93D4],
+ ["F36E",0x93EE],
+ ["F36F",0x93E3],
+ ["F370",0x93D5],
+ ["F371",0x93C4],
+ ["F372",0x93CE],
+ ["F373",0x93C0],
+ ["F374",0x93D2],
+ ["F375",0x93E7],
+ ["F376",0x957D],
+ ["F377",0x95DA],
+ ["F378",0x95DB],
+ ["F379",0x96E1],
+ ["F37A",0x9729],
+ ["F37B",0x972B],
+ ["F37C",0x972C],
+ ["F37D",0x9728],
+ ["F37E",0x9726],
+ ["F3A1",0x97B3],
+ ["F3A2",0x97B7],
+ ["F3A3",0x97B6],
+ ["F3A4",0x97DD],
+ ["F3A5",0x97DE],
+ ["F3A6",0x97DF],
+ ["F3A7",0x985C],
+ ["F3A8",0x9859],
+ ["F3A9",0x985D],
+ ["F3AA",0x9857],
+ ["F3AB",0x98BF],
+ ["F3AC",0x98BD],
+ ["F3AD",0x98BB],
+ ["F3AE",0x98BE],
+ ["F3AF",0x9948],
+ ["F3B0",0x9947],
+ ["F3B1",0x9943],
+ ["F3B2",0x99A6],
+ ["F3B3",0x99A7],
+ ["F3B4",0x9A1A],
+ ["F3B5",0x9A15],
+ ["F3B6",0x9A25],
+ ["F3B7",0x9A1D],
+ ["F3B8",0x9A24],
+ ["F3B9",0x9A1B],
+ ["F3BA",0x9A22],
+ ["F3BB",0x9A20],
+ ["F3BC",0x9A27],
+ ["F3BD",0x9A23],
+ ["F3BE",0x9A1E],
+ ["F3BF",0x9A1C],
+ ["F3C0",0x9A14],
+ ["F3C1",0x9AC2],
+ ["F3C2",0x9B0B],
+ ["F3C3",0x9B0A],
+ ["F3C4",0x9B0E],
+ ["F3C5",0x9B0C],
+ ["F3C6",0x9B37],
+ ["F3C7",0x9BEA],
+ ["F3C8",0x9BEB],
+ ["F3C9",0x9BE0],
+ ["F3CA",0x9BDE],
+ ["F3CB",0x9BE4],
+ ["F3CC",0x9BE6],
+ ["F3CD",0x9BE2],
+ ["F3CE",0x9BF0],
+ ["F3CF",0x9BD4],
+ ["F3D0",0x9BD7],
+ ["F3D1",0x9BEC],
+ ["F3D2",0x9BDC],
+ ["F3D3",0x9BD9],
+ ["F3D4",0x9BE5],
+ ["F3D5",0x9BD5],
+ ["F3D6",0x9BE1],
+ ["F3D7",0x9BDA],
+ ["F3D8",0x9D77],
+ ["F3D9",0x9D81],
+ ["F3DA",0x9D8A],
+ ["F3DB",0x9D84],
+ ["F3DC",0x9D88],
+ ["F3DD",0x9D71],
+ ["F3DE",0x9D80],
+ ["F3DF",0x9D78],
+ ["F3E0",0x9D86],
+ ["F3E1",0x9D8B],
+ ["F3E2",0x9D8C],
+ ["F3E3",0x9D7D],
+ ["F3E4",0x9D6B],
+ ["F3E5",0x9D74],
+ ["F3E6",0x9D75],
+ ["F3E7",0x9D70],
+ ["F3E8",0x9D69],
+ ["F3E9",0x9D85],
+ ["F3EA",0x9D73],
+ ["F3EB",0x9D7B],
+ ["F3EC",0x9D82],
+ ["F3ED",0x9D6F],
+ ["F3EE",0x9D79],
+ ["F3EF",0x9D7F],
+ ["F3F0",0x9D87],
+ ["F3F1",0x9D68],
+ ["F3F2",0x9E94],
+ ["F3F3",0x9E91],
+ ["F3F4",0x9EC0],
+ ["F3F5",0x9EFC],
+ ["F3F6",0x9F2D],
+ ["F3F7",0x9F40],
+ ["F3F8",0x9F41],
+ ["F3F9",0x9F4D],
+ ["F3FA",0x9F56],
+ ["F3FB",0x9F57],
+ ["F3FC",0x9F58],
+ ["F3FD",0x5337],
+ ["F3FE",0x56B2],
+ ["F440",0x56B5],
+ ["F441",0x56B3],
+ ["F442",0x58E3],
+ ["F443",0x5B45],
+ ["F444",0x5DC6],
+ ["F445",0x5DC7],
+ ["F446",0x5EEE],
+ ["F447",0x5EEF],
+ ["F448",0x5FC0],
+ ["F449",0x5FC1],
+ ["F44A",0x61F9],
+ ["F44B",0x6517],
+ ["F44C",0x6516],
+ ["F44D",0x6515],
+ ["F44E",0x6513],
+ ["F44F",0x65DF],
+ ["F450",0x66E8],
+ ["F451",0x66E3],
+ ["F452",0x66E4],
+ ["F453",0x6AF3],
+ ["F454",0x6AF0],
+ ["F455",0x6AEA],
+ ["F456",0x6AE8],
+ ["F457",0x6AF9],
+ ["F458",0x6AF1],
+ ["F459",0x6AEE],
+ ["F45A",0x6AEF],
+ ["F45B",0x703C],
+ ["F45C",0x7035],
+ ["F45D",0x702F],
+ ["F45E",0x7037],
+ ["F45F",0x7034],
+ ["F460",0x7031],
+ ["F461",0x7042],
+ ["F462",0x7038],
+ ["F463",0x703F],
+ ["F464",0x703A],
+ ["F465",0x7039],
+ ["F466",0x7040],
+ ["F467",0x703B],
+ ["F468",0x7033],
+ ["F469",0x7041],
+ ["F46A",0x7213],
+ ["F46B",0x7214],
+ ["F46C",0x72A8],
+ ["F46D",0x737D],
+ ["F46E",0x737C],
+ ["F46F",0x74BA],
+ ["F470",0x76AB],
+ ["F471",0x76AA],
+ ["F472",0x76BE],
+ ["F473",0x76ED],
+ ["F474",0x77CC],
+ ["F475",0x77CE],
+ ["F476",0x77CF],
+ ["F477",0x77CD],
+ ["F478",0x77F2],
+ ["F479",0x7925],
+ ["F47A",0x7923],
+ ["F47B",0x7927],
+ ["F47C",0x7928],
+ ["F47D",0x7924],
+ ["F47E",0x7929],
+ ["F4A1",0x79B2],
+ ["F4A2",0x7A6E],
+ ["F4A3",0x7A6C],
+ ["F4A4",0x7A6D],
+ ["F4A5",0x7AF7],
+ ["F4A6",0x7C49],
+ ["F4A7",0x7C48],
+ ["F4A8",0x7C4A],
+ ["F4A9",0x7C47],
+ ["F4AA",0x7C45],
+ ["F4AB",0x7CEE],
+ ["F4AC",0x7E7B],
+ ["F4AD",0x7E7E],
+ ["F4AE",0x7E81],
+ ["F4AF",0x7E80],
+ ["F4B0",0x7FBA],
+ ["F4B1",0x7FFF],
+ ["F4B2",0x8079],
+ ["F4B3",0x81DB],
+ ["F4B4",0x81D9],
+ ["F4B5",0x820B],
+ ["F4B6",0x8268],
+ ["F4B7",0x8269],
+ ["F4B8",0x8622],
+ ["F4B9",0x85FF],
+ ["F4BA",0x8601],
+ ["F4BB",0x85FE],
+ ["F4BC",0x861B],
+ ["F4BD",0x8600],
+ ["F4BE",0x85F6],
+ ["F4BF",0x8604],
+ ["F4C0",0x8609],
+ ["F4C1",0x8605],
+ ["F4C2",0x860C],
+ ["F4C3",0x85FD],
+ ["F4C4",0x8819],
+ ["F4C5",0x8810],
+ ["F4C6",0x8811],
+ ["F4C7",0x8817],
+ ["F4C8",0x8813],
+ ["F4C9",0x8816],
+ ["F4CA",0x8963],
+ ["F4CB",0x8966],
+ ["F4CC",0x89B9],
+ ["F4CD",0x89F7],
+ ["F4CE",0x8B60],
+ ["F4CF",0x8B6A],
+ ["F4D0",0x8B5D],
+ ["F4D1",0x8B68],
+ ["F4D2",0x8B63],
+ ["F4D3",0x8B65],
+ ["F4D4",0x8B67],
+ ["F4D5",0x8B6D],
+ ["F4D6",0x8DAE],
+ ["F4D7",0x8E86],
+ ["F4D8",0x8E88],
+ ["F4D9",0x8E84],
+ ["F4DA",0x8F59],
+ ["F4DB",0x8F56],
+ ["F4DC",0x8F57],
+ ["F4DD",0x8F55],
+ ["F4DE",0x8F58],
+ ["F4DF",0x8F5A],
+ ["F4E0",0x908D],
+ ["F4E1",0x9143],
+ ["F4E2",0x9141],
+ ["F4E3",0x91B7],
+ ["F4E4",0x91B5],
+ ["F4E5",0x91B2],
+ ["F4E6",0x91B3],
+ ["F4E7",0x940B],
+ ["F4E8",0x9413],
+ ["F4E9",0x93FB],
+ ["F4EA",0x9420],
+ ["F4EB",0x940F],
+ ["F4EC",0x9414],
+ ["F4ED",0x93FE],
+ ["F4EE",0x9415],
+ ["F4EF",0x9410],
+ ["F4F0",0x9428],
+ ["F4F1",0x9419],
+ ["F4F2",0x940D],
+ ["F4F3",0x93F5],
+ ["F4F4",0x9400],
+ ["F4F5",0x93F7],
+ ["F4F6",0x9407],
+ ["F4F7",0x940E],
+ ["F4F8",0x9416],
+ ["F4F9",0x9412],
+ ["F4FA",0x93FA],
+ ["F4FB",0x9409],
+ ["F4FC",0x93F8],
+ ["F4FD",0x940A],
+ ["F4FE",0x93FF],
+ ["F540",0x93FC],
+ ["F541",0x940C],
+ ["F542",0x93F6],
+ ["F543",0x9411],
+ ["F544",0x9406],
+ ["F545",0x95DE],
+ ["F546",0x95E0],
+ ["F547",0x95DF],
+ ["F548",0x972E],
+ ["F549",0x972F],
+ ["F54A",0x97B9],
+ ["F54B",0x97BB],
+ ["F54C",0x97FD],
+ ["F54D",0x97FE],
+ ["F54E",0x9860],
+ ["F54F",0x9862],
+ ["F550",0x9863],
+ ["F551",0x985F],
+ ["F552",0x98C1],
+ ["F553",0x98C2],
+ ["F554",0x9950],
+ ["F555",0x994E],
+ ["F556",0x9959],
+ ["F557",0x994C],
+ ["F558",0x994B],
+ ["F559",0x9953],
+ ["F55A",0x9A32],
+ ["F55B",0x9A34],
+ ["F55C",0x9A31],
+ ["F55D",0x9A2C],
+ ["F55E",0x9A2A],
+ ["F55F",0x9A36],
+ ["F560",0x9A29],
+ ["F561",0x9A2E],
+ ["F562",0x9A38],
+ ["F563",0x9A2D],
+ ["F564",0x9AC7],
+ ["F565",0x9ACA],
+ ["F566",0x9AC6],
+ ["F567",0x9B10],
+ ["F568",0x9B12],
+ ["F569",0x9B11],
+ ["F56A",0x9C0B],
+ ["F56B",0x9C08],
+ ["F56C",0x9BF7],
+ ["F56D",0x9C05],
+ ["F56E",0x9C12],
+ ["F56F",0x9BF8],
+ ["F570",0x9C40],
+ ["F571",0x9C07],
+ ["F572",0x9C0E],
+ ["F573",0x9C06],
+ ["F574",0x9C17],
+ ["F575",0x9C14],
+ ["F576",0x9C09],
+ ["F577",0x9D9F],
+ ["F578",0x9D99],
+ ["F579",0x9DA4],
+ ["F57A",0x9D9D],
+ ["F57B",0x9D92],
+ ["F57C",0x9D98],
+ ["F57D",0x9D90],
+ ["F57E",0x9D9B],
+ ["F5A1",0x9DA0],
+ ["F5A2",0x9D94],
+ ["F5A3",0x9D9C],
+ ["F5A4",0x9DAA],
+ ["F5A5",0x9D97],
+ ["F5A6",0x9DA1],
+ ["F5A7",0x9D9A],
+ ["F5A8",0x9DA2],
+ ["F5A9",0x9DA8],
+ ["F5AA",0x9D9E],
+ ["F5AB",0x9DA3],
+ ["F5AC",0x9DBF],
+ ["F5AD",0x9DA9],
+ ["F5AE",0x9D96],
+ ["F5AF",0x9DA6],
+ ["F5B0",0x9DA7],
+ ["F5B1",0x9E99],
+ ["F5B2",0x9E9B],
+ ["F5B3",0x9E9A],
+ ["F5B4",0x9EE5],
+ ["F5B5",0x9EE4],
+ ["F5B6",0x9EE7],
+ ["F5B7",0x9EE6],
+ ["F5B8",0x9F30],
+ ["F5B9",0x9F2E],
+ ["F5BA",0x9F5B],
+ ["F5BB",0x9F60],
+ ["F5BC",0x9F5E],
+ ["F5BD",0x9F5D],
+ ["F5BE",0x9F59],
+ ["F5BF",0x9F91],
+ ["F5C0",0x513A],
+ ["F5C1",0x5139],
+ ["F5C2",0x5298],
+ ["F5C3",0x5297],
+ ["F5C4",0x56C3],
+ ["F5C5",0x56BD],
+ ["F5C6",0x56BE],
+ ["F5C7",0x5B48],
+ ["F5C8",0x5B47],
+ ["F5C9",0x5DCB],
+ ["F5CA",0x5DCF],
+ ["F5CB",0x5EF1],
+ ["F5CC",0x61FD],
+ ["F5CD",0x651B],
+ ["F5CE",0x6B02],
+ ["F5CF",0x6AFC],
+ ["F5D0",0x6B03],
+ ["F5D1",0x6AF8],
+ ["F5D2",0x6B00],
+ ["F5D3",0x7043],
+ ["F5D4",0x7044],
+ ["F5D5",0x704A],
+ ["F5D6",0x7048],
+ ["F5D7",0x7049],
+ ["F5D8",0x7045],
+ ["F5D9",0x7046],
+ ["F5DA",0x721D],
+ ["F5DB",0x721A],
+ ["F5DC",0x7219],
+ ["F5DD",0x737E],
+ ["F5DE",0x7517],
+ ["F5DF",0x766A],
+ ["F5E0",0x77D0],
+ ["F5E1",0x792D],
+ ["F5E2",0x7931],
+ ["F5E3",0x792F],
+ ["F5E4",0x7C54],
+ ["F5E5",0x7C53],
+ ["F5E6",0x7CF2],
+ ["F5E7",0x7E8A],
+ ["F5E8",0x7E87],
+ ["F5E9",0x7E88],
+ ["F5EA",0x7E8B],
+ ["F5EB",0x7E86],
+ ["F5EC",0x7E8D],
+ ["F5ED",0x7F4D],
+ ["F5EE",0x7FBB],
+ ["F5EF",0x8030],
+ ["F5F0",0x81DD],
+ ["F5F1",0x8618],
+ ["F5F2",0x862A],
+ ["F5F3",0x8626],
+ ["F5F4",0x861F],
+ ["F5F5",0x8623],
+ ["F5F6",0x861C],
+ ["F5F7",0x8619],
+ ["F5F8",0x8627],
+ ["F5F9",0x862E],
+ ["F5FA",0x8621],
+ ["F5FB",0x8620],
+ ["F5FC",0x8629],
+ ["F5FD",0x861E],
+ ["F5FE",0x8625],
+ ["F640",0x8829],
+ ["F641",0x881D],
+ ["F642",0x881B],
+ ["F643",0x8820],
+ ["F644",0x8824],
+ ["F645",0x881C],
+ ["F646",0x882B],
+ ["F647",0x884A],
+ ["F648",0x896D],
+ ["F649",0x8969],
+ ["F64A",0x896E],
+ ["F64B",0x896B],
+ ["F64C",0x89FA],
+ ["F64D",0x8B79],
+ ["F64E",0x8B78],
+ ["F64F",0x8B45],
+ ["F650",0x8B7A],
+ ["F651",0x8B7B],
+ ["F652",0x8D10],
+ ["F653",0x8D14],
+ ["F654",0x8DAF],
+ ["F655",0x8E8E],
+ ["F656",0x8E8C],
+ ["F657",0x8F5E],
+ ["F658",0x8F5B],
+ ["F659",0x8F5D],
+ ["F65A",0x9146],
+ ["F65B",0x9144],
+ ["F65C",0x9145],
+ ["F65D",0x91B9],
+ ["F65E",0x943F],
+ ["F65F",0x943B],
+ ["F660",0x9436],
+ ["F661",0x9429],
+ ["F662",0x943D],
+ ["F663",0x943C],
+ ["F664",0x9430],
+ ["F665",0x9439],
+ ["F666",0x942A],
+ ["F667",0x9437],
+ ["F668",0x942C],
+ ["F669",0x9440],
+ ["F66A",0x9431],
+ ["F66B",0x95E5],
+ ["F66C",0x95E4],
+ ["F66D",0x95E3],
+ ["F66E",0x9735],
+ ["F66F",0x973A],
+ ["F670",0x97BF],
+ ["F671",0x97E1],
+ ["F672",0x9864],
+ ["F673",0x98C9],
+ ["F674",0x98C6],
+ ["F675",0x98C0],
+ ["F676",0x9958],
+ ["F677",0x9956],
+ ["F678",0x9A39],
+ ["F679",0x9A3D],
+ ["F67A",0x9A46],
+ ["F67B",0x9A44],
+ ["F67C",0x9A42],
+ ["F67D",0x9A41],
+ ["F67E",0x9A3A],
+ ["F6A1",0x9A3F],
+ ["F6A2",0x9ACD],
+ ["F6A3",0x9B15],
+ ["F6A4",0x9B17],
+ ["F6A5",0x9B18],
+ ["F6A6",0x9B16],
+ ["F6A7",0x9B3A],
+ ["F6A8",0x9B52],
+ ["F6A9",0x9C2B],
+ ["F6AA",0x9C1D],
+ ["F6AB",0x9C1C],
+ ["F6AC",0x9C2C],
+ ["F6AD",0x9C23],
+ ["F6AE",0x9C28],
+ ["F6AF",0x9C29],
+ ["F6B0",0x9C24],
+ ["F6B1",0x9C21],
+ ["F6B2",0x9DB7],
+ ["F6B3",0x9DB6],
+ ["F6B4",0x9DBC],
+ ["F6B5",0x9DC1],
+ ["F6B6",0x9DC7],
+ ["F6B7",0x9DCA],
+ ["F6B8",0x9DCF],
+ ["F6B9",0x9DBE],
+ ["F6BA",0x9DC5],
+ ["F6BB",0x9DC3],
+ ["F6BC",0x9DBB],
+ ["F6BD",0x9DB5],
+ ["F6BE",0x9DCE],
+ ["F6BF",0x9DB9],
+ ["F6C0",0x9DBA],
+ ["F6C1",0x9DAC],
+ ["F6C2",0x9DC8],
+ ["F6C3",0x9DB1],
+ ["F6C4",0x9DAD],
+ ["F6C5",0x9DCC],
+ ["F6C6",0x9DB3],
+ ["F6C7",0x9DCD],
+ ["F6C8",0x9DB2],
+ ["F6C9",0x9E7A],
+ ["F6CA",0x9E9C],
+ ["F6CB",0x9EEB],
+ ["F6CC",0x9EEE],
+ ["F6CD",0x9EED],
+ ["F6CE",0x9F1B],
+ ["F6CF",0x9F18],
+ ["F6D0",0x9F1A],
+ ["F6D1",0x9F31],
+ ["F6D2",0x9F4E],
+ ["F6D3",0x9F65],
+ ["F6D4",0x9F64],
+ ["F6D5",0x9F92],
+ ["F6D6",0x4EB9],
+ ["F6D7",0x56C6],
+ ["F6D8",0x56C5],
+ ["F6D9",0x56CB],
+ ["F6DA",0x5971],
+ ["F6DB",0x5B4B],
+ ["F6DC",0x5B4C],
+ ["F6DD",0x5DD5],
+ ["F6DE",0x5DD1],
+ ["F6DF",0x5EF2],
+ ["F6E0",0x6521],
+ ["F6E1",0x6520],
+ ["F6E2",0x6526],
+ ["F6E3",0x6522],
+ ["F6E4",0x6B0B],
+ ["F6E5",0x6B08],
+ ["F6E6",0x6B09],
+ ["F6E7",0x6C0D],
+ ["F6E8",0x7055],
+ ["F6E9",0x7056],
+ ["F6EA",0x7057],
+ ["F6EB",0x7052],
+ ["F6EC",0x721E],
+ ["F6ED",0x721F],
+ ["F6EE",0x72A9],
+ ["F6EF",0x737F],
+ ["F6F0",0x74D8],
+ ["F6F1",0x74D5],
+ ["F6F2",0x74D9],
+ ["F6F3",0x74D7],
+ ["F6F4",0x766D],
+ ["F6F5",0x76AD],
+ ["F6F6",0x7935],
+ ["F6F7",0x79B4],
+ ["F6F8",0x7A70],
+ ["F6F9",0x7A71],
+ ["F6FA",0x7C57],
+ ["F6FB",0x7C5C],
+ ["F6FC",0x7C59],
+ ["F6FD",0x7C5B],
+ ["F6FE",0x7C5A],
+ ["F740",0x7CF4],
+ ["F741",0x7CF1],
+ ["F742",0x7E91],
+ ["F743",0x7F4F],
+ ["F744",0x7F87],
+ ["F745",0x81DE],
+ ["F746",0x826B],
+ ["F747",0x8634],
+ ["F748",0x8635],
+ ["F749",0x8633],
+ ["F74A",0x862C],
+ ["F74B",0x8632],
+ ["F74C",0x8636],
+ ["F74D",0x882C],
+ ["F74E",0x8828],
+ ["F74F",0x8826],
+ ["F750",0x882A],
+ ["F751",0x8825],
+ ["F752",0x8971],
+ ["F753",0x89BF],
+ ["F754",0x89BE],
+ ["F755",0x89FB],
+ ["F756",0x8B7E],
+ ["F757",0x8B84],
+ ["F758",0x8B82],
+ ["F759",0x8B86],
+ ["F75A",0x8B85],
+ ["F75B",0x8B7F],
+ ["F75C",0x8D15],
+ ["F75D",0x8E95],
+ ["F75E",0x8E94],
+ ["F75F",0x8E9A],
+ ["F760",0x8E92],
+ ["F761",0x8E90],
+ ["F762",0x8E96],
+ ["F763",0x8E97],
+ ["F764",0x8F60],
+ ["F765",0x8F62],
+ ["F766",0x9147],
+ ["F767",0x944C],
+ ["F768",0x9450],
+ ["F769",0x944A],
+ ["F76A",0x944B],
+ ["F76B",0x944F],
+ ["F76C",0x9447],
+ ["F76D",0x9445],
+ ["F76E",0x9448],
+ ["F76F",0x9449],
+ ["F770",0x9446],
+ ["F771",0x973F],
+ ["F772",0x97E3],
+ ["F773",0x986A],
+ ["F774",0x9869],
+ ["F775",0x98CB],
+ ["F776",0x9954],
+ ["F777",0x995B],
+ ["F778",0x9A4E],
+ ["F779",0x9A53],
+ ["F77A",0x9A54],
+ ["F77B",0x9A4C],
+ ["F77C",0x9A4F],
+ ["F77D",0x9A48],
+ ["F77E",0x9A4A],
+ ["F7A1",0x9A49],
+ ["F7A2",0x9A52],
+ ["F7A3",0x9A50],
+ ["F7A4",0x9AD0],
+ ["F7A5",0x9B19],
+ ["F7A6",0x9B2B],
+ ["F7A7",0x9B3B],
+ ["F7A8",0x9B56],
+ ["F7A9",0x9B55],
+ ["F7AA",0x9C46],
+ ["F7AB",0x9C48],
+ ["F7AC",0x9C3F],
+ ["F7AD",0x9C44],
+ ["F7AE",0x9C39],
+ ["F7AF",0x9C33],
+ ["F7B0",0x9C41],
+ ["F7B1",0x9C3C],
+ ["F7B2",0x9C37],
+ ["F7B3",0x9C34],
+ ["F7B4",0x9C32],
+ ["F7B5",0x9C3D],
+ ["F7B6",0x9C36],
+ ["F7B7",0x9DDB],
+ ["F7B8",0x9DD2],
+ ["F7B9",0x9DDE],
+ ["F7BA",0x9DDA],
+ ["F7BB",0x9DCB],
+ ["F7BC",0x9DD0],
+ ["F7BD",0x9DDC],
+ ["F7BE",0x9DD1],
+ ["F7BF",0x9DDF],
+ ["F7C0",0x9DE9],
+ ["F7C1",0x9DD9],
+ ["F7C2",0x9DD8],
+ ["F7C3",0x9DD6],
+ ["F7C4",0x9DF5],
+ ["F7C5",0x9DD5],
+ ["F7C6",0x9DDD],
+ ["F7C7",0x9EB6],
+ ["F7C8",0x9EF0],
+ ["F7C9",0x9F35],
+ ["F7CA",0x9F33],
+ ["F7CB",0x9F32],
+ ["F7CC",0x9F42],
+ ["F7CD",0x9F6B],
+ ["F7CE",0x9F95],
+ ["F7CF",0x9FA2],
+ ["F7D0",0x513D],
+ ["F7D1",0x5299],
+ ["F7D2",0x58E8],
+ ["F7D3",0x58E7],
+ ["F7D4",0x5972],
+ ["F7D5",0x5B4D],
+ ["F7D6",0x5DD8],
+ ["F7D7",0x882F],
+ ["F7D8",0x5F4F],
+ ["F7D9",0x6201],
+ ["F7DA",0x6203],
+ ["F7DB",0x6204],
+ ["F7DC",0x6529],
+ ["F7DD",0x6525],
+ ["F7DE",0x6596],
+ ["F7DF",0x66EB],
+ ["F7E0",0x6B11],
+ ["F7E1",0x6B12],
+ ["F7E2",0x6B0F],
+ ["F7E3",0x6BCA],
+ ["F7E4",0x705B],
+ ["F7E5",0x705A],
+ ["F7E6",0x7222],
+ ["F7E7",0x7382],
+ ["F7E8",0x7381],
+ ["F7E9",0x7383],
+ ["F7EA",0x7670],
+ ["F7EB",0x77D4],
+ ["F7EC",0x7C67],
+ ["F7ED",0x7C66],
+ ["F7EE",0x7E95],
+ ["F7EF",0x826C],
+ ["F7F0",0x863A],
+ ["F7F1",0x8640],
+ ["F7F2",0x8639],
+ ["F7F3",0x863C],
+ ["F7F4",0x8631],
+ ["F7F5",0x863B],
+ ["F7F6",0x863E],
+ ["F7F7",0x8830],
+ ["F7F8",0x8832],
+ ["F7F9",0x882E],
+ ["F7FA",0x8833],
+ ["F7FB",0x8976],
+ ["F7FC",0x8974],
+ ["F7FD",0x8973],
+ ["F7FE",0x89FE],
+ ["F840",0x8B8C],
+ ["F841",0x8B8E],
+ ["F842",0x8B8B],
+ ["F843",0x8B88],
+ ["F844",0x8C45],
+ ["F845",0x8D19],
+ ["F846",0x8E98],
+ ["F847",0x8F64],
+ ["F848",0x8F63],
+ ["F849",0x91BC],
+ ["F84A",0x9462],
+ ["F84B",0x9455],
+ ["F84C",0x945D],
+ ["F84D",0x9457],
+ ["F84E",0x945E],
+ ["F84F",0x97C4],
+ ["F850",0x97C5],
+ ["F851",0x9800],
+ ["F852",0x9A56],
+ ["F853",0x9A59],
+ ["F854",0x9B1E],
+ ["F855",0x9B1F],
+ ["F856",0x9B20],
+ ["F857",0x9C52],
+ ["F858",0x9C58],
+ ["F859",0x9C50],
+ ["F85A",0x9C4A],
+ ["F85B",0x9C4D],
+ ["F85C",0x9C4B],
+ ["F85D",0x9C55],
+ ["F85E",0x9C59],
+ ["F85F",0x9C4C],
+ ["F860",0x9C4E],
+ ["F861",0x9DFB],
+ ["F862",0x9DF7],
+ ["F863",0x9DEF],
+ ["F864",0x9DE3],
+ ["F865",0x9DEB],
+ ["F866",0x9DF8],
+ ["F867",0x9DE4],
+ ["F868",0x9DF6],
+ ["F869",0x9DE1],
+ ["F86A",0x9DEE],
+ ["F86B",0x9DE6],
+ ["F86C",0x9DF2],
+ ["F86D",0x9DF0],
+ ["F86E",0x9DE2],
+ ["F86F",0x9DEC],
+ ["F870",0x9DF4],
+ ["F871",0x9DF3],
+ ["F872",0x9DE8],
+ ["F873",0x9DED],
+ ["F874",0x9EC2],
+ ["F875",0x9ED0],
+ ["F876",0x9EF2],
+ ["F877",0x9EF3],
+ ["F878",0x9F06],
+ ["F879",0x9F1C],
+ ["F87A",0x9F38],
+ ["F87B",0x9F37],
+ ["F87C",0x9F36],
+ ["F87D",0x9F43],
+ ["F87E",0x9F4F],
+ ["F8A1",0x9F71],
+ ["F8A2",0x9F70],
+ ["F8A3",0x9F6E],
+ ["F8A4",0x9F6F],
+ ["F8A5",0x56D3],
+ ["F8A6",0x56CD],
+ ["F8A7",0x5B4E],
+ ["F8A8",0x5C6D],
+ ["F8A9",0x652D],
+ ["F8AA",0x66ED],
+ ["F8AB",0x66EE],
+ ["F8AC",0x6B13],
+ ["F8AD",0x705F],
+ ["F8AE",0x7061],
+ ["F8AF",0x705D],
+ ["F8B0",0x7060],
+ ["F8B1",0x7223],
+ ["F8B2",0x74DB],
+ ["F8B3",0x74E5],
+ ["F8B4",0x77D5],
+ ["F8B5",0x7938],
+ ["F8B6",0x79B7],
+ ["F8B7",0x79B6],
+ ["F8B8",0x7C6A],
+ ["F8B9",0x7E97],
+ ["F8BA",0x7F89],
+ ["F8BB",0x826D],
+ ["F8BC",0x8643],
+ ["F8BD",0x8838],
+ ["F8BE",0x8837],
+ ["F8BF",0x8835],
+ ["F8C0",0x884B],
+ ["F8C1",0x8B94],
+ ["F8C2",0x8B95],
+ ["F8C3",0x8E9E],
+ ["F8C4",0x8E9F],
+ ["F8C5",0x8EA0],
+ ["F8C6",0x8E9D],
+ ["F8C7",0x91BE],
+ ["F8C8",0x91BD],
+ ["F8C9",0x91C2],
+ ["F8CA",0x946B],
+ ["F8CB",0x9468],
+ ["F8CC",0x9469],
+ ["F8CD",0x96E5],
+ ["F8CE",0x9746],
+ ["F8CF",0x9743],
+ ["F8D0",0x9747],
+ ["F8D1",0x97C7],
+ ["F8D2",0x97E5],
+ ["F8D3",0x9A5E],
+ ["F8D4",0x9AD5],
+ ["F8D5",0x9B59],
+ ["F8D6",0x9C63],
+ ["F8D7",0x9C67],
+ ["F8D8",0x9C66],
+ ["F8D9",0x9C62],
+ ["F8DA",0x9C5E],
+ ["F8DB",0x9C60],
+ ["F8DC",0x9E02],
+ ["F8DD",0x9DFE],
+ ["F8DE",0x9E07],
+ ["F8DF",0x9E03],
+ ["F8E0",0x9E06],
+ ["F8E1",0x9E05],
+ ["F8E2",0x9E00],
+ ["F8E3",0x9E01],
+ ["F8E4",0x9E09],
+ ["F8E5",0x9DFF],
+ ["F8E6",0x9DFD],
+ ["F8E7",0x9E04],
+ ["F8E8",0x9EA0],
+ ["F8E9",0x9F1E],
+ ["F8EA",0x9F46],
+ ["F8EB",0x9F74],
+ ["F8EC",0x9F75],
+ ["F8ED",0x9F76],
+ ["F8EE",0x56D4],
+ ["F8EF",0x652E],
+ ["F8F0",0x65B8],
+ ["F8F1",0x6B18],
+ ["F8F2",0x6B19],
+ ["F8F3",0x6B17],
+ ["F8F4",0x6B1A],
+ ["F8F5",0x7062],
+ ["F8F6",0x7226],
+ ["F8F7",0x72AA],
+ ["F8F8",0x77D8],
+ ["F8F9",0x77D9],
+ ["F8FA",0x7939],
+ ["F8FB",0x7C69],
+ ["F8FC",0x7C6B],
+ ["F8FD",0x7CF6],
+ ["F8FE",0x7E9A],
+ ["F940",0x7E98],
+ ["F941",0x7E9B],
+ ["F942",0x7E99],
+ ["F943",0x81E0],
+ ["F944",0x81E1],
+ ["F945",0x8646],
+ ["F946",0x8647],
+ ["F947",0x8648],
+ ["F948",0x8979],
+ ["F949",0x897A],
+ ["F94A",0x897C],
+ ["F94B",0x897B],
+ ["F94C",0x89FF],
+ ["F94D",0x8B98],
+ ["F94E",0x8B99],
+ ["F94F",0x8EA5],
+ ["F950",0x8EA4],
+ ["F951",0x8EA3],
+ ["F952",0x946E],
+ ["F953",0x946D],
+ ["F954",0x946F],
+ ["F955",0x9471],
+ ["F956",0x9473],
+ ["F957",0x9749],
+ ["F958",0x9872],
+ ["F959",0x995F],
+ ["F95A",0x9C68],
+ ["F95B",0x9C6E],
+ ["F95C",0x9C6D],
+ ["F95D",0x9E0B],
+ ["F95E",0x9E0D],
+ ["F95F",0x9E10],
+ ["F960",0x9E0F],
+ ["F961",0x9E12],
+ ["F962",0x9E11],
+ ["F963",0x9EA1],
+ ["F964",0x9EF5],
+ ["F965",0x9F09],
+ ["F966",0x9F47],
+ ["F967",0x9F78],
+ ["F968",0x9F7B],
+ ["F969",0x9F7A],
+ ["F96A",0x9F79],
+ ["F96B",0x571E],
+ ["F96C",0x7066],
+ ["F96D",0x7C6F],
+ ["F96E",0x883C],
+ ["F96F",0x8DB2],
+ ["F970",0x8EA6],
+ ["F971",0x91C3],
+ ["F972",0x9474],
+ ["F973",0x9478],
+ ["F974",0x9476],
+ ["F975",0x9475],
+ ["F976",0x9A60],
+ ["F977",0x9C74],
+ ["F978",0x9C73],
+ ["F979",0x9C71],
+ ["F97A",0x9C75],
+ ["F97B",0x9E14],
+ ["F97C",0x9E13],
+ ["F97D",0x9EF6],
+ ["F97E",0x9F0A],
+ ["F9A1",0x9FA4],
+ ["F9A2",0x7068],
+ ["F9A3",0x7065],
+ ["F9A4",0x7CF7],
+ ["F9A5",0x866A],
+ ["F9A6",0x883E],
+ ["F9A7",0x883D],
+ ["F9A8",0x883F],
+ ["F9A9",0x8B9E],
+ ["F9AA",0x8C9C],
+ ["F9AB",0x8EA9],
+ ["F9AC",0x8EC9],
+ ["F9AD",0x974B],
+ ["F9AE",0x9873],
+ ["F9AF",0x9874],
+ ["F9B0",0x98CC],
+ ["F9B1",0x9961],
+ ["F9B2",0x99AB],
+ ["F9B3",0x9A64],
+ ["F9B4",0x9A66],
+ ["F9B5",0x9A67],
+ ["F9B6",0x9B24],
+ ["F9B7",0x9E15],
+ ["F9B8",0x9E17],
+ ["F9B9",0x9F48],
+ ["F9BA",0x6207],
+ ["F9BB",0x6B1E],
+ ["F9BC",0x7227],
+ ["F9BD",0x864C],
+ ["F9BE",0x8EA8],
+ ["F9BF",0x9482],
+ ["F9C0",0x9480],
+ ["F9C1",0x9481],
+ ["F9C2",0x9A69],
+ ["F9C3",0x9A68],
+ ["F9C4",0x9B2E],
+ ["F9C5",0x9E19],
+ ["F9C6",0x7229],
+ ["F9C7",0x864B],
+ ["F9C8",0x8B9F],
+ ["F9C9",0x9483],
+ ["F9CA",0x9C79],
+ ["F9CB",0x9EB7],
+ ["F9CC",0x7675],
+ ["F9CD",0x9A6B],
+ ["F9CE",0x9C7A],
+ ["F9CF",0x9E1D],
+ ["F9D0",0x7069],
+ ["F9D1",0x706A],
+ ["F9D2",0x9EA4],
+ ["F9D3",0x9F7E],
+ ["F9D4",0x9F49],
+ ["F9D5",0x9F98],
+ ["F9D6",0x7881],
+ ["F9D7",0x92B9],
+ ["F9D8",0x88CF],
+ ["F9D9",0x58BB],
+ ["F9DA",0x6052],
+ ["F9DB",0x7CA7],
+ ["F9DC",0x5AFA],
+ ["F9DD",0x2554],
+ ["F9DE",0x2566],
+ ["F9DF",0x2557],
+ ["F9E0",0x2560],
+ ["F9E1",0x256C],
+ ["F9E2",0x2563],
+ ["F9E3",0x255A],
+ ["F9E4",0x2569],
+ ["F9E5",0x255D],
+ ["F9E6",0x2552],
+ ["F9E7",0x2564],
+ ["F9E8",0x2555],
+ ["F9E9",0x255E],
+ ["F9EA",0x256A],
+ ["F9EB",0x2561],
+ ["F9EC",0x2558],
+ ["F9ED",0x2567],
+ ["F9EE",0x255B],
+ ["F9EF",0x2553],
+ ["F9F0",0x2565],
+ ["F9F1",0x2556],
+ ["F9F2",0x255F],
+ ["F9F3",0x256B],
+ ["F9F4",0x2562],
+ ["F9F5",0x2559],
+ ["F9F6",0x2568],
+ ["F9F7",0x255C],
+ ["F9F8",0x2551],
+ ["F9F9",0x2550],
+ ["F9FA",0x256D],
+ ["F9FB",0x256E],
+ ["F9FC",0x2570],
+ ["F9FD",0x256F],
+ ["F9FE",0x2593],
+ ["FA40",0xE000],
+ ["FA41",0xE001],
+ ["FA42",0xE002],
+ ["FA43",0xE003],
+ ["FA44",0xE004],
+ ["FA45",0xE005],
+ ["FA46",0xE006],
+ ["FA47",0xE007],
+ ["FA48",0xE008],
+ ["FA49",0xE009],
+ ["FA4A",0xE00A],
+ ["FA4B",0xE00B],
+ ["FA4C",0xE00C],
+ ["FA4D",0xE00D],
+ ["FA4E",0xE00E],
+ ["FA4F",0xE00F],
+ ["FA50",0xE010],
+ ["FA51",0xE011],
+ ["FA52",0xE012],
+ ["FA53",0xE013],
+ ["FA54",0xE014],
+ ["FA55",0xE015],
+ ["FA56",0xE016],
+ ["FA57",0xE017],
+ ["FA58",0xE018],
+ ["FA59",0xE019],
+ ["FA5A",0xE01A],
+ ["FA5B",0xE01B],
+ ["FA5C",0xE01C],
+ ["FA5D",0xE01D],
+ ["FA5E",0xE01E],
+ ["FA5F",0xE01F],
+ ["FA60",0xE020],
+ ["FA61",0xE021],
+ ["FA62",0xE022],
+ ["FA63",0xE023],
+ ["FA64",0x7232],
+ ["FA65",0x723C],
+ ["FA66",0x7266],
+ ["FA67",0x7282],
+ ["FA68",0x728F],
+ ["FA69",0x729F],
+ ["FA6A",0x72AD],
+ ["FA6B",0x72B1],
+ ["FA6C",0x72B8],
+ ["FA6D",0x72BE],
+ ["FA6E",0x72CD],
+ ["FA6F",0x72DB],
+ ["FA70",0x7324],
+ ["FA71",0x732F],
+ ["FA72",0x7338],
+ ["FA73",0x7339],
+ ["FA74",0x73BD],
+ ["FA75",0x73CE],
+ ["FA76",0x73F1],
+ ["FA77",0x7476],
+ ["FA78",0x74A2],
+ ["FA79",0x7501],
+ ["FA7A",0x7519],
+ ["FA7B",0x7523],
+ ["FA7C",0x753C],
+ ["FA7D",0x7544],
+ ["FA7E",0x7549],
+ ["FAA1",0x754D],
+ ["FAA2",0x756D],
+ ["FAA3",0x7582],
+ ["FAA4",0x7583],
+ ["FAA5",0x7589],
+ ["FAA6",0x75AC],
+ ["FAA7",0x75D6],
+ ["FAA8",0x75E9],
+ ["FAA9",0x7640],
+ ["FAAA",0x764D],
+ ["FAAB",0x7654],
+ ["FAAC",0x7668],
+ ["FAAD",0x7680],
+ ["FAAE",0x7683],
+ ["FAAF",0x7690],
+ ["FAB0",0x76B7],
+ ["FAB1",0x76B9],
+ ["FAB2",0x770D],
+ ["FAB3",0x771E],
+ ["FAB4",0x7743],
+ ["FAB5",0x7818],
+ ["FAB6",0x781C],
+ ["FAB7",0x7839],
+ ["FAB8",0x783C],
+ ["FAB9",0x7847],
+ ["FABA",0x7856],
+ ["FABB",0x787A],
+ ["FABC",0x78B5],
+ ["FABD",0x78B9],
+ ["FABE",0x78C6],
+ ["FABF",0x78D9],
+ ["FAC0",0x7907],
+ ["FAC1",0x7930],
+ ["FAC2",0x7934],
+ ["FAC3",0x793B],
+ ["FAC4",0x7980],
+ ["FAC5",0x799D],
+ ["FAC6",0x79C3],
+ ["FAC7",0x79E1],
+ ["FAC8",0x7A06],
+ ["FAC9",0x7A0E],
+ ["FACA",0x7A43],
+ ["FACB",0x7A50],
+ ["FACC",0x7AC3],
+ ["FACD",0x7AD2],
+ ["FACE",0x7AE2],
+ ["FACF",0x7AE7],
+ ["FAD0",0x7AF8],
+ ["FAD1",0x7B36],
+ ["FAD2",0x7B62],
+ ["FAD3",0x7B6C],
+ ["FAD4",0x7B7A],
+ ["FAD5",0x7B7B],
+ ["FAD6",0x7B9A],
+ ["FAD7",0x7B9E],
+ ["FAD8",0x7B9F],
+ ["FAD9",0x7BA2],
+ ["FADA",0x7BA7],
+ ["FADB",0x7BF6],
+ ["FADC",0x7C12],
+ ["FADD",0x7C14],
+ ["FADE",0x7C4F],
+ ["FADF",0x7C56],
+ ["FAE0",0x7C58],
+ ["FAE1",0x7CAB],
+ ["FAE2",0x7CFA],
+ ["FAE3",0x7D48],
+ ["FAE4",0x7D4B],
+ ["FAE5",0x7D77],
+ ["FAE6",0x7DD4],
+ ["FAE7",0x7DD5],
+ ["FAE8",0x7DD6],
+ ["FAE9",0x7DE4],
+ ["FAEA",0x7E4D],
+ ["FAEB",0x7E5D],
+ ["FAEC",0x7E7F],
+ ["FAED",0x7E89],
+ ["FAEE",0x7E8E],
+ ["FAEF",0x7E92],
+ ["FAF0",0x7ED4],
+ ["FAF1",0x7EF1],
+ ["FAF2",0x7F12],
+ ["FAF3",0x7F30],
+ ["FAF4",0x7F71],
+ ["FAF5",0x7F82],
+ ["FAF6",0x7FAE],
+ ["FAF7",0x7FC6],
+ ["FAF8",0x8020],
+ ["FAF9",0x8022],
+ ["FAFA",0x8025],
+ ["FAFB",0x8031],
+ ["FAFC",0x805F],
+ ["FAFD",0x8068],
+ ["FAFE",0x80AC],
+ ["FB40",0x80B7],
+ ["FB41",0x519A],
+ ["FB42",0x5416],
+ ["FB43",0x5414],
+ ["FB44",0x34DF],
+ ["FB45",0x4C7D],
+ ["FB46",0x62C3],
+ ["FB47",0xE0A4],
+ ["FB48",0xE0A5],
+ ["FB49",0xE0A6],
+ ["FB4A",0x54CB],
+ ["FB4B",0xE0A8],
+ ["FB4C",0x55BC],
+ ["FB4D",0x80B6],
+ ["FB4E",0x51A7],
+ ["FB4F",0xE0AC],
+ ["FB50",0xE0AD],
+ ["FB51",0xE0AE],
+ ["FB52",0x5513],
+ ["FB53",0x8226],
+ ["FB54",0xE0B1],
+ ["FB55",0x551E],
+ ["FB56",0x55DE],
+ ["FB57",0x63B9],
+ ["FB58",0x6898],
+ ["FB59",0xE0B6],
+ ["FB5A",0x5502],
+ ["FB5B",0x5569],
+ ["FB5C",0x75B4],
+ ["FB5D",0x63FC],
+ ["FB5E",0x9E84],
+ ["FB5F",0x922A],
+ ["FB60",0xE0BD],
+ ["FB61",0xE0BE],
+ ["FB62",0xE0BF],
+ ["FB63",0x88C7],
+ ["FB64",0x609E],
+ ["FB65",0x5625],
+ ["FB66",0x7145],
+ ["FB67",0x5AF2],
+ ["FB68",0xE0C5],
+ ["FB69",0x528F],
+ ["FB6A",0x564F],
+ ["FB6B",0x7793],
+ ["FB6C",0x8786],
+ ["FB6D",0x8E2D],
+ ["FB6E",0x81B6],
+ ["FB6F",0x35FE],
+ ["FB70",0x71F6],
+ ["FB71",0xE0CE],
+ ["FB72",0x8804],
+ ["FB73",0x9385],
+ ["FB74",0xE0D1],
+ ["FB75",0xE0D2],
+ ["FB76",0x7666],
+ ["FB77",0xE0D4],
+ ["FB78",0x9C72],
+ ["FB79",0xE0D6],
+ ["FB7A",0x62CE],
+ ["FB7B",0xE0D8],
+ ["FB7C",0x9E96],
+ ["FB7D",0x4989],
+ ["FB7E",0x7CD3],
+ ["FBA1",0x8EDA],
+ ["FBA2",0x9EAB],
+ ["FBA3",0x64E7],
+ ["FBA4",0xE0DF],
+ ["FBA5",0x82AA],
+ ["FBA6",0x6767],
+ ["FBA7",0x6D72],
+ ["FBA8",0x7906],
+ ["FBA9",0x79C4],
+ ["FBAA",0x7F4E],
+ ["FBAB",0x87EE],
+ ["FBAC",0xE0E7],
+ ["FBAD",0x83BE],
+ ["FBAE",0x862F],
+ ["FBAF",0x89A5],
+ ["FBB0",0x460F],
+ ["FBB1",0xE0EC],
+ ["FBB2",0x98C8],
+ ["FBB3",0x9940],
+ ["FBB4",0x994D],
+ ["FBB5",0x9A0C],
+ ["FBB6",0x9AD7],
+ ["FBB7",0x9E98],
+ ["FBB8",0x9F26],
+ ["FBB9",0xE0F4],
+ ["FBBA",0x4F03],
+ ["FBBB",0xE0F6],
+ ["FBBC",0x4F39],
+ ["FBBD",0x4F32],
+ ["FBBE",0x4FAB],
+ ["FBBF",0x5056],
+ ["FBC0",0xE0FB],
+ ["FBC1",0x502E],
+ ["FBC2",0x50A6],
+ ["FBC3",0x50D9],
+ ["FBC4",0x510E],
+ ["FBC5",0x50ED],
+ ["FBC6",0x5101],
+ ["FBC7",0x51F4],
+ ["FBC8",0x521F],
+ ["FBC9",0x5260],
+ ["FBCA",0x5257],
+ ["FBCB",0x529A],
+ ["FBCC",0x52D1],
+ ["FBCD",0x52E0],
+ ["FBCE",0x52E1],
+ ["FBCF",0x51D3],
+ ["FBD0",0x51DF],
+ ["FBD1",0x7546],
+ ["FBD2",0x51FE],
+ ["FBD3",0x5332],
+ ["FBD4",0x532C],
+ ["FBD5",0x5333],
+ ["FBD6",0x53AB],
+ ["FBD7",0x53AA],
+ ["FBD8",0x9F8E],
+ ["FBD9",0x5469],
+ ["FBDA",0x549C],
+ ["FBDB",0x53DA],
+ ["FBDC",0x6ACA],
+ ["FBDD",0x5573],
+ ["FBDE",0xE119],
+ ["FBDF",0x35D6],
+ ["FBE0",0xE11B],
+ ["FBE1",0x5611],
+ ["FBE2",0x564D],
+ ["FBE3",0xE11E],
+ ["FBE4",0x5654],
+ ["FBE5",0x35F3],
+ ["FBE6",0xE121],
+ ["FBE7",0x5746],
+ ["FBE8",0x577A],
+ ["FBE9",0x5767],
+ ["FBEA",0x583A],
+ ["FBEB",0x57E6],
+ ["FBEC",0x57DD],
+ ["FBED",0x5840],
+ ["FBEE",0xE129],
+ ["FBEF",0x5826],
+ ["FBF0",0x58DC],
+ ["FBF1",0x59B7],
+ ["FBF2",0x59D9],
+ ["FBF3",0x5C20],
+ ["FBF4",0xE12F],
+ ["FBF5",0x5CD1],
+ ["FBF6",0x5CE9],
+ ["FBF7",0x5D46],
+ ["FBF8",0x5D8E],
+ ["FBF9",0xE134],
+ ["FBFA",0x5DF5],
+ ["FBFB",0x5E0B],
+ ["FBFC",0x5E12],
+ ["FBFD",0x5E2E],
+ ["FBFE",0x5E5E],
+ ["FC40",0xE13A],
+ ["FC41",0x5F4D],
+ ["FC42",0x7A7D],
+ ["FC43",0x5BC3],
+ ["FC44",0x7ABB],
+ ["FC45",0xE13F],
+ ["FC46",0xE140],
+ ["FC47",0x5FA4],
+ ["FC48",0x5FBA],
+ ["FC49",0x5FBC],
+ ["FC4A",0xE144],
+ ["FC4B",0x6077],
+ ["FC4C",0x60A4],
+ ["FC4D",0x60B3],
+ ["FC4E",0x60FD],
+ ["FC4F",0x6130],
+ ["FC50",0xE14A],
+ ["FC51",0x619C],
+ ["FC52",0x6159],
+ ["FC53",0x617D],
+ ["FC54",0x615C],
+ ["FC55",0x637F],
+ ["FC56",0x61E2],
+ ["FC57",0x70D5],
+ ["FC58",0x6239],
+ ["FC59",0x6268],
+ ["FC5A",0x6285],
+ ["FC5B",0x6282],
+ ["FC5C",0x62A6],
+ ["FC5D",0x62D5],
+ ["FC5E",0x6364],
+ ["FC5F",0x6335],
+ ["FC60",0x6490],
+ ["FC61",0x3A5C],
+ ["FC62",0x6648],
+ ["FC63",0x6667],
+ ["FC64",0x671E],
+ ["FC65",0x6803],
+ ["FC66",0x67AC],
+ ["FC67",0x67F9],
+ ["FC68",0x68B6],
+ ["FC69",0x692C],
+ ["FC6A",0x6901],
+ ["FC6B",0x6900],
+ ["FC6C",0x68CA],
+ ["FC6D",0x6973],
+ ["FC6E",0x6980],
+ ["FC6F",0x693E],
+ ["FC70",0xE16A],
+ ["FC71",0x69B2],
+ ["FC72",0x69C0],
+ ["FC73",0x698A],
+ ["FC74",0x69FA],
+ ["FC75",0x69E9],
+ ["FC76",0x6AB2],
+ ["FC77",0x6A52],
+ ["FC78",0x6A9D],
+ ["FC79",0x6B1D],
+ ["FC7A",0x6B52],
+ ["FC7B",0x6BFA],
+ ["FC7C",0x3CD1],
+ ["FC7D",0x6CCE],
+ ["FC7E",0x6E4F],
+ ["FCA1",0x6DB9],
+ ["FCA2",0x6F44],
+ ["FCA3",0xE17B],
+ ["FCA4",0x6FDA],
+ ["FCA5",0x7081],
+ ["FCA6",0x79CC],
+ ["FCA7",0x7134],
+ ["FCA8",0x3DCC],
+ ["FCA9",0x7176],
+ ["FCAA",0xE182],
+ ["FCAB",0xE183],
+ ["FCAC",0x7215],
+ ["FCAD",0x7250],
+ ["FCAE",0x7287],
+ ["FCAF",0x732C],
+ ["FCB0",0x72B2],
+ ["FCB1",0x72E2],
+ ["FCB2",0x7302],
+ ["FCB3",0x7348],
+ ["FCB4",0x7328],
+ ["FCB5",0x734F],
+ ["FCB6",0x7371],
+ ["FCB7",0x6585],
+ ["FCB8",0xE190],
+ ["FCB9",0x745D],
+ ["FCBA",0x7468],
+ ["FCBB",0x751E],
+ ["FCBC",0x7553],
+ ["FCBD",0x757A],
+ ["FCBE",0x76A1],
+ ["FCBF",0x76CC],
+ ["FCC0",0x7724],
+ ["FCC1",0x772B],
+ ["FCC2",0x4065],
+ ["FCC3",0x7853],
+ ["FCC4",0x78D3],
+ ["FCC5",0x78D8],
+ ["FCC6",0x9D7E],
+ ["FCC7",0x78AF],
+ ["FCC8",0xE1A0],
+ ["FCC9",0x6142],
+ ["FCCA",0x79A9],
+ ["FCCB",0x9C3A],
+ ["FCCC",0x79D4],
+ ["FCCD",0xE1A5],
+ ["FCCE",0x7A2D],
+ ["FCCF",0x7A3E],
+ ["FCD0",0x7A49],
+ ["FCD1",0x7ADD],
+ ["FCD2",0x7ADA],
+ ["FCD3",0x75C3],
+ ["FCD4",0x7607],
+ ["FCD5",0x7602],
+ ["FCD6",0xE1AE],
+ ["FCD7",0x7667],
+ ["FCD8",0x766F],
+ ["FCD9",0x5620],
+ ["FCDA",0x8A67],
+ ["FCDB",0x9F17],
+ ["FCDC",0x7B1F],
+ ["FCDD",0x7B92],
+ ["FCDE",0x7BA3],
+ ["FCDF",0x7BCF],
+ ["FCE0",0xE1B8],
+ ["FCE1",0x7BFC],
+ ["FCE2",0x7C42],
+ ["FCE3",0x7C51],
+ ["FCE4",0x7C5D],
+ ["FCE5",0x7C70],
+ ["FCE6",0x7C7E],
+ ["FCE7",0x7C86],
+ ["FCE8",0x7C83],
+ ["FCE9",0x7CAC],
+ ["FCEA",0x7CC7],
+ ["FCEB",0x7CC2],
+ ["FCEC",0xE1C4],
+ ["FCED",0x7CDA],
+ ["FCEE",0xE1C6],
+ ["FCEF",0x7D4D],
+ ["FCF0",0x7D5A],
+ ["FCF1",0x7DF5],
+ ["FCF2",0x7E27],
+ ["FCF3",0x7E6E],
+ ["FCF4",0x9E95],
+ ["FCF5",0x5273],
+ ["FCF6",0x801D],
+ ["FCF7",0x8062],
+ ["FCF8",0x8063],
+ ["FCF9",0x8066],
+ ["FCFA",0x805B],
+ ["FCFB",0x80A6],
+ ["FCFC",0x8103],
+ ["FCFD",0x9E81],
+ ["FCFE",0x81C8],
+ ["FD40",0xE1D7],
+ ["FD41",0x8FA0],
+ ["FD42",0x81F6],
+ ["FD43",0x821A],
+ ["FD44",0xE1DB],
+ ["FD45",0x8771],
+ ["FD46",0x87A9],
+ ["FD47",0x878C],
+ ["FD48",0x9E9E],
+ ["FD49",0x87C1],
+ ["FD4A",0x9E1C],
+ ["FD4B",0xE1E2],
+ ["FD4C",0x87D6],
+ ["FD4D",0x87F5],
+ ["FD4E",0x880F],
+ ["FD4F",0x8818],
+ ["FD50",0x882D],
+ ["FD51",0x8842],
+ ["FD52",0x8845],
+ ["FD53",0x9C35],
+ ["FD54",0x886E],
+ ["FD55",0x88AA],
+ ["FD56",0x88A0],
+ ["FD57",0x629D],
+ ["FD58",0x8943],
+ ["FD59",0x894D],
+ ["FD5A",0x7172],
+ ["FD5B",0x885E],
+ ["FD5C",0xE1F3],
+ ["FD5D",0x82FD],
+ ["FD5E",0x44B7],
+ ["FD5F",0x82D0],
+ ["FD60",0x8385],
+ ["FD61",0x9D02],
+ ["FD62",0x9F69],
+ ["FD63",0x8420],
+ ["FD64",0xE1FB],
+ ["FD65",0x84DA],
+ ["FD66",0x84AD],
+ ["FD67",0x44FB],
+ ["FD68",0x854B],
+ ["FD69",0xE200],
+ ["FD6A",0x8602],
+ ["FD6B",0x8610],
+ ["FD6C",0x63D1],
+ ["FD6D",0x8989],
+ ["FD6E",0x898A],
+ ["FD6F",0x8994],
+ ["FD70",0x9C45],
+ ["FD71",0x89BC],
+ ["FD72",0x8A7E],
+ ["FD73",0x8A49],
+ ["FD74",0x8B0C],
+ ["FD75",0x8B43],
+ ["FD76",0x8B81],
+ ["FD77",0x8B4C],
+ ["FD78",0xE20F],
+ ["FD79",0x8CAD],
+ ["FD7A",0x8CEB],
+ ["FD7B",0x8CF7],
+ ["FD7C",0x8D0C],
+ ["FD7D",0x8D82],
+ ["FD7E",0x8DA6],
+ ["FDA1",0x8DD4],
+ ["FDA2",0x8E28],
+ ["FDA3",0x8E4F],
+ ["FDA4",0x8E77],
+ ["FDA5",0x8E75],
+ ["FDA6",0x8EA7],
+ ["FDA7",0x8F19],
+ ["FDA8",0xE21D],
+ ["FDA9",0x8F5C],
+ ["FDAA",0x9D44],
+ ["FDAB",0x90C4],
+ ["FDAC",0x9151],
+ ["FDAD",0xE222],
+ ["FDAE",0x915C],
+ ["FDAF",0x9159],
+ ["FDB0",0x9167],
+ ["FDB1",0x917C],
+ ["FDB2",0x918E],
+ ["FDB3",0x91BB],
+ ["FDB4",0x9EA8],
+ ["FDB5",0x9056],
+ ["FDB6",0x904C],
+ ["FDB7",0x91FE],
+ ["FDB8",0x9262],
+ ["FDB9",0x92BE],
+ ["FDBA",0x936B],
+ ["FDBB",0x936E],
+ ["FDBC",0x93BA],
+ ["FDBD",0x9427],
+ ["FDBE",0x9597],
+ ["FDBF",0x95A7],
+ ["FDC0",0xE235],
+ ["FDC1",0x9638],
+ ["FDC2",0xE237],
+ ["FDC3",0x9683],
+ ["FDC4",0x9696],
+ ["FDC5",0x9681],
+ ["FDC6",0x96BD],
+ ["FDC7",0x9703],
+ ["FDC8",0x9721],
+ ["FDC9",0x9731],
+ ["FDCA",0x975F],
+ ["FDCB",0x979F],
+ ["FDCC",0x97B4],
+ ["FDCD",0x97B8],
+ ["FDCE",0x97BA],
+ ["FDCF",0x97BE],
+ ["FDD0",0x97C8],
+ ["FDD1",0x9EBF],
+ ["FDD2",0x981F],
+ ["FDD3",0x982E],
+ ["FDD4",0x9FA5],
+ ["FDD5",0x9847],
+ ["FDD6",0x984B],
+ ["FDD7",0x9866],
+ ["FDD8",0x986C],
+ ["FDD9",0x98B4],
+ ["FDDA",0x9F5A],
+ ["FDDB",0x98DC],
+ ["FDDC",0x98E6],
+ ["FDDD",0x9942],
+ ["FDDE",0x9939],
+ ["FDDF",0x993B],
+ ["FDE0",0x9F53],
+ ["FDE1",0x994A],
+ ["FDE2",0x9F45],
+ ["FDE3",0x4B7E],
+ ["FDE4",0x99DA],
+ ["FDE5",0x7AC8],
+ ["FDE6",0x9ABA],
+ ["FDE7",0x9ABD],
+ ["FDE8",0x9F02],
+ ["FDE9",0x9B2A],
+ ["FDEA",0xE25F],
+ ["FDEB",0x9B2D],
+ ["FDEC",0x9AE2],
+ ["FDED",0x9B02],
+ ["FDEE",0x9AFF],
+ ["FDEF",0x4C07],
+ ["FDF0",0x9B09],
+ ["FDF1",0x4C04],
+ ["FDF2",0x4C3B],
+ ["FDF3",0x9B8F],
+ ["FDF4",0x9B9D],
+ ["FDF5",0x9BB0],
+ ["FDF6",0x9C0C],
+ ["FDF7",0x9C15],
+ ["FDF8",0x9C0A],
+ ["FDF9",0x9BFF],
+ ["FDFA",0x9C2E],
+ ["FDFB",0x80E8],
+ ["FDFC",0x80E9],
+ ["FDFD",0x80EC],
+ ["FDFE",0x810E],
+ ["FE40",0x6C39],
+ ["FE41",0x4E6A],
+ ["FE42",0x9641],
+ ["FE43",0x58F2],
+ ["FE44",0x7962],
+ ["FE45",0x6822],
+ ["FE46",0xE27A],
+ ["FE47",0xE27B],
+ ["FE48",0x8107],
+ ["FE49",0x57D7],
+ ["FE4A",0x44EA],
+ ["FE4B",0x6435],
+ ["FE4C",0x8534],
+ ["FE4D",0x40DF],
+ ["FE4E",0xE282],
+ ["FE4F",0x691A],
+ ["FE50",0x9C02],
+ ["FE51",0x75B1],
+ ["FE52",0x83D3],
+ ["FE53",0x7171],
+ ["FE54",0x6A0B],
+ ["FE55",0xE289],
+ ["FE56",0x6A7A],
+ ["FE57",0x9AF4],
+ ["FE58",0xE28C],
+ ["FE59",0xE28D],
+ ["FE5A",0x77B9],
+ ["FE5B",0x6530],
+ ["FE5C",0x6D96],
+ ["FE5D",0x5637],
+ ["FE5E",0x6725],
+ ["FE5F",0x6A2B],
+ ["FE60",0x7D5D],
+ ["FE61",0x9061],
+ ["FE62",0x4E98],
+ ["FE63",0x7CA6],
+ ["FE64",0x7B39],
+ ["FE65",0xE299],
+ ["FE66",0x5975],
+ ["FE67",0x36C7],
+ ["FE68",0x707F],
+ ["FE69",0xE29D],
+ ["FE6A",0x6E8B],
+ ["FE6B",0xE29F],
+ ["FE6C",0xE2A0],
+ ["FE6D",0x975D],
+ ["FE6E",0x92D0],
+ ["FE6F",0x5754],
+ ["FE70",0xE2A4],
+ ["FE71",0x3ED9],
+ ["FE72",0xE2A6],
+ ["FE73",0xE2A7],
+ ["FE74",0x6199],
+ ["FE75",0x7460],
+ ["FE76",0x713F],
+ ["FE77",0x792E],
+ ["FE78",0x5A96],
+ ["FE79",0x9348],
+ ["FE7A",0x668E],
+ ["FE7B",0x4FFD],
+ ["FE7C",0x9341],
+ ["FE7D",0x3654],
+ ["FE7E",0x5D75],
+ ["FEA1",0x701E],
+ ["FEA2",0x657B],
+ ["FEA3",0x708D],
+ ["FEA4",0x5ECD],
+ ["FEA5",0xE2B7],
+ ["FEA6",0x60A7],
+ ["FEA7",0x7AB0],
+ ["FEA8",0x5F63],
+ ["FEA9",0xE2BB],
+ ["FEAA",0x73F7],
+ ["FEAB",0xE2BD],
+ ["FEAC",0x7468],
+ ["FEAD",0x75B4],
+ ["FEAE",0xE2C0],
+ ["FEAF",0x9B69],
+ ["FEB0",0x00BD],
+ ["FEB1",0x2153],
+ ["FEB2",0x2154],
+ ["FEB3",0x00BC],
+ ["FEB4",0x00BE],
+ ["FEB5",0x2155],
+ ["FEB6",0x2156],
+ ["FEB7",0x2157],
+ ["FEB8",0x2158],
+ ["FEB9",0x2159],
+ ["FEBA",0x215A],
+ ["FEBB",0x8692],
+ ["FEBC",0x86A0],
+ ["FEBD",0x86AD],
+ ["FEBE",0x86B2],
+ ["FEBF",0x87A5],
+ ["FEC0",0x87B1],
+ ["FEC1",0x215B],
+ ["FEC2",0x215C],
+ ["FEC3",0x215D],
+ ["FEC4",0x215E],
+ ["FEC5",0x87DA],
+ ["FEC6",0x884F],
+ ["FEC7",0x8860],
+ ["FEC8",0x8887],
+ ["FEC9",0x888F],
+ ["FECA",0x8890],
+ ["FECB",0x88E6],
+ ["FECC",0x88FF],
+ ["FECD",0x8900],
+ ["FECE",0x8924],
+ ["FECF",0x8947],
+ ["FED0",0x8954],
+ ["FED1",0x8965],
+ ["FED2",0x8980],
+ ["FED3",0x8991],
+ ["FED4",0x8A1C],
+ ["FED5",0x8A29],
+ ["FED6",0x8A2B],
+ ["FED7",0x8A38],
+ ["FED8",0x8A3D],
+ ["FED9",0x2312],
+ ["FEDA",0x8A90],
+ ["FEDB",0x8A94],
+ ["FEDC",0x8A9C],
+ ["FEDD",0x8AA9],
+ ["FEDE",0x8AAF],
+ ["FEDF",0x8AB4],
+ ["FEE0",0x8AEA],
+ ["FEE1",0x8B1F],
+ ["FEE2",0x2030],
+ ["FEE3",0x8B3F],
+ ["FEE4",0x8B4D],
+ ["FEE5",0x8B5E],
+ ["FEE6",0x8B62],
+ ["FEE7",0x8B69],
+ ["FEE8",0x8B9B],
+ ["FEE9",0x8C51],
+ ["FEEA",0x8C9B],
+ ["FEEB",0x8C9F],
+ ["FEEC",0x8CD4],
+ ["FEED",0x8CD6],
+ ["FEEE",0x8112],
+ ["FEEF",0x8131],
+ ["FEF0",0x8136],
+ ["FEF1",0x815F],
+ ["FEF2",0x816D],
+ ["FEF3",0x817D],
+ ["FEF4",0x8193],
+ ["FEF5",0x81AA],
+ ["FEF6",0x81B8],
+ ["FEF7",0x81C1],
+ ["FEF8",0x8229],
+ ["FEF9",0x822D],
+ ["FEFA",0x822E],
+ ["FEFB",0x823E],
+ ["FEFC",0x8262],
+ ["FEFD",0x826A],
+ ["FEFE",0x8288],
+] \ No newline at end of file
diff --git a/enc/trans/big5.trans b/enc/trans/big5.trans
index c91b821bba..a808965f17 100644
--- a/enc/trans/big5.trans
+++ b/enc/trans/big5.trans
@@ -3,12 +3,17 @@
<%
require "big5-tbl"
require "big5-hkscs-tbl"
+ require "big5-uao-tbl"
transcode_tblgen "Big5", "UTF-8", [["{00-7f}", :nomap], *BIG5_TO_UCS_TBL]
transcode_tblgen "UTF-8", "Big5", [["{00-7f}", :nomap], *BIG5_TO_UCS_TBL.map {|a,b| [b,a] }]
transcode_tblgen "Big5-HKSCS", "UTF-8", [["{00-7f}", :nomap], *BIG5_HKSCS_TO_UCS_TBL]
transcode_tblgen "UTF-8", "Big5-HKSCS", [["{00-7f}", :nomap], *BIG5_HKSCS_TO_UCS_TBL.map {|a,b| [b,a] }]
+
+ transcode_tblgen "Big5-UAO", "UTF-8", [["{00-7f}", :nomap], *BIG5_UAO_TO_UCS_TBL]
+ transcode_tblgen "UTF-8", "Big5-UAO", [["{00-7f}", :nomap], *BIG5_UAO_TO_UCS_TBL.map {|a,b| [b,a] }]
+
%>
<%= transcode_generated_code %>
diff --git a/enc/trans/gb18030-tbl.rb b/enc/trans/gb18030-tbl.rb
index 17a01d8885..e1c29deeb1 100644
--- a/enc/trans/gb18030-tbl.rb
+++ b/enc/trans/gb18030-tbl.rb
@@ -1,4 +1,36 @@
GB18030_TO_UCS_TBL = [
+ ["81308130",0x80],
+ ["81308131",0x81],
+ ["81308132",0x82],
+ ["81308133",0x83],
+ ["81308134",0x84],
+ ["81308135",0x85],
+ ["81308136",0x86],
+ ["81308137",0x87],
+ ["81308138",0x88],
+ ["81308139",0x89],
+ ["81308230",0x8A],
+ ["81308231",0x8B],
+ ["81308232",0x8C],
+ ["81308233",0x8D],
+ ["81308234",0x8E],
+ ["81308235",0x8F],
+ ["81308236",0x90],
+ ["81308237",0x91],
+ ["81308238",0x92],
+ ["81308239",0x93],
+ ["81308330",0x94],
+ ["81308331",0x95],
+ ["81308332",0x96],
+ ["81308333",0x97],
+ ["81308334",0x98],
+ ["81308335",0x99],
+ ["81308336",0x9A],
+ ["81308337",0x9B],
+ ["81308338",0x9C],
+ ["81308339",0x9D],
+ ["81308430",0x9E],
+ ["81308431",0x9F],
["81308432",0xA0],
["81308433",0xA1],
["81308434",0xA2],
diff --git a/enc/trans/gb18030.trans b/enc/trans/gb18030.trans
index 700522c9f0..c7da4c64b4 100644
--- a/enc/trans/gb18030.trans
+++ b/enc/trans/gb18030.trans
@@ -2,16 +2,64 @@
<%
require "gb18030-tbl"
+
+ def linear(code)
+ bytes = [code].pack('H8').unpack 'C4'
+ ((bytes[0]*10+bytes[1])*126+bytes[2])*10+bytes[3]
+ end
+
+ def calculate_differences_gb_utf(table)
+ table.collect do |code|
+ code = code.dup
+ if code[0].length == 4
+ if code[1] < 0x800 # GB-18030: 2 bytes, UTF-8: 2 bytes
+ # do nothing
+ else # GB-18030: 2 bytes, UTF-8: 3 bytes
+ gb_linear2b = code[0].to_i(16)
+ diff2b = gb_linear2b - code[1] + 24055
+ code[1] = "funsio(#{diff2b})"
+ end
+ else
+ if code[1] < 0x800 # GB-18030: 4 bytes, UTF-8: 2 bytes
+ # do nothing
+ else # GB-18030: 4 bytes, UTF-8: 3 bytes
+ gb_linear4b = linear(code[0])
+ diff4b = gb_linear4b - code[1] - 0x170000
+ code[1] = "funsio(#{diff4b})"
+ end
+ end
+ code
+ end
+ end
+
+ def calculate_differences_utf_gb(table)
+ table_rev = table.map{|a,b| [b,a]}
+ table_rev.collect do |code|
+ code = code.dup
+ if code[0] >= 0x800
+ if code[1].length == 4 #GB18030 2byte UTF-8 3byte
+ gb_linear2b = code[1].to_i(16)
+ diff2b = gb_linear2b - code[0] + 24055
+ code[1] = "funsio(#{diff2b})"
+ else # GB-18030: 4 bytes, UTF-8: 3 bytes
+ gb_linear4b = linear(code[1])
+ diff4b = gb_linear4b - code[0] - 0x170000
+ code[1] = "funsio(#{diff4b})"
+ end
+ end
+ code
+ end
+ end
transcode_tbl_only "GB18030", "UTF-8", [["{00-7f}", :nomap]] +
- GB18030_TO_UCS_TBL + [
+ calculate_differences_gb_utf(GB18030_TO_UCS_TBL) + [
["{90-e2}{30-39}{81-fe}{30-39}", :func_so],
["e3{30-31}{81-fe}{30-39}", :func_so],
["e332{81-99}{30-39}", :func_so],
["e3329a{30-35}", :func_so], # "E3329A35" is U+10FFFF
]
transcode_tbl_only "UTF-8", "GB18030", [["{00-7f}", :nomap]] +
- GB18030_TO_UCS_TBL.map {|a,b| [b,a] } + [
+ calculate_differences_utf_gb(GB18030_TO_UCS_TBL) + [
["f0{90-bf}{80-bf}{80-bf}", :func_so],
["{f1-f3}{80-bf}{80-bf}{80-bf}", :func_so],
["f4{80-8f}{80-bf}{80-bf}", :func_so]
@@ -20,6 +68,7 @@
<%= transcode_generated_code %>
+/* GB18030 4byte, UTF-8 4byte*/
static ssize_t
fun_so_from_gb18030(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
{
@@ -33,6 +82,7 @@ fun_so_from_gb18030(void *statep, const unsigned char *s, size_t l, unsigned cha
return 4;
}
+/* GB18030 4byte, UTF-8 4byte*/
static ssize_t
fun_so_to_gb18030(void *statep, const unsigned char *s, size_t l, unsigned char *o, size_t osize)
{
@@ -49,6 +99,56 @@ fun_so_to_gb18030(void *statep, const unsigned char *s, size_t l, unsigned char
return 4;
}
+/* GB18030 2byte, UTF-8 3byte and GB18030 4byte, UTF-8 3byte*/
+static ssize_t
+fun_sio_from_gb18030(void *statep, const unsigned char *s, size_t l, VALUE info, unsigned char *o, size_t osize)
+{
+ unsigned int diff = (unsigned int)(info >> 8);
+ unsigned int u; /* Unicode Scalar Value */
+ if (diff & 0x20000) { /* GB18030 4 bytes */
+ u = ((s[0]*10+s[1])*126+s[2])*10+s[3] - diff - 0x170000;
+ }
+ else { /* GB18030 2 bytes */
+ u = s[0]*256 + s[1] + 24055 - diff;
+ }
+ o[0] = 0xE0 | (u>>12);
+ o[1] = 0x80 | ((u>>6)&0x3F);
+ o[2] = 0x80 | (u&0x3F);
+ return 3;
+}
+
+/* GB18030 2byte, UTF-8 3byte and GB18030 4byte, UTF-8 3byte*/
+static ssize_t
+fun_sio_to_gb18030(void *statep, const unsigned char *s, size_t l, VALUE info, unsigned char *o, size_t osize)
+{
+ unsigned int diff = (unsigned int)(info >> 8);
+ unsigned int u; /* Unicode Scalar Value */
+
+ u = ((s[0]&0x0F)<<12) | ((s[1]&0x3F)<<6) | (s[2]&0x3F);
+
+ if (diff & 0x20000) { /* GB18030 4 bytes */
+ u += (diff + 0x170000);
+ u -= 1688980;
+ u += 0x2;
+ o[3] = 0x30 + u%10;
+ u /= 10;
+ u += 0x32;
+ o[2] = 0x81 + u%126;
+ u /= 126;
+ u += 0x1;
+ o[1] = 0x30 + u%10;
+ u /= 10;
+ o[0] = 0x81 + u;
+ return 4;
+ }
+ else { /* GB18030 2 bytes */
+ u += (diff - 24055);
+ o[1] = u%256;
+ o[0] = u/256;
+ return 2;
+ }
+}
+
static const rb_transcoder
rb_from_GB18030 = {
@@ -56,11 +156,11 @@ rb_from_GB18030 = {
TRANSCODE_TABLE_INFO,
1, /* input_unit_length */
4, /* max_input */
- 3, /* max_output */
+ 4, /* max_output */
asciicompat_converter, /* asciicompat_type */
0, NULL, NULL, /* state_size, state_init, state_fini */
NULL, NULL, NULL, fun_so_from_gb18030,
- NULL, NULL, NULL
+ NULL, NULL, NULL, fun_sio_from_gb18030
};
static const rb_transcoder
rb_to_GB18030 = {
@@ -72,7 +172,7 @@ rb_to_GB18030 = {
asciicompat_converter, /* asciicompat_type */
0, NULL, NULL, /* state_size, state_init, state_fini */
NULL, NULL, NULL, fun_so_to_gb18030,
- NULL, NULL, NULL
+ NULL, NULL, NULL, fun_sio_to_gb18030
};
diff --git a/enc/trans/newline.trans b/enc/trans/newline.trans
index d62034aa49..a200ec00a7 100644
--- a/enc/trans/newline.trans
+++ b/enc/trans/newline.trans
@@ -48,26 +48,26 @@ fun_so_universal_newline(void *statep, const unsigned char *s, size_t l, unsigne
if (s[0] == '\n') {
if (STATE == NORMAL) {
NEWLINES_MET |= MET_LF;
- o[0] = '\n';
- len = 1;
}
else { /* JUST_AFTER_CR */
NEWLINES_MET |= MET_CRLF;
- len = 0;
}
+ o[0] = '\n';
+ len = 1;
STATE = NORMAL;
}
else {
- if (STATE == JUST_AFTER_CR)
- NEWLINES_MET |= MET_CR;
- if (s[0] == '\r') {
+ len = 0;
+ if (STATE == JUST_AFTER_CR) {
o[0] = '\n';
len = 1;
+ NEWLINES_MET |= MET_CR;
+ }
+ if (s[0] == '\r') {
STATE = JUST_AFTER_CR;
}
else {
- o[0] = s[0];
- len = 1;
+ o[len++] = s[0];
STATE = NORMAL;
}
}
@@ -79,10 +79,14 @@ static ssize_t
universal_newline_finish(void *statep, unsigned char *o, size_t osize)
{
unsigned char *sp = statep;
- if (STATE == JUST_AFTER_CR)
+ int len = 0;
+ if (STATE == JUST_AFTER_CR) {
+ o[0] = '\n';
+ len = 1;
NEWLINES_MET |= MET_CR;
+ }
STATE = NORMAL;
- return 0;
+ return len;
}
static const rb_transcoder
@@ -91,7 +95,7 @@ rb_universal_newline = {
TRANSCODE_TABLE_INFO,
1, /* input_unit_length */
1, /* max_input */
- 1, /* max_output */
+ 2, /* max_output */
asciicompat_converter, /* asciicompat_type */
2, universal_newline_init, universal_newline_init, /* state_size, state_init, state_fini */
NULL, NULL, NULL, fun_so_universal_newline,
diff --git a/enc/trans/utf8_mac.trans b/enc/trans/utf8_mac.trans
index 7569c34ac0..ecda465355 100644
--- a/enc/trans/utf8_mac.trans
+++ b/enc/trans/utf8_mac.trans
@@ -85,10 +85,10 @@ buf_shift(struct from_utf8_mac_status *sp)
void
buf_shift_char(struct from_utf8_mac_status *sp)
{
- while (sp->beg != sp->end) {
+ if (sp->beg == sp->end) return;
+ do {
buf_shift(sp);
- if ((sp->buf[sp->beg] & 0xC0) != 0x80) break;
- }
+ } while (sp->beg != sp->end && (sp->buf[sp->beg] & 0xC0) == 0x80);
}
void
diff --git a/encoding.c b/encoding.c
index 34e89d08d8..2816cd0002 100644
--- a/encoding.c
+++ b/encoding.c
@@ -69,26 +69,30 @@ enc_new(rb_encoding *encoding)
return TypedData_Wrap_Struct(rb_cEncoding, &encoding_data_type, encoding);
}
-VALUE
-rb_enc_from_encoding(rb_encoding *encoding)
+static VALUE
+rb_enc_from_encoding_index(int idx)
{
VALUE list, enc;
- int idx;
- if (!encoding) return Qnil;
- idx = ENC_TO_ENCINDEX(encoding);
if (!(list = rb_encoding_list)) {
- rb_bug("rb_enc_from_encoding(%d\"%s\"): no rb_encoding_list",
- idx, rb_enc_name(encoding));
+ rb_bug("rb_enc_from_encoding_index(%d): no rb_encoding_list", idx);
}
enc = rb_ary_entry(list, idx);
if (NIL_P(enc)) {
- rb_bug("rb_enc_from_encoding(%d\"%s\"): not created yet",
- idx, rb_enc_name(encoding));
+ rb_bug("rb_enc_from_encoding_index(%d): not created yet", idx);
}
return enc;
}
+VALUE
+rb_enc_from_encoding(rb_encoding *encoding)
+{
+ int idx;
+ if (!encoding) return Qnil;
+ idx = ENC_TO_ENCINDEX(encoding);
+ return rb_enc_from_encoding_index(idx);
+}
+
static int enc_autoload(rb_encoding *);
static int
@@ -311,8 +315,25 @@ rb_enc_replicate(const char *name, rb_encoding *encoding)
return idx;
}
+/*
+ * call-seq:
+ * enc.replicate(name) => encoding
+ *
+ * Returns a replicated encoding of _enc whose name is _name_.
+ * The new encoding should have the same byte structure of _enc_.
+ * If _name_ is used by another encoding, raise ArgumentError.
+ *
+ */
+static VALUE
+enc_replicate(VALUE encoding, VALUE name)
+{
+ return rb_enc_from_encoding_index(
+ rb_enc_replicate(RSTRING_PTR(name),
+ rb_to_encoding(encoding)));
+}
+
static int
-enc_replicate(int idx, const char *name, rb_encoding *origenc)
+enc_replicate_with_index(const char *name, rb_encoding *origenc, int idx)
{
if (idx < 0) {
idx = enc_register(name, origenc);
@@ -336,7 +357,7 @@ rb_encdb_replicate(const char *name, const char *orig)
if (origidx < 0) {
origidx = enc_register(orig, 0);
}
- return enc_replicate(idx, name, rb_enc_from_index(origidx));
+ return enc_replicate_with_index(name, rb_enc_from_index(origidx), idx);
}
int
@@ -352,8 +373,8 @@ rb_define_dummy_encoding(const char *name)
int
rb_encdb_dummy(const char *name)
{
- int index = enc_replicate(rb_enc_registered(name), name,
- rb_ascii8bit_encoding());
+ int index = enc_replicate_with_index(name, rb_ascii8bit_encoding(),
+ rb_enc_registered(name));
rb_encoding *enc = enc_table.list[index].enc;
ENC_SET_DUMMY(enc);
@@ -666,7 +687,7 @@ rb_enc_associate_index(VALUE obj, int idx)
{
/* enc_check_capable(obj);*/
if (rb_enc_get_index(obj) == idx)
- return obj;
+ return obj;
if (SPECIAL_CONST_P(obj)) {
rb_raise(rb_eArgError, "cannot set encoding");
}
@@ -1118,7 +1139,7 @@ rb_locale_encoding(void)
}
static int
-rb_filesystem_encindex(void)
+enc_set_filesystem_encoding(void)
{
int idx;
#if defined NO_LOCALE_CHARMAP
@@ -1131,11 +1152,19 @@ rb_filesystem_encindex(void)
#elif defined __APPLE__
idx = rb_utf8_encindex();
#else
- idx = rb_locale_encindex();
+ idx = rb_enc_to_index(rb_default_external_encoding());
#endif
- if (rb_enc_registered("filesystem") < 0) enc_alias_internal("filesystem", idx);
+ enc_alias_internal("filesystem", idx);
+ return idx;
+}
+static int
+rb_filesystem_encindex(void)
+{
+ int idx = rb_enc_registered("filesystem");
+ if (idx < 0)
+ idx = enc_set_filesystem_encoding();
return idx;
}
@@ -1150,6 +1179,8 @@ struct default_encoding {
rb_encoding *enc;
};
+static struct default_encoding default_external = {0};
+
static int
enc_set_default_encoding(struct default_encoding *def, VALUE encoding, const char *name)
{
@@ -1171,11 +1202,12 @@ enc_set_default_encoding(struct default_encoding *def, VALUE encoding, const cha
enc_alias_internal(name, def->index);
}
+ if (def == &default_external)
+ enc_set_filesystem_encoding();
+
return overridden;
}
-static struct default_encoding default_external = {0};
-
rb_encoding *
rb_default_external_encoding(void)
{
@@ -1480,12 +1512,14 @@ InitVM_Encoding(void)
rb_cEncoding = rb_define_class("Encoding", rb_cObject);
rb_undef_alloc_func(rb_cEncoding);
+ rb_undef_method(CLASS_OF(rb_cEncoding), "new");
rb_define_method(rb_cEncoding, "to_s", enc_name, 0);
rb_define_method(rb_cEncoding, "inspect", enc_inspect, 0);
rb_define_method(rb_cEncoding, "name", enc_name, 0);
rb_define_method(rb_cEncoding, "names", enc_names, 0);
rb_define_method(rb_cEncoding, "dummy?", enc_dummy_p, 0);
rb_define_method(rb_cEncoding, "ascii_compatible?", enc_ascii_compatible_p, 0);
+ rb_define_method(rb_cEncoding, "replicate", enc_replicate, 1);
rb_define_singleton_method(rb_cEncoding, "list", enc_list, 0);
rb_define_singleton_method(rb_cEncoding, "name_list", rb_enc_name_list, 0);
rb_define_singleton_method(rb_cEncoding, "aliases", rb_enc_aliases, 0);
diff --git a/enum.c b/enum.c
index af0d46c8ba..07fdc49da3 100644
--- a/enum.c
+++ b/enum.c
@@ -1617,6 +1617,185 @@ enum_reverse_each(int argc, VALUE *argv, VALUE obj)
static VALUE
+each_val_i(VALUE i, VALUE p, int argc, VALUE *argv)
+{
+ ENUM_WANT_SVALUE();
+ rb_yield(i);
+ return Qnil;
+}
+
+/*
+ * call-seq:
+ * enum.each_entry {|obj| block} => enum
+ *
+ * Calls <i>block</i> once for each element in <i>self</i>, passing that
+ * element as a parameter, converting multiple values from yield to an
+ * array.
+ *
+ * class Foo
+ * include Enumerable
+ * def each
+ * yield 1
+ * yield 1,2
+ * end
+ * end
+ * Foo.new.each_entry{|o| print o, " -- "}
+ *
+ * produces:
+ *
+ * 1 -- [1, 2] --
+ */
+
+static VALUE
+enum_each_entry(int argc, VALUE *argv, VALUE obj)
+{
+ RETURN_ENUMERATOR(obj, argc, argv);
+ rb_block_call(obj, id_each, argc, argv, each_val_i, 0);
+ return obj;
+}
+
+static VALUE
+each_slice_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+ VALUE ary = memo[0];
+ VALUE v = Qnil;
+ long size = (long)memo[1];
+ ENUM_WANT_SVALUE();
+
+ rb_ary_push(ary, i);
+
+ if (RARRAY_LEN(ary) == size) {
+ v = rb_yield(ary);
+ memo[0] = rb_ary_new2(size);
+ }
+
+ return v;
+}
+
+/*
+ * call-seq:
+ * e.each_slice(n) {...}
+ * e.each_slice(n)
+ *
+ * Iterates the given block for each slice of <n> elements. If no
+ * block is given, returns an enumerator.
+ *
+ * e.g.:
+ * (1..10).each_slice(3) {|a| p a}
+ * # outputs below
+ * [1, 2, 3]
+ * [4, 5, 6]
+ * [7, 8, 9]
+ * [10]
+ *
+ */
+static VALUE
+enum_each_slice(VALUE obj, VALUE n)
+{
+ long size = NUM2LONG(n);
+ VALUE args[2], ary;
+
+ if (size <= 0) rb_raise(rb_eArgError, "invalid slice size");
+ RETURN_ENUMERATOR(obj, 1, &n);
+ args[0] = rb_ary_new2(size);
+ args[1] = (VALUE)size;
+
+ rb_block_call(obj, id_each, 0, 0, each_slice_i, (VALUE)args);
+
+ ary = args[0];
+ if (RARRAY_LEN(ary) > 0) rb_yield(ary);
+
+ return Qnil;
+}
+
+static VALUE
+each_cons_i(VALUE i, VALUE *memo, int argc, VALUE *argv)
+{
+ VALUE ary = memo[0];
+ VALUE v = Qnil;
+ long size = (long)memo[1];
+ ENUM_WANT_SVALUE();
+
+ if (RARRAY_LEN(ary) == size) {
+ rb_ary_shift(ary);
+ }
+ rb_ary_push(ary, i);
+ if (RARRAY_LEN(ary) == size) {
+ v = rb_yield(rb_ary_dup(ary));
+ }
+ return v;
+}
+
+/*
+ * call-seq:
+ * each_cons(n) {...}
+ * each_cons(n)
+ *
+ * Iterates the given block for each array of consecutive <n>
+ * elements. If no block is given, returns an enumerator.
+ *
+ * e.g.:
+ * (1..10).each_cons(3) {|a| p a}
+ * # outputs below
+ * [1, 2, 3]
+ * [2, 3, 4]
+ * [3, 4, 5]
+ * [4, 5, 6]
+ * [5, 6, 7]
+ * [6, 7, 8]
+ * [7, 8, 9]
+ * [8, 9, 10]
+ *
+ */
+static VALUE
+enum_each_cons(VALUE obj, VALUE n)
+{
+ long size = NUM2LONG(n);
+ VALUE args[2];
+
+ if (size <= 0) rb_raise(rb_eArgError, "invalid size");
+ RETURN_ENUMERATOR(obj, 1, &n);
+ args[0] = rb_ary_new2(size);
+ args[1] = (VALUE)size;
+
+ rb_block_call(obj, id_each, 0, 0, each_cons_i, (VALUE)args);
+
+ return Qnil;
+}
+
+static VALUE
+each_with_object_i(VALUE i, VALUE memo, int argc, VALUE *argv)
+{
+ ENUM_WANT_SVALUE();
+ return rb_yield_values(2, i, memo);
+}
+
+/*
+ * call-seq:
+ * each_with_object(obj) {|(*args), memo_obj| ... }
+ * each_with_object(obj)
+ *
+ * Iterates the given block for each element with an arbitrary
+ * object given, and returns the initially given object.
+ *
+ * If no block is given, returns an enumerator.
+ *
+ * e.g.:
+ * evens = (1..10).each_with_object([]) {|i, a| a << i*2 }
+ * # => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
+ *
+ */
+static VALUE
+enum_each_with_object(VALUE obj, VALUE memo)
+{
+ RETURN_ENUMERATOR(obj, 1, &memo);
+
+ rb_block_call(obj, id_each, 0, 0, each_with_object_i, memo);
+
+ return memo;
+}
+
+static VALUE
zip_ary(VALUE val, NODE *memo, int argc, VALUE *argv)
{
volatile VALUE result = memo->u1.value;
@@ -2444,6 +2623,10 @@ InitVM_Enumerable(void)
rb_define_method(rb_mEnumerable, "include?", enum_member, 1);
rb_define_method(rb_mEnumerable, "each_with_index", enum_each_with_index, -1);
rb_define_method(rb_mEnumerable, "reverse_each", enum_reverse_each, -1);
+ rb_define_method(rb_mEnumerable, "each_entry", enum_each_entry, -1);
+ rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
+ rb_define_method(rb_mEnumerable, "each_cons", enum_each_cons, 1);
+ rb_define_method(rb_mEnumerable, "each_with_object", enum_each_with_object, 1);
rb_define_method(rb_mEnumerable, "zip", enum_zip, -1);
rb_define_method(rb_mEnumerable, "take", enum_take, 1);
rb_define_method(rb_mEnumerable, "take_while", enum_take_while, 0);
diff --git a/enumerator.c b/enumerator.c
index e5e36a7726..c6d6e5ae7e 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -177,144 +177,6 @@ obj_to_enum(int argc, VALUE *argv, VALUE obj)
}
static VALUE
-each_slice_i(VALUE val, VALUE *memo)
-{
- VALUE ary = memo[0];
- VALUE v = Qnil;
- long size = (long)memo[1];
-
- rb_ary_push(ary, val);
-
- if (RARRAY_LEN(ary) == size) {
- v = rb_yield(ary);
- memo[0] = rb_ary_new2(size);
- }
-
- return v;
-}
-
-/*
- * call-seq:
- * e.each_slice(n) {...}
- * e.each_slice(n)
- *
- * Iterates the given block for each slice of <n> elements. If no
- * block is given, returns an enumerator.
- *
- * e.g.:
- * (1..10).each_slice(3) {|a| p a}
- * # outputs below
- * [1, 2, 3]
- * [4, 5, 6]
- * [7, 8, 9]
- * [10]
- *
- */
-static VALUE
-enum_each_slice(VALUE obj, VALUE n)
-{
- long size = NUM2LONG(n);
- VALUE args[2], ary;
-
- if (size <= 0) rb_raise(rb_eArgError, "invalid slice size");
- RETURN_ENUMERATOR(obj, 1, &n);
- args[0] = rb_ary_new2(size);
- args[1] = (VALUE)size;
-
- rb_block_call(obj, id_each, 0, 0, each_slice_i, (VALUE)args);
-
- ary = args[0];
- if (RARRAY_LEN(ary) > 0) rb_yield(ary);
-
- return Qnil;
-}
-
-static VALUE
-each_cons_i(VALUE val, VALUE *memo)
-{
- VALUE ary = memo[0];
- VALUE v = Qnil;
- long size = (long)memo[1];
-
- if (RARRAY_LEN(ary) == size) {
- rb_ary_shift(ary);
- }
- rb_ary_push(ary, val);
- if (RARRAY_LEN(ary) == size) {
- v = rb_yield(rb_ary_dup(ary));
- }
- return v;
-}
-
-/*
- * call-seq:
- * each_cons(n) {...}
- * each_cons(n)
- *
- * Iterates the given block for each array of consecutive <n>
- * elements. If no block is given, returns an enumerator.
- *
- * e.g.:
- * (1..10).each_cons(3) {|a| p a}
- * # outputs below
- * [1, 2, 3]
- * [2, 3, 4]
- * [3, 4, 5]
- * [4, 5, 6]
- * [5, 6, 7]
- * [6, 7, 8]
- * [7, 8, 9]
- * [8, 9, 10]
- *
- */
-static VALUE
-enum_each_cons(VALUE obj, VALUE n)
-{
- long size = NUM2LONG(n);
- VALUE args[2];
-
- if (size <= 0) rb_raise(rb_eArgError, "invalid size");
- RETURN_ENUMERATOR(obj, 1, &n);
- args[0] = rb_ary_new2(size);
- args[1] = (VALUE)size;
-
- rb_block_call(obj, id_each, 0, 0, each_cons_i, (VALUE)args);
-
- return Qnil;
-}
-
-static VALUE
-each_with_object_i(VALUE val, VALUE memo)
-{
- return rb_yield_values(2, val, memo);
-}
-
-/*
- * call-seq:
- * each_with_object(obj) {|(*args), memo_obj| ... }
- * each_with_object(obj)
- *
- * Iterates the given block for each element with an arbitrary
- * object given, and returns the initially given object.
- *
- * If no block is given, returns an enumerator.
- *
- * e.g.:
- * evens = (1..10).each_with_object([]) {|i, a| a << i*2 }
- * # => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
- *
- */
-static VALUE
-enum_each_with_object(VALUE obj, VALUE memo)
-{
- RETURN_ENUMERATOR(obj, 1, &memo);
-
- rb_block_call(obj, id_each, 0, 0, each_with_object_i, memo);
-
- return memo;
-}
-
-static VALUE
enumerator_allocate(VALUE klass)
{
struct enumerator *ptr;
@@ -327,12 +189,6 @@ enumerator_allocate(VALUE klass)
}
static VALUE
-enumerator_each_i(VALUE v, VALUE enum_obj, int argc, VALUE *argv)
-{
- return rb_yield_values2(argc, argv);
-}
-
-static VALUE
enumerator_init(VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv)
{
struct enumerator *ptr;
@@ -470,7 +326,7 @@ static VALUE
enumerator_each(VALUE obj)
{
if (!rb_block_given_p()) return obj;
- return enumerator_block_call(obj, enumerator_each_i, obj);
+ return enumerator_block_call(obj, 0, obj);
}
static VALUE
@@ -1199,10 +1055,6 @@ InitVM_Enumerator(void)
rb_define_method(rb_mKernel, "to_enum", obj_to_enum, -1);
rb_define_method(rb_mKernel, "enum_for", obj_to_enum, -1);
- rb_define_method(rb_mEnumerable, "each_slice", enum_each_slice, 1);
- rb_define_method(rb_mEnumerable, "each_cons", enum_each_cons, 1);
- rb_define_method(rb_mEnumerable, "each_with_object", enum_each_with_object, 1);
-
rb_cEnumerator = rb_define_class("Enumerator", rb_cObject);
rb_include_module(rb_cEnumerator, rb_mEnumerable);
diff --git a/error.c b/error.c
index 3a3bb749c4..a23232375d 100644
--- a/error.c
+++ b/error.c
@@ -18,12 +18,25 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#include <errno.h>
+
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif
extern const char ruby_description[];
+static const char *
+rb_strerrno(int err)
+{
+#define defined_error(name, num) if (err == num) return name;
+#define undefined_error(name)
+#include "known_errors.inc"
+#undef defined_error
+#undef undefined_error
+ return NULL;
+}
+
static int
err_position_0(char *buf, long len, const char *file, int line)
{
@@ -236,6 +249,20 @@ rb_bug(const char *fmt, ...)
}
void
+rb_bug_errno(const char *mesg, int errno_arg)
+{
+ if (errno_arg == 0)
+ rb_bug("%s: errno == 0 (NOERROR)", mesg);
+ else {
+ const char *errno_str = rb_strerrno(errno_arg);
+ if (errno_str)
+ rb_bug("%s: %s (%s)", mesg, strerror(errno_arg), errno_str);
+ else
+ rb_bug("%s: %s (%d)", mesg, strerror(errno_arg), errno_arg);
+ }
+}
+
+void
rb_compile_bug(const char *file, int line, const char *fmt, ...)
{
va_list args;
@@ -349,8 +376,6 @@ rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type)
}
/* exception classes */
-#include <errno.h>
-
#if 0
VALUE rb_eException;
VALUE rb_eSystemExit;
@@ -1255,7 +1280,8 @@ rb_check_frozen(VALUE obj)
if (OBJ_FROZEN(obj)) rb_error_frozen(rb_obj_classname(obj));
}
-void Init_syserr(void)
+void
+Init_syserr(void)
{
}
@@ -1263,7 +1289,11 @@ void
InitVM_syserr(void)
{
rb_eNOERROR = set_syserr(0, "NOERROR");
+#define defined_error(name, num) set_syserr(num, name);
+#define undefined_error(name) set_syserr(0, name);
#include "known_errors.inc"
+#undef defined_error
+#undef undefined_error
}
static void
diff --git a/eval.c b/eval.c
index 741cea3ba8..dbe71708c8 100644
--- a/eval.c
+++ b/eval.c
@@ -322,7 +322,8 @@ rb_mod_nesting(void)
while (cref && cref->nd_next) {
VALUE klass = cref->nd_clss;
- if (!NIL_P(klass)) {
+ if (!(cref->flags & NODE_FL_CREF_PUSHED_BY_EVAL) &&
+ !NIL_P(klass)) {
rb_ary_push(ary, klass);
}
cref = cref->nd_next;
@@ -399,11 +400,10 @@ rb_frozen_class_p(VALUE klass)
NORETURN(static void rb_longjmp(int, volatile VALUE));
static void
-rb_longjmp(int tag, volatile VALUE mesg)
+setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
{
VALUE at;
VALUE e;
- rb_thread_t *th = GET_THREAD();
const char *file;
volatile int line = 0;
@@ -472,10 +472,15 @@ rb_longjmp(int tag, volatile VALUE mesg)
rb_trap_restore_mask();
if (tag != TAG_FATAL) {
- EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self,
- 0 /* TODO: id */, 0 /* TODO: klass */);
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_RAISE, th->cfp->self, 0, 0);
}
+}
+static void
+rb_longjmp(int tag, volatile VALUE mesg)
+{
+ rb_thread_t *th = GET_THREAD();
+ setup_exception(th, tag, mesg);
rb_thread_raised_clear(th);
JUMP_TAG(tag);
}
@@ -606,9 +611,18 @@ void
rb_raise_jump(VALUE mesg)
{
rb_thread_t *th = GET_THREAD();
+ rb_control_frame_t *cfp = th->cfp;
+ VALUE klass = cfp->me->klass;
+ VALUE self = cfp->self;
+ ID mid = cfp->me->called_id;
+
th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
- /* TODO: fix me */
- rb_longjmp(TAG_RAISE, mesg);
+
+ setup_exception(th, TAG_RAISE, mesg);
+
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, mid, klass);
+ rb_thread_raised_clear(th);
+ JUMP_TAG(TAG_RAISE);
}
void
@@ -722,19 +736,19 @@ rb_protect(VALUE (* proc) (VALUE), VALUE data, int * state)
int status;
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = th->cfp;
- struct rb_vm_trap_tag trap_tag;
+ struct rb_vm_protect_tag protect_tag;
rb_jmpbuf_t org_jmpbuf;
- trap_tag.prev = th->trap_tag;
+ protect_tag.prev = th->protect_tag;
PUSH_TAG();
- th->trap_tag = &trap_tag;
+ th->protect_tag = &protect_tag;
MEMCPY(&org_jmpbuf, &(th)->root_jmpbuf, rb_jmpbuf_t, 1);
if ((status = EXEC_TAG()) == 0) {
SAVE_ROOT_JMPBUF(th, result = (*proc) (data));
}
MEMCPY(&(th)->root_jmpbuf, &org_jmpbuf, rb_jmpbuf_t, 1);
- th->trap_tag = trap_tag.prev;
+ th->protect_tag = protect_tag.prev;
POP_TAG();
if (state) {
diff --git a/eval_intern.h b/eval_intern.h
index 5caf65b140..80a0c8381d 100644
--- a/eval_intern.h
+++ b/eval_intern.h
@@ -205,7 +205,6 @@ NORETURN(void rb_raise_method_missing(rb_thread_t *th, int argc, VALUE *argv,
VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
NODE *rb_vm_cref(void);
-VALUE rb_obj_is_proc(VALUE);
VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, const rb_block_t *blockptr, VALUE filename);
void rb_vm_set_progname(VALUE filename);
void rb_thread_terminate_all(void);
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index f4c22b5060..667f58128d 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -473,9 +473,11 @@ BigDecimal_check_num(Real *p)
}
}
+static VALUE BigDecimal_split(VALUE self);
+
/* Returns the value as an integer (Fixnum or Bignum).
*
- * If the BigNumber is infinity or NaN, returns nil.
+ * If the BigNumber is infinity or NaN, raises FloatDomainError.
*/
static VALUE
BigDecimal_to_i(VALUE self)
@@ -497,31 +499,24 @@ BigDecimal_to_i(VALUE self)
e = VpGetSign(p)*p->frac[0];
return INT2FIX(e);
}
- str = rb_str_new(0, e+nf+2);
- psz = RSTRING_PTR(str);
+ else {
+ VALUE a = BigDecimal_split(self);
+ VALUE digits = RARRAY_PTR(a)[1];
+ VALUE numerator = rb_funcall(digits, rb_intern("to_i"), 0);
+ int dpower = e - RSTRING_LEN(digits);
- n = (e+nf-1)/nf;
- pch = psz;
- if(VpGetSign(p)<0) *pch++ = '-';
- for(i=0;i<n;++i) {
- b = VpBaseVal()/10;
- if(i>=(int)p->Prec) {
- while(b) {
- *pch++ = '0';
- b /= 10;
- }
- continue;
- }
- v = p->frac[i];
- while(b) {
- j = v/b;
- *pch++ = (char)(j + '0');
- v -= j*b;
- b /= 10;
- }
+ if (VpGetSign(p) < 0) {
+ numerator = rb_funcall(numerator, '*', 1, INT2FIX(-1));
+ }
+ if (dpower < 0) {
+ return rb_funcall(numerator, rb_intern("div"), 1,
+ rb_funcall(INT2FIX(10), rb_intern("**"), 1,
+ INT2FIX(-dpower)));
+ }
+ return rb_funcall(numerator, '*', 1,
+ rb_funcall(INT2FIX(10), rb_intern("**"), 1,
+ INT2FIX(dpower)));
}
- *pch++ = 0;
- return rb_cstr2inum(psz,10);
}
/* Returns a new Float object having approximately the same value as the
@@ -556,8 +551,6 @@ BigDecimal_to_f(VALUE self)
}
-static VALUE BigDecimal_split(VALUE self);
-
/* Converts a BigDecimal to a Rational.
*/
static VALUE
@@ -724,23 +717,21 @@ BigDecimalCmp(VALUE self, VALUE r,char op)
switch(op)
{
- case '*': f = rb_intern("<=>");break;
- case '=': f = rb_intern("=="); break;
- case '!': f = rb_intern("!="); break;
+ case '*': return rb_num_coerce_cmp(self,r,rb_intern("<=>"));
+ case '=': return RTEST(rb_num_coerce_cmp(self,r,rb_intern("=="))) ? Qtrue : Qfalse;
case 'G': f = rb_intern(">="); break;
case 'L': f = rb_intern("<="); break;
case '>': case '<': f = (ID)op; break;
}
- return rb_num_coerce_cmp(self,r,f);
+ return rb_num_coerce_relop(self,r,f);
}
SAVE(b);
e = VpComp(a, b);
- if(e==999) return Qnil;
+ if(e==999) return (op == '*') ? Qnil : Qfalse;
switch(op)
{
case '*': return INT2FIX(e); /* any op */
case '=': if(e==0) return Qtrue ; return Qfalse;
- case '!': if(e!=0) return Qtrue ; return Qfalse;
case 'G': if(e>=0) return Qtrue ; return Qfalse;
case '>': if(e> 0) return Qtrue ; return Qfalse;
case 'L': if(e<=0) return Qtrue ; return Qfalse;
@@ -891,7 +882,9 @@ BigDecimal_divide(Real **c, Real **res, Real **div, VALUE self, VALUE r)
if(!b) return DoSomeOne(self,r,'/');
SAVE(b);
*div = b;
- mx =(a->MaxPrec + b->MaxPrec + 1) * VpBaseFig();
+ mx = a->Prec+abs(a->exponent);
+ if(mx<b->Prec+abs(b->exponent)) mx = b->Prec+abs(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);
@@ -949,24 +942,38 @@ BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
GUARD_OBJ(a,GetVpValue(self,1));
b = GetVpValue(r,0);
- if(!b) return DoSomeOne(self,r,rb_intern("divmod"));
+ if(!b) return Qfalse;
SAVE(b);
if(VpIsNaN(a) || VpIsNaN(b)) goto NaN;
- if(VpIsInf(a) || VpIsInf(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,(S_INT)(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(VpIsZero(a)) {
GUARD_OBJ(c,VpCreateRbObject(1, "0"));
GUARD_OBJ(d,VpCreateRbObject(1, "0"));
*div = d;
*mod = c;
- return (VALUE)0;
+ return Qtrue;
}
- mx = a->Prec;
- if(mx<b->Prec) mx = b->Prec;
+ mx = a->Prec+abs(a->exponent);
+ if(mx<b->Prec+abs(b->exponent)) mx = b->Prec+abs(b->exponent);
mx =(mx + 1) * VpBaseFig();
GUARD_OBJ(c,VpCreateRbObject(mx, "0"));
GUARD_OBJ(res,VpCreateRbObject((mx+1) * 2 +(VpBaseFig() + 1), "#0"));
@@ -978,6 +985,7 @@ BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
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;
@@ -985,14 +993,14 @@ BigDecimal_DoDivmod(VALUE self, VALUE r, Real **div, Real **mod)
*div = d;
*mod = c;
}
- return (VALUE)0;
+ return Qtrue;
NaN:
GUARD_OBJ(c,VpCreateRbObject(1, "NaN"));
GUARD_OBJ(d,VpCreateRbObject(1, "NaN"));
*div = d;
*mod = c;
- return (VALUE)0;
+ return Qtrue;
}
/* call-seq:
@@ -1008,10 +1016,11 @@ BigDecimal_mod(VALUE self, VALUE r) /* %: a%b = a - (a.to_f/b).floor * b */
VALUE obj;
Real *div=NULL, *mod=NULL;
- obj = BigDecimal_DoDivmod(self,r,&div,&mod);
- if(obj!=(VALUE)0) return obj;
- SAVE(div);SAVE(mod);
- return ToValue(mod);
+ if(BigDecimal_DoDivmod(self,r,&div,&mod)) {
+ SAVE(div); SAVE(mod);
+ return ToValue(mod);
+ }
+ return DoSomeOne(self,r,'%');
}
static VALUE
@@ -1091,11 +1100,11 @@ BigDecimal_divmod(VALUE self, VALUE r)
VALUE obj;
Real *div=NULL, *mod=NULL;
- obj = BigDecimal_DoDivmod(self,r,&div,&mod);
- if(obj!=(VALUE)0) return obj;
- SAVE(div);SAVE(mod);
- obj = rb_assoc_new(BigDecimal_to_i(ToValue(div)), ToValue(mod));
- return obj;
+ if(BigDecimal_DoDivmod(self,r,&div,&mod)) {
+ SAVE(div); SAVE(mod);
+ return rb_assoc_new(ToValue(div), ToValue(mod));
+ }
+ return DoSomeOne(self,r,rb_intern("divmod"));
}
static VALUE
@@ -1108,9 +1117,10 @@ BigDecimal_div2(int argc, VALUE *argv, VALUE self)
VALUE obj;
Real *div=NULL;
Real *mod;
- obj = BigDecimal_DoDivmod(self,b,&div,&mod);
- if(obj!=(VALUE)0) return obj;
- return BigDecimal_to_i(ToValue(div));
+ 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 */
U_LONG ix = (U_LONG)GetPositiveInt(n);
if(ix==0) return BigDecimal_div(self,b);
@@ -4011,13 +4021,14 @@ VpCtoV(Real *a, const char *int_chr, U_LONG ni, const char *frac, U_LONG nf, con
U_LONG i, j, ind_a, ma, mi, me;
U_LONG loc;
S_INT e,es, eb, ef;
- S_INT sign, signe;
+ S_INT sign, signe, exponent_overflow;
/* get exponent part */
e = 0;
ma = a->MaxPrec;
mi = ni;
me = ne;
signe = 1;
+ exponent_overflow = 0;
memset(a->frac, 0, ma * sizeof(U_LONG));
if(ne > 0) {
i = 0;
@@ -4033,12 +4044,8 @@ VpCtoV(Real *a, const char *int_chr, U_LONG ni, const char *frac, U_LONG nf, con
es = e*((S_INT)BASE_FIG);
e = e * 10 + exp_chr[i] - '0';
if(es>e*((S_INT)BASE_FIG)) {
- VpException(VP_EXCEPTION_INFINITY,"exponent overflow",0);
- sign = 1;
- if(int_chr[0] == '-') sign = -1;
- if(signe > 0) VpSetInf(a, sign);
- else VpSetZero(a, sign);
- return 1;
+ exponent_overflow = 1;
+ break;
}
++i;
}
@@ -4080,6 +4087,18 @@ VpCtoV(Real *a, const char *int_chr, U_LONG ni, const char *frac, U_LONG nf, con
eb = e / ((S_INT)BASE_FIG);
+ if(exponent_overflow) {
+ int zero = 1;
+ for( ; i < mi && zero; i++) zero = int_chr[i] == '0';
+ for(i = 0; i < nf && zero; i++) zero = frac[i] == '0';
+ if(!zero && signe > 0) {
+ VpSetInf(a, sign);
+ VpException(VP_EXCEPTION_INFINITY,"exponent overflow",0);
+ }
+ else VpSetZero(a, sign);
+ return 1;
+ }
+
ind_a = 0;
while(i < mi) {
a->frac[ind_a] = 0;
diff --git a/ext/bigdecimal/bigdecimal_en.html b/ext/bigdecimal/bigdecimal_en.html
index c2b86faef6..82acd2a2a5 100644
--- a/ext/bigdecimal/bigdecimal_en.html
+++ b/ext/bigdecimal/bigdecimal_en.html
@@ -1,4 +1,3 @@
-<!-- saved from url=(0022)http://internet.e-mail -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html">
@@ -43,7 +42,7 @@ For the details about Ruby see:<BR>
NOTE:<BR>
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
+ warranties of merchantability and fitness for a particular
purpose. For the details,see COPYING and README included in this
distribution.
<BR>
@@ -115,7 +114,7 @@ s: Initial value string. Spaces will be ignored. Any unrecognizable character fo
representing initial value terminates the string.<BR>
n: Maximum number of significant digits of a. n must be a Fixnum object.
If n is omitted or is equal to 0,then the maximum number of significant digits of a is determined from the length of s.
-Actual number of digits handled in computations are usually gretaer than n.<BR>
+Actual number of digits handled in computations are usually greater than n.<BR>
n is useful when performing divisions like
<CODE><PRE>
BigDecimal("1") / BigDecimal("3") # => 0.3333333333 33E0
@@ -141,11 +140,11 @@ f = BigDecimal::mode(BigDecimal::EXCEPTION_ZERODIVIDE,flag)<BR>
f = BigDecimal::mode(BigDecimal::EXCEPTION_ALL,flag)<BR>
</BLOCKQUOTE>
EXCEPTION_NaN controls the execution when computation results to NaN.<BR>
-EXCEPTION_INFINITY controls the execution when computation results to Infinity(}Infinity).<BR>
+EXCEPTION_INFINITY controls the execution when computation results to Infinity.<BR>
EXCEPTION_UNDERFLOW controls the execution when computation underflows.<BR>
EXCEPTION_OVERFLOW controls the execution when computation overflows.<BR>
-EXCEPTION_ZERODIVIDE controls the execution when zero-division occures.<BR>
-EXCEPTION_ALL controls the execution for any exception defined occures.<BR>
+EXCEPTION_ZERODIVIDE controls the execution when zero-division occurs.<BR>
+EXCEPTION_ALL controls the execution when any defined exception occurs.<BR>
If the flag is true,then the relating exception is thrown.<BR>
No exception is thrown when the flag is false(default) and computation
continues with the result:<BR>
@@ -181,7 +180,7 @@ where flag must be one of:
</TABLE>
New rounding mode is returned. If nil is specified for the second argument,then current setting is returned.<BR>
The digit location for rounding operation can not be specified by this mode method,
-use truncate/round/ceil/floor/add/sub/mult/div mthods for each instance instead.
+use truncate/round/ceil/floor/add/sub/mult/div methods for each instance instead.
</BLOCKQUOTE>
<LI><B>limit[(n)]</B></LI><BLOCKQUOTE>
@@ -321,7 +320,7 @@ If n<0,then the n-th digit counted from the decimal point in integer part is pro
</BLOCKQUOTE>
<LI><B>round[(n[,b])]</B></LI><BLOCKQUOTE>
c = a.round<BR>
-round a to the nearest 1(default)D<BR>
+round a to the nearest 1(default)Ã…D<BR>
<CODE><PRE>
c = BigDecimal("1.23456").round # ==> 1
c = BigDecimal("-1.23456").round # ==> -1
@@ -346,7 +345,7 @@ c = BigDecimal::new("1.23356").round(3,BigDecimal::ROUND_HALF_EVEN) # ==> 1.2
</BLOCKQUOTE>
<LI><B>truncate[(n)]</B></LI><BLOCKQUOTE>
c = a.truncate<BR>
-truncate a to the nearest 1D<BR>
+truncate a to the nearest 1Ã…D<BR>
As shown in the following example,an optional integer argument (n) specifying the position
of the target digit can be given.<BR>
If n>0,then the (n+1)th digit counted from the decimal point in fraction part is processed(resulting number of fraction part digits is less than or equal to n).<BR>
@@ -409,7 +408,7 @@ means a = 0.xxxxxxx*10**n.
<LI><B>precs</B></LI><BLOCKQUOTE>
n,m = a.precs <BR>
-prec returns number of significant digits (n) and maximum number of
+precs returns number of significant digits (n) and maximum number of
significant digits (m) of a.
</BLOCKQUOTE>
@@ -439,11 +438,11 @@ a.nan? returns True when a is NaN.
</BLOCKQUOTE>
<LI><B>infinite?</B></LI><BLOCKQUOTE>
-a.infinite? returns 1 when a is +‡,-1 when a is -‡, nil otherwise.
+a.infinite? returns 1 when a is Infinity, -1 when a is -Infinity, nil otherwise.
</BLOCKQUOTE>
<LI><B>finite?</B></LI><BLOCKQUOTE>
-a.finite? returns true when a is neither ‡ nor NaN.
+a.finite? returns true when a is neither Infinity nor NaN.
</BLOCKQUOTE>
<LI><B>zero?</B></LI><BLOCKQUOTE>
@@ -526,9 +525,9 @@ same as ==,used in case statement.
<DT> 1.Both A and B are BigDecimal objects</DT>
<DD> A op B is normally performed.</DD>
<DT> 2.A is the BigDecimal object but B is other than BigDecimal object</DT>
-<DD> Operation is performed,after B is translated to correcponding BigDecimal object(because BigDecimal supports coerce method).</DD>
+<DD> Operation is performed,after B is translated to corresponding BigDecimal object(because BigDecimal supports coerce method).</DD>
<DT> 3.A is not the BigDecimal object but B is BigDecimal object</DT>
-<DD>If A has coerce mthod,then B will translate A to corresponding
+<DD>If A has coerce method,then B will translate A to corresponding
BigDecimal object and the operation is performed,otherwise an error occures.</DD>
</DL>
@@ -573,7 +572,7 @@ Zero has two different variations as +0.0 and -0.0.
But,still, +0.0==-0.0 is true.
<BR><BR>
Computation results including Infinity,NaN,+0.0 or -0.0 become complicated.
-Run following program and comfirm the results.
+Run following program and confirm the results.
Send me any incorrect result if you find.
<CODE><PRE>
@@ -603,12 +602,9 @@ where 'x' is any digit representing mantissa(kept in the array frac[]),
BASE is base value(=10000 in 32 bit integer system),
and n is the exponent value.<BR>
Larger BASE value enables smaller size of the array frac[],and increases computation speed.
-The value of BASE is defined ind VpInit(). In 32 bit integer system,this value is
-10000. In 64 bit integer system,the value becomes larger.
-BigDecimal has not yet been compiled and tested on 64 bit integer system.
-It will be very nice if anyone try to run BigDecimal on 64 bit system and
- inform me the results.
-When BASE is 10000,an element of the array frac[] can have vale of from 0 to 9999.
+The value of BASE is defined ind VpInit(). In 32 bit integer system, this value is
+10000. In 64 bit integer system, the value is 1000000000.
+When BASE is 10000,an element of the array frac[] can have value of from 0 to 9999.
(up to 4 digits).<BR>
The structure Real is defined in bigdecimal.h as:<BR>
<CODE><PRE>
@@ -626,7 +622,7 @@ The structure Real is defined in bigdecimal.h as:<BR>
/* -3 : -Infinity */
unsigned short flag; /* Control flag */
int exponent; /* Exponent value(0.xxxx*BASE**exponent) */
- unsigned long frac[1]; /* An araay holding mantissa(Variable) */
+ unsigned long frac[1]; /* An array holding mantissa(Variable) */
} Real;
</CODE></PRE>
The decimal value 1234.56784321 is represented as(BASE=10000):<BR>
@@ -668,7 +664,7 @@ For example, 0.1 can not exactly be represented in binary.<BR>
where b1=0,b2=0,b3=0,b4=1...<BR>
bn(n=1,2,3,...) is infinite series of digit with value of 0 or 1,
and rounding operation is necessary but where we should round the series ?
-Of cource,exact "0.1" is printed if the rouding operation is properly done,
+Of course, exact "0.1" is printed if the rounding operation is properly done,
<DT>Significant digit we can have is automatically determined
<DD>In binary representation,0.1 can not be represented in finite series of digit.
@@ -678,12 +674,12 @@ structure.
</DL>
<H3>Disadvantage of decimal representation</H3>
-Because most computers have no internal decimal representaion.
+Because most computers have no internal decimal representation.
Once you use BigDecimal,you need to keep using it without
considering computation cost if exact computation is required.
<H4>Which is the first input?</H4>
-Because most people uses decimal notatin for numeric data representation,
+Because most people uses decimal notation for numeric data representation,
BigDecimal can handle numeric data without loss of translation error.
<hr>
@@ -701,11 +697,11 @@ significant digits of both side of the operator. For / ,resulting number of sign
maximum significant digits of both side of the operator.<BR>
1.2 For + and -,resulting number of significant digits is determined so that
no round operation is needed. <br>
-For example, c has more than 100 siginificant digits if c is computed as:<BR>
+For example, c has more than 100 significant digits if c is computed as:<BR>
c = 0.1+0.1*10**(-100)<br>
<BR>
As +,-,and * are always exact(no round operation is performed unless BigDecimal.limit is specified),
-which means more momories are required to keep computation results.
+which means more memory is required to keep computation results.
But,the division such as c=1.0/3.0 will always be rounded.<BR>
<H3>2. add,sub,mult,div</H3>
@@ -729,7 +725,7 @@ decimal point.
<H3>4. Example</H3>
Following example compute the ratio of the circumference of a circle to
-its dirmeter(pi=3.14159265358979....) using J.Machin's formula.
+its diameter(pi=3.14159265358979....) using J.Machin's formula.
<BR><BR>
<CODE><PRE>
#!/usr/local/bin/ruby
diff --git a/ext/curses/view2.rb b/ext/curses/view2.rb
index 18d9619216..037771a226 100644
--- a/ext/curses/view2.rb
+++ b/ext/curses/view2.rb
@@ -2,114 +2,148 @@
require "curses"
-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)
-
-Curses.init_screen
-Curses.nonl
-Curses.cbreak
-Curses.noecho
-
-$screen = Curses.stdscr
-
-$screen.scrollok(true)
-#$screen.keypad(true)
-
-# slurp the file
-$data_lines = []
-fp.each_line { |l|
- $data_lines.push(l.chop)
-}
-fp.close
-
-$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
-
-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
+# 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
-end
-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)
+ # 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
- return true
- else
- return false
+ @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
-end
-while true
- result = true
- c = Curses.getch
- case c
- when Curses::KEY_DOWN, Curses::KEY_CTRL_N
- result = scroll_down
- when Curses::KEY_UP, Curses::KEY_CTRL_P
- 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
+
+ # 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
- when Curses::KEY_PPAGE
- for i in 0..($screen.maxy - 2)
- if( ! scroll_up )
- if( i == 0 )
- result = false
- end
- break
+ 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
- when Curses::KEY_LEFT, Curses::KEY_CTRL_T
- while( scroll_up )
- end
- when Curses::KEY_RIGHT, Curses::KEY_CTRL_B
- while( scroll_down )
+ 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
- when ?q
- break
- else
- $screen.setpos(0,0)
- $screen.addstr("[unknown key `#{Curses.keyname(c)}'=#{c}] ")
+ Curses.close_screen
end
- if( !result )
- Curses.beep
+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
- $screen.setpos(0,0)
+
+ viewer = FileViewer.new(ARGV[0])
end
-Curses.close_screen
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index 48297082f0..29ac36fc99 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -76,6 +76,8 @@ rb_digest_s_hexencode(VALUE klass, VALUE str)
return hexencode_str_new(str);
}
+NORETURN(static void rb_digest_instance_method_unimpl(VALUE self, const char *method));
+
/*
* Document-module: Digest::Instance
*
@@ -83,6 +85,13 @@ rb_digest_s_hexencode(VALUE klass, VALUE str)
* object to calculate message digest values.
*/
+static void
+rb_digest_instance_method_unimpl(VALUE self, const char *method)
+{
+ rb_raise(rb_eRuntimeError, "%s does not implement %s()",
+ rb_obj_classname(self), method);
+}
+
/*
* call-seq:
* digest_obj.update(string) -> digest_obj
@@ -97,7 +106,7 @@ rb_digest_s_hexencode(VALUE klass, VALUE str)
static VALUE
rb_digest_instance_update(VALUE self, VALUE str)
{
- rb_raise(rb_eRuntimeError, "%s does not implement update()", RSTRING_PTR(rb_inspect(self)));
+ rb_digest_instance_method_unimpl(self, "update");
}
/*
@@ -115,7 +124,7 @@ rb_digest_instance_update(VALUE self, VALUE str)
static VALUE
rb_digest_instance_finish(VALUE self)
{
- rb_raise(rb_eRuntimeError, "%s does not implement finish()", RSTRING_PTR(rb_inspect(self)));
+ rb_digest_instance_method_unimpl(self, "finish");
}
/*
@@ -129,7 +138,7 @@ rb_digest_instance_finish(VALUE self)
static VALUE
rb_digest_instance_reset(VALUE self)
{
- rb_raise(rb_eRuntimeError, "%s does not implement reset()", RSTRING_PTR(rb_inspect(self)));
+ rb_digest_instance_method_unimpl(self, "reset");
}
/*
@@ -170,10 +179,7 @@ rb_digest_instance_digest(int argc, VALUE *argv, VALUE self)
value = rb_funcall(self, id_finish, 0);
rb_funcall(self, id_reset, 0);
} else {
- VALUE clone = rb_obj_clone(self);
-
- value = rb_funcall(clone, id_finish, 0);
- rb_funcall(clone, id_reset, 0);
+ value = rb_funcall(rb_obj_clone(self), id_finish, 0);
}
return value;
@@ -218,10 +224,7 @@ rb_digest_instance_hexdigest(int argc, VALUE *argv, VALUE self)
value = rb_funcall(self, id_finish, 0);
rb_funcall(self, id_reset, 0);
} else {
- VALUE clone = rb_obj_clone(self);
-
- value = rb_funcall(clone, id_finish, 0);
- rb_funcall(clone, id_reset, 0);
+ value = rb_funcall(rb_obj_clone(self), id_finish, 0);
}
return hexencode_str_new(value);
@@ -231,8 +234,8 @@ rb_digest_instance_hexdigest(int argc, VALUE *argv, VALUE self)
* call-seq:
* digest_obj.hexdigest! -> string
*
- * Returns the resulting hash value and resets the digest to the
- * initial state.
+ * Returns the resulting hash value in a hex-encoded form and resets
+ * the digest to the initial state.
*/
static VALUE
rb_digest_instance_hexdigest_bang(VALUE self)
@@ -358,7 +361,7 @@ rb_digest_instance_length(VALUE self)
static VALUE
rb_digest_instance_block_length(VALUE self)
{
- rb_raise(rb_eRuntimeError, "%s does not implement block_length()", RSTRING_PTR(rb_inspect(self)));
+ rb_digest_instance_method_unimpl(self, "block_length");
}
/*
diff --git a/ext/digest/lib/digest.rb b/ext/digest/lib/digest.rb
index e42f984f95..857501722e 100644
--- a/ext/digest/lib/digest.rb
+++ b/ext/digest/lib/digest.rb
@@ -28,6 +28,13 @@ module Digest
def self.file(name)
new.file(name)
end
+
+ # Returns the base64 encoded hash value of a given _string_. The
+ # return value is properly padded with '=' and contains no line
+ # feeds.
+ def self.base64digest(str, *args)
+ [digest(str, *args)].pack('m0')
+ end
end
module Instance
@@ -42,6 +49,25 @@ module Digest
}
self
end
+
+ # If none is given, returns the resulting hash value of the digest
+ # in a base64 encoded form, keeping the digest's state.
+ #
+ # If a _string_ is given, returns the hash value for the given
+ # _string_ in a base64 encoded form, resetting the digest to the
+ # initial state before and after the process.
+ #
+ # In either case, the return value is properly padded with '=' and
+ # contains no line feeds.
+ def base64digest(str = nil)
+ [str ? digest(str) : digest].pack('m0')
+ end
+
+ # Returns the resulting hash value and resets the digest to the
+ # initial state.
+ def base64digest!
+ [digest!].pack('m0')
+ end
end
end
diff --git a/ext/dl/callback/depend b/ext/dl/callback/depend
deleted file mode 100644
index 7a1dc1ee62..0000000000
--- a/ext/dl/callback/depend
+++ /dev/null
@@ -1,15 +0,0 @@
-src: callback.c \
- callback-0.c callback-1.c callback-2.c \
- callback-3.c callback-4.c callback-5.c \
- callback-6.c callback-7.c callback-8.c
-
-$(OBJS): $(hdrdir)/ruby.h
-
-callback-0.c callback-1.c callback-2.c \
-callback-3.c callback-4.c callback-5.c \
-callback-6.c callback-7.c callback-8.c \
- : callback.c
-
-callback.c: $(srcdir)/mkcallback.rb $(srcdir)/../dl.h
- @echo "generating callback.c"
- @$(RUBY) $(srcdir)/mkcallback.rb -output=callback $(srcdir)/../dl.h
diff --git a/ext/dl/callback/extconf.rb b/ext/dl/callback/extconf.rb
deleted file mode 100644
index 6c3387670d..0000000000
--- a/ext/dl/callback/extconf.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-require 'mkmf'
-
-if compiled?("dl")
- callbacks = (0..8).map{|i| "callback-#{i}"}.unshift("callback")
- callback_srcs = callbacks.map{|basename| "#{basename}.c"}
- callback_objs = callbacks.map{|basename| "#{basename}.o"}
-
- $distcleanfiles << '$(SRCS)'
- $srcs = callback_srcs
- $objs = callback_objs
- $INCFLAGS << " -I$(srcdir)/.."
-
- create_makefile("dl/callback")
-end
diff --git a/ext/dl/callback/mkcallback.rb b/ext/dl/callback/mkcallback.rb
deleted file mode 100644
index d2f9e3f2e1..0000000000
--- a/ext/dl/callback/mkcallback.rb
+++ /dev/null
@@ -1,238 +0,0 @@
-#!ruby -s
-$output ||= "callback"
-$out = open("#{$output}.c", "w")
-
-$dl_h = ARGV[0] || "dl.h"
-
-# import DLSTACK_SIZE, DLSTACK_ARGS and so on
-File.open($dl_h){|f|
- pre = ""
- f.each{|line|
- line.chop!
- if( line[-1] == ?\\ )
- line.chop!
- line.concat(" ")
- pre += line
- next
- end
- if( pre.size > 0 )
- line = pre + line
- pre = ""
- end
- case line
- when /#define\s+DLSTACK_SIZE\s+\(?(\d+)\)?/
- DLSTACK_SIZE = $1.to_i
- when /#define\s+DLSTACK_ARGS\s+(.+)/
- DLSTACK_ARGS = $1.to_i
- when /#define\s+DLTYPE_([A-Z_]+)\s+\(?(\d+)\)?/
- eval("#{$1} = #{$2}")
- when /#define\s+MAX_DLTYPE\s+\(?(\d+)\)?/
- MAX_DLTYPE = $1.to_i
- when /#define\s+MAX_CALLBACK\s+\(?(\d+)\)?/
- MAX_CALLBACK = $1.to_i
- end
- }
-}
-
-CDECL = "cdecl"
-STDCALL = "stdcall"
-
-CALLTYPES = [CDECL, STDCALL]
-
-DLTYPE = {
- VOID => {
- :name => 'void',
- :type => 'void',
- :conv => nil,
- },
- CHAR => {
- :name => 'char',
- :type => 'char',
- :conv => 'NUM2CHR(%s)'
- },
- SHORT => {
- :name => 'short',
- :type => 'short',
- :conv => 'NUM2INT(%s)',
- },
- INT => {
- :name => 'int',
- :type => 'int',
- :conv => 'NUM2INT(%s)',
- },
- LONG => {
- :name => 'long',
- :type => 'long',
- :conv => 'NUM2LONG(%s)',
- },
- LONG_LONG => {
- :name => 'long_long',
- :type => 'LONG_LONG',
- :conv => 'NUM2LL(%s)',
- },
- FLOAT => {
- :name => 'float',
- :type => 'float',
- :conv => '(float)RFLOAT_VALUE(%s)',
- },
- DOUBLE => {
- :name => 'double',
- :type => 'double',
- :conv => 'RFLOAT_VALUE(%s)',
- },
- VOIDP => {
- :name => 'ptr',
- :type => 'void *',
- :conv => 'NUM2PTR(%s)',
- },
-}
-
-
-def func_name(ty, argc, n, calltype)
- "rb_dl_callback_#{DLTYPE[ty][:name]}_#{argc}_#{n}_#{calltype}"
-end
-
-$out << (<<EOS)
-#include "ruby.h"
-
-VALUE rb_DLCdeclCallbackAddrs, rb_DLCdeclCallbackProcs;
-#ifdef FUNC_STDCALL
-VALUE rb_DLStdcallCallbackAddrs, rb_DLStdcallCallbackProcs;
-#endif
-/*static void *cdecl_callbacks[MAX_DLTYPE][MAX_CALLBACK];*/
-#ifdef FUNC_STDCALL
-/*static void *stdcall_callbacks[MAX_DLTYPE][MAX_CALLBACK];*/
-#endif
-ID rb_dl_cb_call;
-EOS
-
-def foreach_proc_entry
- for calltype in CALLTYPES
- case calltype
- when CDECL
- proc_entry = "rb_DLCdeclCallbackProcs"
- when STDCALL
- proc_entry = "rb_DLStdcallCallbackProcs"
- else
- raise "unknown calltype: #{calltype}"
- end
- yield calltype, proc_entry
- end
-end
-
-def gencallback(ty, calltype, proc_entry, argc, n)
- <<-EOS
-#{calltype == STDCALL ? "\n#ifdef FUNC_STDCALL" : ""}
-static #{DLTYPE[ty][:type]}
-FUNC_#{calltype.upcase}(#{func_name(ty,argc,n,calltype)})(#{(0...argc).collect{|i| "DLSTACK_TYPE stack" + i.to_s}.join(", ")})
-{
- VALUE ret, cb#{argc > 0 ? ", args[#{argc}]" : ""};
-#{
- (0...argc).collect{|i|
- " args[%d] = LONG2NUM(stack%d);" % [i,i]
- }.join("\n")
-}
- cb = rb_ary_entry(rb_ary_entry(#{proc_entry}, #{ty}), #{(n * DLSTACK_SIZE) + argc});
- ret = rb_funcall2(cb, rb_dl_cb_call, #{argc}, #{argc > 0 ? 'args' : 'NULL'});
- return #{DLTYPE[ty][:conv] ? DLTYPE[ty][:conv] % "ret" : ""};
-}
-#{calltype == STDCALL ? "#endif\n" : ""}
- EOS
-end
-
-def gen_push_proc_ary(ty, aryname)
- sprintf(" rb_ary_push(#{aryname}, rb_ary_new3(%d,%s));",
- MAX_CALLBACK * DLSTACK_SIZE,
- (0...MAX_CALLBACK).collect{
- (0...DLSTACK_SIZE).collect{ "Qnil" }.join(",")
- }.join(","))
-end
-
-def gen_push_addr_ary(ty, aryname, calltype)
- sprintf(" rb_ary_push(#{aryname}, rb_ary_new3(%d,%s));",
- MAX_CALLBACK * DLSTACK_SIZE,
- (0...MAX_CALLBACK).collect{|i|
- (0...DLSTACK_SIZE).collect{|argc|
- "PTR2NUM(%s)" % func_name(ty,argc,i,calltype)
- }.join(",")
- }.join(","))
-end
-
-def gen_callback_file(ty)
- filename = "#{$output}-#{ty}.c"
- initname = "rb_dl_init_callbacks_#{ty}"
- body = <<-EOS
-#include "dl.h"
-
-extern VALUE rb_DLCdeclCallbackAddrs, rb_DLCdeclCallbackProcs;
-#ifdef FUNC_STDCALL
-extern VALUE rb_DLStdcallCallbackAddrs, rb_DLStdcallCallbackProcs;
-#endif
-extern ID rb_dl_cb_call;
- EOS
- yield body
- body << <<-EOS
-void
-#{initname}()
-{
-#{gen_push_proc_ary(ty, "rb_DLCdeclCallbackProcs")}
-#{gen_push_addr_ary(ty, "rb_DLCdeclCallbackAddrs", CDECL)}
-#ifdef FUNC_STDCALL
-#{gen_push_proc_ary(ty, "rb_DLStdcallCallbackProcs")}
-#{gen_push_addr_ary(ty, "rb_DLStdcallCallbackAddrs", STDCALL)}
-#endif
-}
- EOS
- [filename, initname, body]
-end
-
-callbacks = []
-for ty in 0...MAX_DLTYPE
- filename, initname, body = gen_callback_file(ty) {|f|
- foreach_proc_entry do |calltype, proc_entry|
- for argc in 0...DLSTACK_SIZE
- for n in 0...MAX_CALLBACK
- f << gencallback(ty, calltype, proc_entry, argc, n)
- end
- end
- end
- }
- $out << "void #{initname}();\n"
- callbacks << [filename, body]
-end
-
-$out << (<<EOS)
-void
-Init_callback(void)
-{
- VALUE tmp;
- VALUE rb_mDL = rb_path2class("DL");
-
- rb_dl_cb_call = rb_intern("call");
-
- tmp = rb_DLCdeclCallbackProcs = rb_ary_new();
- rb_define_const(rb_mDL, "CdeclCallbackProcs", tmp);
-
- tmp = rb_DLCdeclCallbackAddrs = rb_ary_new();
- rb_define_const(rb_mDL, "CdeclCallbackAddrs", tmp);
-
-#ifdef FUNC_STDCALL
- tmp = rb_DLStdcallCallbackProcs = rb_ary_new();
- rb_define_const(rb_mDL, "StdcallCallbackProcs", tmp);
-
- tmp = rb_DLStdcallCallbackAddrs = rb_ary_new();
- rb_define_const(rb_mDL, "StdcallCallbackAddrs", tmp);
-#endif
-
-#{
- (0...MAX_DLTYPE).collect{|ty|
- " rb_dl_init_callbacks_#{ty}();"
- }.join("\n")
-}
-}
-EOS
-$out.close
-
-for filename, body in callbacks
- open(filename, "wb") {|f| f.puts body}
-end
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index 729dbe9ac6..4d10c82ff2 100644
--- a/ext/dl/cfunc.c
+++ b/ext/dl/cfunc.c
@@ -16,7 +16,7 @@ rb_dl_get_last_error(VALUE self)
return rb_thread_local_aref(rb_thread_current(), id_last_error);
}
-static VALUE
+VALUE
rb_dl_set_last_error(VALUE self, VALUE val)
{
rb_thread_local_aset(rb_thread_current(), id_last_error, val);
@@ -33,7 +33,7 @@ rb_dl_get_win32_last_error(VALUE self)
return rb_thread_local_aref(rb_thread_current(), id_win32_last_error);
}
-static VALUE
+VALUE
rb_dl_set_win32_last_error(VALUE self, VALUE val)
{
rb_thread_local_aset(rb_thread_current(), id_win32_last_error, val);
diff --git a/ext/dl/closure.c b/ext/dl/closure.c
new file mode 100644
index 0000000000..da5ade1d87
--- /dev/null
+++ b/ext/dl/closure.c
@@ -0,0 +1,230 @@
+/* -*- C -*-
+ * $Id$
+ */
+
+#include <ruby.h>
+#include "dl.h"
+#include <sys/mman.h>
+#include <dl_conversions.h>
+
+VALUE rb_cDLClosure;
+
+typedef struct {
+ void * code;
+ ffi_closure *pcl;
+ ffi_cif * cif;
+ int argc;
+ ffi_type **argv;
+} dl_closure;
+
+static void
+dlclosure_free(void * ptr)
+{
+ dl_closure * cls = (dl_closure *)ptr;
+#ifdef USE_NEW_CLOSURE_API
+ ffi_closure_free(cls->pcl);
+#else
+ munmap(cls->pcl, sizeof(cls->pcl));
+#endif
+ xfree(cls->cif);
+ if (cls->argv) xfree(cls->argv);
+ xfree(cls);
+}
+
+static size_t
+dlclosure_memsize(const void * ptr)
+{
+ dl_closure * cls = (dl_closure *)ptr;
+ size_t size = 0;
+
+ if (ptr) {
+ size += sizeof(*cls);
+ size += ffi_raw_size(cls->cif);
+ size += sizeof(*cls->argv);
+ size += sizeof(ffi_closure);
+ }
+ return size;
+}
+
+const rb_data_type_t dlclosure_data_type = {
+ "dl/closure",
+ 0, dlclosure_free, dlclosure_memsize,
+};
+
+void
+dlc_callback(ffi_cif *cif, void *resp, void **args, void *ctx)
+{
+ VALUE self = (VALUE)ctx;
+ VALUE rbargs = rb_iv_get(self, "@args");
+ VALUE ctype = rb_iv_get(self, "@ctype");
+ int argc = RARRAY_LEN(rbargs);
+ VALUE *params = xcalloc(argc, sizeof(VALUE *));
+ VALUE ret;
+ int i, dl_type;
+
+ for (i = 0; i < argc; i++) {
+ dl_type = NUM2INT(RARRAY_PTR(rbargs)[i]);
+ switch (dl_type) {
+ case DLTYPE_VOID:
+ argc = 0;
+ break;
+ case DLTYPE_INT:
+ params[i] = INT2NUM(*(int *)args[i]);
+ break;
+ case DLTYPE_VOIDP:
+ params[i] = rb_dlptr_new(*(void **)args[i], 0, NULL);
+ break;
+ case DLTYPE_LONG:
+ params[i] = LONG2NUM(*(long *)args[i]);
+ break;
+ case DLTYPE_CHAR:
+ params[i] = INT2NUM(*(char *)args[i]);
+ break;
+ case DLTYPE_DOUBLE:
+ params[i] = rb_float_new(*(double *)args[i]);
+ break;
+ case DLTYPE_FLOAT:
+ params[i] = rb_float_new(*(float *)args[i]);
+ break;
+#if HAVE_LONG_LONG
+ case DLTYPE_LONG_LONG:
+ params[i] = rb_ull2inum(*(unsigned LONG_LONG *)args[i]);
+ break;
+#endif
+ default:
+ rb_raise(rb_eRuntimeError, "closure args: %d", dl_type);
+ }
+ }
+
+ ret = rb_funcall2(self, rb_intern("call"), argc, params);
+
+ dl_type = NUM2INT(ctype);
+ switch (dl_type) {
+ case DLTYPE_VOID:
+ break;
+ case DLTYPE_LONG:
+ *(long *)resp = NUM2LONG(ret);
+ break;
+ case DLTYPE_CHAR:
+ *(char *)resp = NUM2INT(ret);
+ break;
+ case DLTYPE_VOIDP:
+ *(void **)resp = NUM2PTR(ret);
+ break;
+ case DLTYPE_INT:
+ *(int *)resp = NUM2INT(ret);
+ break;
+ case DLTYPE_DOUBLE:
+ *(double *)resp = NUM2DBL(ret);
+ break;
+ case DLTYPE_FLOAT:
+ *(float *)resp = (float)NUM2DBL(ret);
+ break;
+#if HAVE_LONG_LONG
+ case DLTYPE_LONG_LONG:
+ *(unsigned LONG_LONG *)resp = rb_big2ull(ret);
+ break;
+#endif
+ default:
+ rb_raise(rb_eRuntimeError, "closure retval: %d", dl_type);
+ }
+ xfree(params);
+}
+
+static VALUE
+rb_dlclosure_allocate(VALUE klass)
+{
+ dl_closure * closure;
+
+ VALUE i = TypedData_Make_Struct(klass, dl_closure,
+ &dlclosure_data_type, closure);
+
+#ifdef USE_NEW_CLOSURE_API
+ closure->pcl = ffi_closure_alloc(sizeof(ffi_closure), &closure->code);
+#else
+ closure->pcl = mmap(NULL, sizeof(ffi_closure), PROT_READ | PROT_WRITE,
+ MAP_ANON | MAP_PRIVATE, -1, 0);
+#endif
+ closure->cif = xmalloc(sizeof(ffi_cif));
+
+ return i;
+}
+
+static VALUE
+rb_dlclosure_init(int rbargc, VALUE argv[], VALUE self)
+{
+ VALUE ret;
+ VALUE args;
+ VALUE abi;
+ dl_closure * cl;
+ ffi_cif * cif;
+ ffi_closure *pcl;
+ ffi_status result;
+ int i, argc;
+
+ if (2 == rb_scan_args(rbargc, argv, "21", &ret, &args, &abi))
+ abi = INT2NUM(FFI_DEFAULT_ABI);
+
+ argc = RARRAY_LEN(args);
+
+ TypedData_Get_Struct(self, dl_closure, &dlclosure_data_type, cl);
+
+ cl->argv = (ffi_type **)xcalloc(argc + 1, sizeof(ffi_type *));
+
+ for (i = 0; i < argc; i++) {
+ int dltype = NUM2INT(RARRAY_PTR(args)[i]);
+ cl->argv[i] = DL2FFI_TYPE(dltype);
+ }
+ cl->argv[argc] = NULL;
+
+ rb_iv_set(self, "@ctype", ret);
+ rb_iv_set(self, "@args", args);
+
+ cif = cl->cif;
+ pcl = cl->pcl;
+
+ result = ffi_prep_cif(cif, NUM2INT(abi), argc,
+ DL2FFI_TYPE(NUM2INT(ret)),
+ cl->argv);
+
+ if (FFI_OK != result)
+ rb_raise(rb_eRuntimeError, "error prepping CIF %d", result);
+
+#ifdef USE_NEW_CLOSURE_API
+ result = ffi_prep_closure_loc(pcl, cif, dlc_callback,
+ (void *)self, cl->code);
+#else
+ result = ffi_prep_closure(pcl, cif, dlc_callback, (void *)self);
+ cl->code = (void *)pcl;
+ mprotect(pcl, sizeof(pcl), PROT_READ | PROT_EXEC);
+#endif
+
+ if (FFI_OK != result)
+ rb_raise(rb_eRuntimeError, "error prepping closure %d", result);
+
+ return self;
+}
+
+static VALUE
+rb_dlclosure_to_i(VALUE self)
+{
+ dl_closure * cl;
+ void *code;
+
+ TypedData_Get_Struct(self, dl_closure, &dlclosure_data_type, cl);
+
+ code = cl->code;
+
+ return PTR2NUM(code);
+}
+
+void
+Init_dlclosure(void)
+{
+ rb_cDLClosure = rb_define_class_under(rb_mDL, "Closure", rb_cObject);
+ rb_define_alloc_func(rb_cDLClosure, rb_dlclosure_allocate);
+
+ rb_define_method(rb_cDLClosure, "initialize", rb_dlclosure_init, -1);
+ rb_define_method(rb_cDLClosure, "to_i", rb_dlclosure_to_i, 0);
+}
+/* vim: set noet sw=4 sts=4 */
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c
index 96f318be53..11ecf6f81d 100644
--- a/ext/dl/cptr.c
+++ b/ext/dl/cptr.c
@@ -608,6 +608,7 @@ rb_dlptr_s_to_ptr(VALUE self, VALUE val)
ptr = rb_dlptr_new(NUM2PTR(rb_Integer(val)), 0, NULL);
}
OBJ_INFECT(ptr, val);
+ rb_iv_set(ptr, "wrapping", val);
return ptr;
}
@@ -625,6 +626,7 @@ Init_dlptr(void)
rb_define_method(rb_cDLCPtr, "free=", rb_dlptr_free_set, 1);
rb_define_method(rb_cDLCPtr, "free", rb_dlptr_free_get, 0);
rb_define_method(rb_cDLCPtr, "to_i", rb_dlptr_to_i, 0);
+ rb_define_method(rb_cDLCPtr, "to_int", rb_dlptr_to_i, 0);
rb_define_method(rb_cDLCPtr, "to_value", rb_dlptr_to_value, 0);
rb_define_method(rb_cDLCPtr, "ptr", rb_dlptr_ptr, 0);
rb_define_method(rb_cDLCPtr, "+@", rb_dlptr_ptr, 0);
diff --git a/ext/dl/dl.c b/ext/dl/dl.c
index 9635794883..8f8212015b 100644
--- a/ext/dl/dl.c
+++ b/ext/dl/dl.c
@@ -77,19 +77,6 @@ rb_dl_value2ptr(VALUE self, VALUE val)
return PTR2NUM((void*)val);
}
-static void
-rb_dl_init_callbacks(VALUE dl)
-{
- static const char cb[] = "dl/callback.so";
-
- rb_autoload(dl, rb_intern_const("CdeclCallbackAddrs"), cb);
- rb_autoload(dl, rb_intern_const("CdeclCallbackProcs"), cb);
-#ifdef FUNC_STDCALL
- rb_autoload(dl, rb_intern_const("StdcallCallbackAddrs"), cb);
- rb_autoload(dl, rb_intern_const("StdcallCallbackProcs"), cb);
-#endif
-}
-
void
Init_dl(void)
{
@@ -107,8 +94,6 @@ Init_dl(void)
rb_define_const(rb_mDL, "MAX_CALLBACK", INT2NUM(MAX_CALLBACK));
rb_define_const(rb_mDL, "DLSTACK_SIZE", INT2NUM(DLSTACK_SIZE));
- rb_dl_init_callbacks(rb_mDL);
-
rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL));
rb_define_const(rb_mDL, "RTLD_LAZY", INT2NUM(RTLD_LAZY));
rb_define_const(rb_mDL, "RTLD_NOW", INT2NUM(RTLD_NOW));
@@ -162,4 +147,6 @@ Init_dl(void)
Init_dlhandle();
Init_dlcfunc();
Init_dlptr();
+ Init_dlfunction();
+ Init_dlclosure();
}
diff --git a/ext/dl/dl.h b/ext/dl/dl.h
index d06cad4e6b..81c8ee3bd9 100644
--- a/ext/dl/dl.h
+++ b/ext/dl/dl.h
@@ -3,6 +3,12 @@
#include <ruby.h>
+#ifdef USE_HEADER_HACKS
+#include <ffi/ffi.h>
+#else
+#include <ffi.h>
+#endif
+
#if !defined(FUNC_CDECL)
# define FUNC_CDECL(x) x
#endif
@@ -130,6 +136,7 @@
extern VALUE rb_mDL;
extern VALUE rb_cDLHandle;
+extern VALUE rb_cDLCPtr;
extern VALUE rb_cDLSymbol;
extern VALUE rb_eDLError;
extern VALUE rb_eDLTypeError;
@@ -221,4 +228,9 @@ VALUE rb_dlptr_new(void *ptr, long size, freefunc_t func);
VALUE rb_dlptr_new2(VALUE klass, void *ptr, long size, freefunc_t func);
VALUE rb_dlptr_malloc(long size, freefunc_t func);
+VALUE rb_dl_set_last_error(VALUE self, VALUE val);
+#if defined(HAVE_WINDOWS_H)
+VALUE rb_dl_set_win32_last_error(VALUE self, VALUE val);
+#endif
+
#endif
diff --git a/ext/dl/dl_conversions.c b/ext/dl/dl_conversions.c
new file mode 100644
index 0000000000..01d6218f7d
--- /dev/null
+++ b/ext/dl/dl_conversions.c
@@ -0,0 +1,38 @@
+#include <dl_conversions.h>
+
+ffi_type * rb_dl_type_to_ffi_type(int dl_type)
+{
+ int signed_p = 1;
+
+ if(dl_type < 0) {
+ dl_type = -1 * dl_type;
+ signed_p = 0;
+ }
+
+ switch(dl_type) {
+ case DLTYPE_VOID:
+ return &ffi_type_void;
+ case DLTYPE_VOIDP:
+ return &ffi_type_pointer;
+ case DLTYPE_CHAR:
+ return signed_p ? &ffi_type_schar : &ffi_type_uchar;
+ case DLTYPE_SHORT:
+ return signed_p ? &ffi_type_sshort : &ffi_type_ushort;
+ case DLTYPE_INT:
+ return signed_p ? &ffi_type_sint : &ffi_type_uint;
+ case DLTYPE_LONG:
+ return signed_p ? &ffi_type_slong : &ffi_type_ulong;
+#if HAVE_LONG_LONG
+ case DLTYPE_LONG_LONG:
+ return &ffi_type_uint64;
+ break;
+#endif
+ case DLTYPE_FLOAT:
+ return &ffi_type_float;
+ case DLTYPE_DOUBLE:
+ return &ffi_type_double;
+ default:
+ rb_raise(rb_eRuntimeError, "unknown type %d", dl_type);
+ }
+ return &ffi_type_pointer;
+}
diff --git a/ext/dl/dl_conversions.h b/ext/dl/dl_conversions.h
new file mode 100644
index 0000000000..13c904733d
--- /dev/null
+++ b/ext/dl/dl_conversions.h
@@ -0,0 +1,10 @@
+#ifndef DL_CONVERSIONS
+#define DL_CONVERSIONS
+
+#include <dl.h>
+
+#define DL2FFI_TYPE(a) rb_dl_type_to_ffi_type(a)
+
+ffi_type * rb_dl_type_to_ffi_type(int dl_type);
+
+#endif
diff --git a/ext/dl/extconf.rb b/ext/dl/extconf.rb
index 8317ac35ad..e2b7af6410 100644
--- a/ext/dl/extconf.rb
+++ b/ext/dl/extconf.rb
@@ -8,8 +8,30 @@ $INSTALLFILES = [
["dl.h", "$(HDRDIR)"],
]
+if pkg_config("libffi")
+ # libffi closure api must be switched depending on the version
+ if system("pkg-config --atleast-version=3.0.9 libffi")
+ $defs.push(format('-DUSE_NEW_CLOSURE_API'))
+ end
+else
+ dir_config('ffi', '/usr/include', '/usr/lib')
+end
+
+unless have_header('ffi.h')
+ if have_header('ffi/ffi.h')
+ $defs.push(format('-DUSE_HEADER_HACKS'))
+ else
+ abort "ffi is missing"
+ end
+end
+
+unless have_library('ffi')
+ abort "ffi is missing"
+end
+
check = true
if( have_header("dlfcn.h") )
+
have_library("dl")
check &&= have_func("dlopen")
check &&= have_func("dlclose")
diff --git a/ext/dl/lib/dl/callback.rb b/ext/dl/lib/dl/callback.rb
index c8daaf6322..53da888d9d 100644
--- a/ext/dl/lib/dl/callback.rb
+++ b/ext/dl/lib/dl/callback.rb
@@ -1,26 +1,21 @@
require 'dl'
+require 'dl/closure'
require 'thread'
module DL
SEM = Mutex.new
- def set_callback_internal(proc_entry, addr_entry, argc, ty, &cbp)
+ CdeclCallbackProcs = {}
+ CdeclCallbackAddrs = {}
+
+ def set_callback_internal(proc_entry, addr_entry, argc, ty, abi = DL::Function::DEFAULT, &cbp)
if( argc < 0 )
raise(ArgumentError, "arity should not be less than 0.")
end
- addr = nil
- SEM.synchronize{
- ary = proc_entry[ty]
- (0...MAX_CALLBACK).each{|n|
- idx = (n * DLSTACK_SIZE) + argc
- if( ary[idx].nil? )
- ary[idx] = cbp
- addr = addr_entry[ty][idx]
- break
- end
- }
- }
- addr
+
+ closure = DL::Closure::BlockCaller.new(ty, [TYPE_VOIDP] * argc, abi, &cbp)
+ proc_entry[closure.to_i] = closure
+ closure.to_i
end
def set_cdecl_callback(ty, argc, &cbp)
@@ -28,32 +23,14 @@ module DL
end
def set_stdcall_callback(ty, argc, &cbp)
- set_callback_internal(StdcallCallbackProcs, StdcallCallbackAddrs, argc, ty, &cbp)
+ set_callback_internal(StdcallCallbackProcs, StdcallCallbackAddrs, argc, ty, DL::Function::STDCALL, &cbp)
end
def remove_callback_internal(proc_entry, addr_entry, addr, ctype = nil)
- index = nil
- if( ctype )
- addr_entry[ctype].each_with_index{|xaddr, idx|
- if( xaddr == addr )
- index = idx
- end
- }
- else
- addr_entry.each{|ty,entry|
- entry.each_with_index{|xaddr, idx|
- if( xaddr == addr )
- index = idx
- end
- }
- }
- end
- if( index and proc_entry[ctype][index] )
- proc_entry[ctype][index] = nil
- return true
- else
- return false
- end
+ addr = addr.to_i
+ return false unless proc_entry.key?(addr)
+ proc_entry.delete(addr)
+ true
end
def remove_cdecl_callback(addr, ctype = nil)
diff --git a/ext/dl/lib/dl/closure.rb b/ext/dl/lib/dl/closure.rb
new file mode 100644
index 0000000000..eca941dfbc
--- /dev/null
+++ b/ext/dl/lib/dl/closure.rb
@@ -0,0 +1,19 @@
+require 'dl'
+
+module DL
+ class Closure
+ attr_reader :ctype
+ attr_reader :args
+
+ class BlockCaller < DL::Closure
+ def initialize ctype, args, abi = DL::Function::DEFAULT, &block
+ super(ctype, args, abi)
+ @block = block
+ end
+
+ def call *args
+ @block.call(*args)
+ end
+ end
+ end
+end
diff --git a/ext/dl/lib/dl/func.rb b/ext/dl/lib/dl/func.rb
index 7a8b62e325..c5a2dda355 100644
--- a/ext/dl/lib/dl/func.rb
+++ b/ext/dl/lib/dl/func.rb
@@ -1,26 +1,26 @@
require 'dl'
+require 'dl/closure'
require 'dl/callback'
require 'dl/stack'
require 'dl/value'
require 'thread'
module DL
- class Function
+ class Function < DL::Method
include DL
include ValueUtil
- def initialize(cfunc, argtypes, &proc)
- @cfunc = cfunc
- @stack = Stack.new(argtypes.collect{|ty| ty.abs})
- if( @cfunc.ctype < 0 )
- @cfunc.ctype = @cfunc.ctype.abs
- @unsigned = true
+ def initialize cfunc, argtypes, abi = DEFAULT, &block
+ if block_given?
+ @cfunc = Class.new(DL::Closure) {
+ define_method(:call, block)
+ }.new(cfunc.ctype, argtypes)
else
- @unsigned = false
- end
- if( proc )
- bind(&proc)
+ @cfunc = cfunc
end
+
+ @args = argtypes
+ super(@cfunc, @args.reject { |x| x == TYPE_VOID }, cfunc.ctype, abi)
end
def to_i()
@@ -32,11 +32,10 @@ module DL
end
def call(*args, &block)
- funcs = []
- args = wrap_args(args, @stack.types, funcs, &block)
- r = @cfunc.call(@stack.pack(args))
- funcs.each{|f| f.unbind_at_call()}
- return wrap_result(r)
+ if block_given?
+ args.find { |a| DL::Function === a }.bind_at_call(&block)
+ end
+ super
end
def wrap_result(r)
@@ -52,33 +51,16 @@ module DL
end
def bind(&block)
- if( !block )
- raise(RuntimeError, "block must be given.")
- end
- if( @cfunc.ptr == 0 )
- cb = Proc.new{|*args|
- ary = @stack.unpack(args)
- @stack.types.each_with_index{|ty, idx|
- case ty
- when TYPE_VOIDP
- ary[idx] = CPtr.new(ary[idx])
- end
- }
- r = block.call(*ary)
- wrap_arg(r, @cfunc.ctype, [])
- }
- case @cfunc.calltype
- when :cdecl
- @cfunc.ptr = set_cdecl_callback(@cfunc.ctype, @stack.size, &cb)
- when :stdcall
- @cfunc.ptr = set_stdcall_callback(@cfunc.ctype, @stack.size, &cb)
- else
- raise(RuntimeError, "unsupported calltype: #{@cfunc.calltype}")
+ @cfunc = Class.new(DL::Closure) {
+ def initialize ctype, args, block
+ super(ctype, args)
+ @block = block
end
- if( @cfunc.ptr == 0 )
- raise(RuntimeException, "can't bind C function.")
+
+ def call *args
+ @block.call(*args)
end
- end
+ }.new(@cfunc.ctype, @args, block)
end
def unbind()
diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb
index 199354c18e..4c101d0f5c 100644
--- a/ext/dl/lib/dl/import.rb
+++ b/ext/dl/lib/dl/import.rb
@@ -1,4 +1,5 @@
require 'dl'
+require 'dl/closure'
require 'dl/func.rb'
require 'dl/struct.rb'
require 'dl/cparser.rb'
@@ -211,9 +212,11 @@ module DL
end
def bind_function(name, ctype, argtype, call_type = nil, &block)
- f = Function.new(CFunc.new(0, ctype, name, call_type || :cdecl), argtype)
- f.bind(&block)
- f
+ closure = Class.new(DL::Closure) {
+ define_method(:call, block)
+ }.new(ctype, argtype)
+
+ Function.new(closure, argtype)
end
def create_temp_function(name, ctype, argtype, call_type = nil)
diff --git a/ext/dl/lib/dl/value.rb b/ext/dl/lib/dl/value.rb
index 56dfcefa32..cc6da6a7fb 100644
--- a/ext/dl/lib/dl/value.rb
+++ b/ext/dl/lib/dl/value.rb
@@ -36,16 +36,7 @@ module DL
end
end
- def wrap_args(args, tys, funcs, &block)
- result = []
- tys ||= []
- args.each_with_index{|arg, idx|
- result.push(wrap_arg(arg, tys[idx], funcs, &block))
- }
- result
- end
-
- def wrap_arg(arg, ty, funcs, &block)
+ def wrap_arg(arg, ty, funcs = [], &block)
funcs ||= []
case arg
when nil
diff --git a/ext/dl/method.c b/ext/dl/method.c
new file mode 100644
index 0000000000..8462292d98
--- /dev/null
+++ b/ext/dl/method.c
@@ -0,0 +1,251 @@
+/* -*- C -*-
+ * $Id$
+ */
+
+#include <ruby.h>
+#include <errno.h>
+#include "dl.h"
+#include <dl_conversions.h>
+
+VALUE rb_cDLMethod;
+
+typedef union
+{
+ unsigned char uchar; /* ffi_type_uchar */
+ signed char schar; /* ffi_type_schar */
+ unsigned short ushort; /* ffi_type_sshort */
+ signed short sshort; /* ffi_type_ushort */
+ unsigned int uint; /* ffi_type_uint */
+ signed int sint; /* ffi_type_sint */
+ unsigned long ulong; /* ffi_type_ulong */
+ signed long slong; /* ffi_type_slong */
+ float ffloat; /* ffi_type_float */
+ double ddouble; /* ffi_type_double */
+#if HAVE_LONG_LONG
+ unsigned LONG_LONG long_long; /* ffi_type_uint64 */
+#endif
+ void * pointer; /* ffi_type_pointer */
+} dl_generic;
+
+static void
+dlfunction_free(void *p)
+{
+ ffi_cif *ptr = p;
+ if (ptr->arg_types) xfree(ptr->arg_types);
+ xfree(ptr);
+}
+
+static size_t
+dlfunction_memsize(const void *p)
+{
+ /* const */ffi_cif *ptr = (ffi_cif *)p;
+ size_t size = 0;
+
+ if (ptr) {
+ size += sizeof(*ptr);
+ size += ffi_raw_size(ptr);
+ }
+ return size;
+}
+
+const rb_data_type_t dlfunction_data_type = {
+ "dl/method",
+ 0, dlfunction_free, dlfunction_memsize,
+};
+
+static VALUE
+rb_dlfunc_allocate(VALUE klass)
+{
+ ffi_cif * cif;
+
+ return TypedData_Make_Struct(klass, ffi_cif, &dlfunction_data_type, cif);
+}
+
+static VALUE
+rb_dlfunction_initialize(int argc, VALUE argv[], VALUE self)
+{
+ ffi_cif * cif;
+ ffi_type **arg_types;
+ ffi_status result;
+ VALUE ptr, args, ret_type, abi;
+ int i;
+
+ rb_scan_args(argc, argv, "31", &ptr, &args, &ret_type, &abi);
+ if(NIL_P(abi)) abi = INT2NUM(FFI_DEFAULT_ABI);
+
+ rb_iv_set(self, "@ptr", ptr);
+ rb_iv_set(self, "@args", args);
+ rb_iv_set(self, "@return_type", ret_type);
+ rb_iv_set(self, "@abi", abi);
+
+ TypedData_Get_Struct(self, ffi_cif, &dlfunction_data_type, cif);
+
+ arg_types = xcalloc(RARRAY_LEN(args) + 1, sizeof(ffi_type *));
+
+ for (i = 0; i < RARRAY_LEN(args); i++) {
+ int type = NUM2INT(RARRAY_PTR(args)[i]);
+ arg_types[i] = DL2FFI_TYPE(type);
+ }
+ arg_types[RARRAY_LEN(args)] = NULL;
+
+ result = ffi_prep_cif (
+ cif,
+ NUM2INT(abi),
+ RARRAY_LEN(args),
+ DL2FFI_TYPE(NUM2INT(ret_type)),
+ arg_types);
+
+ if (result)
+ rb_raise(rb_eRuntimeError, "error creating CIF %d", result);
+
+ return self;
+}
+
+static void
+dl2generic(int dl_type, VALUE src, dl_generic * dst)
+{
+ int signed_p = 1;
+
+ if (dl_type < 0) {
+ dl_type = -1 * dl_type;
+ signed_p = 0;
+ }
+
+ switch (dl_type) {
+ case DLTYPE_VOID:
+ break;
+ case DLTYPE_VOIDP:
+ dst->pointer = NUM2PTR(rb_Integer(src));
+ break;
+ case DLTYPE_CHAR:
+ case DLTYPE_SHORT:
+ case DLTYPE_INT:
+ dst->sint = NUM2INT(src);
+ break;
+ case DLTYPE_LONG:
+ if (signed_p)
+ dst->slong = NUM2LONG(src);
+ else
+ dst->ulong = NUM2LONG(src);
+ break;
+#if HAVE_LONG_LONG
+ case DLTYPE_LONG_LONG:
+ dst->long_long = rb_big2ull(src);
+ break;
+#endif
+ case DLTYPE_FLOAT:
+ dst->ffloat = (float)NUM2DBL(src);
+ break;
+ case DLTYPE_DOUBLE:
+ dst->ddouble = NUM2DBL(src);
+ break;
+ default:
+ rb_raise(rb_eRuntimeError, "unknown type %d", dl_type);
+ }
+}
+
+static VALUE
+unwrap_ffi(VALUE rettype, dl_generic retval)
+{
+ int signed_p = 1;
+ int dl_type = NUM2INT(rettype);
+
+ if (dl_type < 0) {
+ dl_type = -1 * dl_type;
+ signed_p = 0;
+ }
+
+ switch (dl_type) {
+ case DLTYPE_VOID:
+ return Qnil;
+ case DLTYPE_VOIDP:
+ return rb_dlptr_new((void *)retval.pointer, 0, NULL);
+ case DLTYPE_CHAR:
+ case DLTYPE_SHORT:
+ case DLTYPE_INT:
+ return INT2NUM(retval.sint);
+ case DLTYPE_LONG:
+ if (signed_p) return LONG2NUM(retval.slong);
+ return ULONG2NUM(retval.ulong);
+#if HAVE_LONG_LONG
+ case DLTYPE_LONG_LONG:
+ return rb_ll2inum(retval.long_long);
+ break;
+#endif
+ case DLTYPE_FLOAT:
+ return rb_float_new(retval.ffloat);
+ case DLTYPE_DOUBLE:
+ return rb_float_new(retval.ddouble);
+ default:
+ rb_raise(rb_eRuntimeError, "unknown type %d", dl_type);
+ }
+}
+
+static VALUE
+rb_dlfunction_call(int argc, VALUE argv[], VALUE self)
+{
+ ffi_cif * cif;
+ dl_generic retval;
+ dl_generic *generic_args;
+ void **values;
+ void * fun_ptr;
+ VALUE cfunc, types;
+ int i;
+
+ TypedData_Get_Struct(self, ffi_cif, &dlfunction_data_type, cif);
+
+ values = xcalloc((size_t)argc + 1, (size_t)sizeof(void *));
+ generic_args = xcalloc((size_t)argc, (size_t)sizeof(dl_generic));
+
+ cfunc = rb_iv_get(self, "@ptr");
+ types = rb_iv_get(self, "@args");
+
+ for (i = 0; i < argc; i++) {
+ VALUE dl_type = RARRAY_PTR(types)[i];
+ VALUE src = argv[i];
+
+ if(NUM2INT(dl_type) == DLTYPE_VOIDP) {
+ if(NIL_P(src)) {
+ src = INT2NUM(0);
+ } else if(rb_cDLCPtr != CLASS_OF(src)) {
+ src = rb_funcall(rb_cDLCPtr, rb_intern("[]"), 1, src);
+ }
+ src = rb_Integer(src);
+ }
+
+ dl2generic(NUM2INT(dl_type), src, &generic_args[i]);
+ values[i] = (void *)&generic_args[i];
+ }
+ values[argc] = NULL;
+
+ ffi_call(cif, NUM2PTR(rb_Integer(cfunc)), &retval, values);
+
+ rb_dl_set_last_error(self, INT2NUM(errno));
+#if defined(HAVE_WINDOWS_H)
+ rb_dl_set_win32_last_error(self, INT2NUM(GetLastError()));
+#endif
+
+ xfree(values);
+ xfree(generic_args);
+
+ return unwrap_ffi(rb_iv_get(self, "@return_type"), retval);
+}
+
+void
+Init_dlfunction(void)
+{
+ rb_cDLMethod = rb_define_class_under(rb_mDL, "Method", rb_cObject);
+
+ rb_define_const(rb_cDLMethod, "DEFAULT", INT2NUM(FFI_DEFAULT_ABI));
+
+#ifdef FFI_STDCALL
+ rb_define_const(rb_cDLMethod, "STDCALL", INT2NUM(FFI_STDCALL));
+#endif
+
+ rb_define_alloc_func(rb_cDLMethod, rb_dlfunc_allocate);
+
+ rb_define_method(rb_cDLMethod, "call", rb_dlfunction_call, -1);
+
+ rb_define_method(rb_cDLMethod, "initialize", rb_dlfunction_initialize, -1);
+}
+/* vim: set noet sw=4 sts=4 */
diff --git a/ext/extmk.rb b/ext/extmk.rb
index 30de287cd8..ab48634c1a 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -69,8 +69,10 @@ def extract_makefile(makefile, keep = true)
end
$target = target
$extconf_h = m[/^RUBY_EXTCONF_H[ \t]*=[ \t]*(\S+)/, 1]
- $static ||= m[/^EXTSTATIC[ \t]*=[ \t]*(\S+)/, 1] || false
- /^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = nil
+ if $static.nil?
+ $static ||= m[/^EXTSTATIC[ \t]*=[ \t]*(\S+)/, 1] || false
+ /^STATIC_LIB[ \t]*=[ \t]*\S+/ =~ m or $static = false
+ end
$preload = Shellwords.shellwords(m[/^preload[ \t]*=[ \t]*(.*)/, 1] || "")
$DLDFLAGS += " " + (m[/^dldflags[ \t]*=[ \t]*(.*)/, 1] || "")
if s = m[/^LIBS[ \t]*=[ \t]*(.*)/, 1]
@@ -265,7 +267,7 @@ def parse_args()
if arg = v.first
arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
end
- $makeflags.concat(v.reject {|arg| /\AMINIRUBY=/ =~ arg}.quote)
+ $makeflags.concat(v.reject {|arg2| /\AMINIRUBY=/ =~ arg2}.quote)
$mflags.concat(v)
end
opts.on('--message [MESSAGE]', String) do |v|
@@ -394,29 +396,27 @@ end unless $extstatic
ext_prefix = "#{$top_srcdir}/ext"
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
-if $extension
- exts |= $extension.select {|d| File.directory?("#{ext_prefix}/#{d}")}
-else
- withes, withouts = %w[--with --without].collect {|w|
- if not (w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any?
- nil
- elsif (w = w.grep(String)).empty?
- proc {true}
- else
- proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
- end
- }
- if withes
- withouts ||= proc {true}
+withes, withouts = %w[--with --without].collect {|w|
+ if not (w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any?
+ nil
+ elsif (w = w.grep(String)).empty?
+ proc {true}
else
- withes = proc {false}
- withouts ||= withes
+ proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
end
- cond = proc {|ext, *|
- cond1 = proc {|n| File.fnmatch(n, ext)}
- withes.call(cond1) or !withouts.call(cond1)
- }
- exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
+}
+if withes
+ withouts ||= proc {true}
+else
+ withes = proc {false}
+ withouts ||= withes
+end
+cond = proc {|ext, *|
+ cond1 = proc {|n| File.fnmatch(n, ext)}
+ withes.call(cond1) or !withouts.call(cond1)
+}
+($extension || %w[*]).each do |e|
+ exts |= Dir.glob("#{ext_prefix}/#{e}/**/extconf.rb").collect {|d|
d = File.dirname(d)
d.slice!(0, ext_prefix.length + 1)
d
@@ -439,7 +439,7 @@ Dir::chdir('ext')
hdrdir = $hdrdir
$hdrdir = ($top_srcdir = relative_from(srcdir, $topdir = "..")) + "/include"
exts.each do |d|
- $static = $force_static ? $static_ext[target] : false
+ $static = $force_static ? $static_ext[target] : nil
if $ignore or !$nodynamic or $static
extmake(d) or abort
@@ -491,7 +491,7 @@ unless $extlist.empty?
end
next
end
- f = format("%s/%s.%s", s, i, $LIBEXT)
+ f = format("%s/%s.%s", t, i, $LIBEXT)
if File.exist?(f)
$extinit << " init(Init_#{i}, \"#{t}.so\");\n"
$extobjs << "ext/#{f} "
@@ -570,19 +570,19 @@ $mflags.unshift("topdir=#$topdir")
ENV.delete("RUBYOPT")
if $command_output
message = "echo #{message}"
- cmd = $makeflags.quote.join(' ')
- open($command_output, 'wb') do |f|
+ cmd = $makeflags.map {|ss|ss.sub(/.*[$(){};\s].*/, %q['\&'])}.join(' ')
+ open($command_output, 'wb') do |ff|
case $command_output
when /\.sh\z/
- f.puts message, "rm -f $0; exec \"$@\" #{cmd}"
+ ff.puts message, "rm -f $0; exec \"$@\" #{cmd}"
when /\.bat\z/
- ["@echo off", message, "%* #{cmd}", "del %0 & exit %ERRORLEVEL%"].each do |s|
- f.print s, "\r\n"
+ ["@echo off", message, "%* #{cmd}", "del %0 & exit %ERRORLEVEL%"].each do |ss|
+ ff.print ss, "\r\n"
end
else
- f.puts cmd
+ ff.puts cmd
end
- f.chmod(0755)
+ ff.chmod(0755)
end
else
puts message
diff --git a/ext/iconv/charset_alias.rb b/ext/iconv/charset_alias.rb
index d4ed9139c8..e0a0a82c39 100644
--- a/ext/iconv/charset_alias.rb
+++ b/ext/iconv/charset_alias.rb
@@ -95,7 +95,8 @@ end
target = OS
opt = nil
-ARGV.options do |opt|
+ARGV.options do |opt2|
+ opt = opt2
opt.banner << " config.status map.rb"
opt.on("--target OS") {|t| target = t}
opt.parse! and (1..2) === ARGV.size
diff --git a/ext/iconv/extconf.rb b/ext/iconv/extconf.rb
index 9632bf4db9..c4a57c80d6 100644
--- a/ext/iconv/extconf.rb
+++ b/ext/iconv/extconf.rb
@@ -7,6 +7,7 @@ conf = with_config("config-charset", enable_config("config-charset", conf))
if have_func("iconv", "iconv.h") or
have_library("iconv", "iconv", "iconv.h")
+ check_signedness("size_t")
if checking_for("const of iconv() 2nd argument") do
create_tmpsrc(cpp_include("iconv.h") + "---> iconv(cd,0,0,0,0) <---")
src = xpopen(cpp_command("")) {|f|f.read}
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index c4c6fd8124..c1d59c5fc6 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -115,7 +115,7 @@ static iconv_t iconv_create _((VALUE to, VALUE from, struct rb_iconv_opt_t *opt,
static void iconv_dfree _((void *cd));
static VALUE iconv_free _((VALUE cd));
static VALUE iconv_try _((iconv_t cd, const char **inptr, size_t *inlen, char **outptr, size_t *outlen));
-static VALUE rb_str_derive _((VALUE str, const char* ptr, int len));
+static VALUE rb_str_derive _((VALUE str, const char* ptr, long len));
static VALUE iconv_convert _((iconv_t cd, VALUE str, long start, long length, int toidx,
struct iconv_env_t* env));
static VALUE iconv_s_allocate _((VALUE klass));
@@ -386,7 +386,7 @@ iconv_fail_retry(VALUE error, VALUE success, VALUE failed, struct iconv_env_t* e
}
static VALUE
-rb_str_derive(VALUE str, const char* ptr, int len)
+rb_str_derive(VALUE str, const char* ptr, long len)
{
VALUE ret;
@@ -442,7 +442,7 @@ iconv_convert(iconv_t cd, VALUE str, long start, long length, int toidx, struct
length = 0;
}
else {
- int slen;
+ long slen;
StringValue(str);
slen = RSTRING_LEN(str);
@@ -464,7 +464,11 @@ iconv_convert(iconv_t cd, VALUE str, long start, long length, int toidx, struct
errmsg[0] = 0;
error = iconv_try(cd, &inptr, &inlen, &outptr, &outlen);
- if (0 <= outlen && outlen <= sizeof(buffer)) {
+ if (
+#if SIGNEDNESS_OF_SIZE_T < 0
+ 0 <= outlen &&
+#endif
+ outlen <= sizeof(buffer)) {
outlen = sizeof(buffer) - outlen;
if (NIL_P(error) || /* something converted */
outlen > (size_t)(inptr - tmpstart) || /* input can't contain output */
diff --git a/ext/iconv/mkwrapper.rb b/ext/iconv/mkwrapper.rb
index 34718507d6..6438e57fec 100644
--- a/ext/iconv/mkwrapper.rb
+++ b/ext/iconv/mkwrapper.rb
@@ -43,9 +43,9 @@ def charset_alias(config_charset, mapfile = nil)
end
src << " end" << "end"
if mapfile
- open(mapfile, "wb") {|f| f.puts *src}
+ open(mapfile, "wb") {|f| f.puts(*src)}
else
- puts *src
+ puts(*src)
end
end
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 6a3e200ee7..97c5583b92 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -963,6 +963,9 @@ ossl_ssl_initialize(int argc, VALUE *argv, VALUE self)
ossl_ssl_set_ctx(self, ctx);
ossl_ssl_set_sync_close(self, Qfalse);
ossl_sslctx_setup(ctx);
+
+ rb_iv_set(self, "@hostname", Qnil);
+
rb_call_super(0, 0);
return self;
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index b4394c207c..a94d2f249f 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -605,11 +605,11 @@ pty_check(int argc, VALUE *argv, VALUE self)
int status;
rb_scan_args(argc, argv, "11", &pid, &exc);
- cpid = rb_waitpid(NUM2PIDT(pid), &status, WUNTRACED);
+ cpid = rb_waitpid(NUM2PIDT(pid), &status, WNOHANG|WUNTRACED);
if (cpid == -1) return Qnil;
- if (!RTEST(exc)) return status;
- raise_from_check(pid, status);
+ if (!RTEST(exc)) return rb_last_status_get();
+ raise_from_check(cpid, status);
return Qnil; /* not reached */
}
diff --git a/ext/purelib.rb b/ext/purelib.rb
index 6418fd618d..cc1a00bdb2 100644
--- a/ext/purelib.rb
+++ b/ext/purelib.rb
@@ -6,7 +6,7 @@ $:.each_with_index {|path, index|
end
}
if nul
- removed, $:[nul..-1] = $:[nul..-1], ["."]
+ removed, $:[nul..-1] = $:[nul..-1], []
if defined?(Gem::QuickLoader)
removed.each do |path|
# replaces a fake rubygems by gem_prelude.rb with an alternative path
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index abb9a0a33a..ff30be1503 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -247,7 +247,7 @@ readline_readline(int argc, VALUE *argv, VALUE self)
prompt = RSTRING_PTR(tmp);
}
- if (!isatty(0) && errno == EBADF) rb_raise(rb_eIOError, "closed stdin");
+ if (!isatty(fileno(rl_instream)) && errno == EBADF) rb_raise(rb_eIOError, "closed stdin");
#ifdef _WIN32
rl_prep_terminal(1);
@@ -1463,4 +1463,6 @@ Init_readline()
#ifdef HAVE_RL_CLEAR_SIGNALS
rl_clear_signals();
#endif
+
+ readline_s_set_input(mReadline, rb_stdin);
}
diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h
index 171d3c2ce7..806b00e368 100644
--- a/ext/socket/addrinfo.h
+++ b/ext/socket/addrinfo.h
@@ -29,7 +29,6 @@
#ifndef ADDR_INFO_H
#define ADDR_INFO_H
-#ifndef HAVE_GETADDRINFO
/* special compatibility hack */
#undef EAI_ADDRFAMILY
@@ -62,17 +61,6 @@
#undef NI_NUMERICSERV
#undef NI_DGRAM
-#undef addrinfo
-#define addrinfo addrinfo__compat
-#undef getaddrinfo
-#define getaddrinfo getaddrinfo__compat
-#undef getnameinfo
-#define getnameinfo getnameinfo__compat
-#undef freehostent
-#define freehostent freehostent__compat
-#undef freeaddrinfo
-#define freeaddrinfo freeaddrinfo__compat
-
#ifndef __P
# ifdef HAVE_PROTOTYPES
# define __P(args) args
@@ -111,6 +99,7 @@
#define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */
/* valid flags for addrinfo */
#ifndef __HAIKU__
+#undef AI_MASK
#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV)
#endif
@@ -138,6 +127,7 @@
#define NI_NUMERICSERV 0x00000008
#define NI_DGRAM 0x00000010
+#ifndef HAVE_TYPE_STRUCT_ADDRINFO
struct addrinfo {
int ai_flags; /* AI_PASSIVE, AI_CANONNAME */
int ai_family; /* PF_xxx */
@@ -148,6 +138,24 @@ struct addrinfo {
struct sockaddr *ai_addr; /* binary address */
struct addrinfo *ai_next; /* next structure in linked list */
};
+#endif
+
+#ifndef HAVE_GETADDRINFO
+#undef getaddrinfo
+#define getaddrinfo getaddrinfo__compat
+#endif
+#ifndef HAVE_GETNAMEINFO
+#undef getnameinfo
+#define getnameinfo getnameinfo__compat
+#endif
+#ifndef HAVE_FREEHOSTENT
+#undef freehostent
+#define freehostent freehostent__compat
+#endif
+#ifndef HAVE_FREEADDRINFO
+#undef freeaddrinfo
+#define freeaddrinfo freeaddrinfo__compat
+#endif
extern int getaddrinfo __P((
const char *hostname, const char *servname,
@@ -156,21 +164,20 @@ extern int getaddrinfo __P((
extern int getnameinfo __P((
const struct sockaddr *sa,
- size_t salen,
+ socklen_t salen,
char *host,
- size_t hostlen,
+ socklen_t hostlen,
char *serv,
- size_t servlen,
+ socklen_t servlen,
int flags));
extern void freehostent __P((struct hostent *));
extern void freeaddrinfo __P((struct addrinfo *));
-#if defined __UCLIBC__
+extern
+#ifdef GAI_STRERROR_CONST
const
#endif
-#ifndef __HAIKU__
-extern char *gai_strerror __P((int));
-#endif
+char *gai_strerror __P((int));
/* In case there is no definition of offsetof() provided - though any proper
Standard C system should have one. */
@@ -180,4 +187,3 @@ Standard C system should have one. */
#endif
#endif
-#endif
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 8714add1d4..370e5b59e0 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -394,7 +394,7 @@ ancillary_int(VALUE self)
return INT2NUM(i);
}
-#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) && defined(HAVE_IPI_SPEC_DST) /* GNU/Linux */
+#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST) /* GNU/Linux */
/*
* call-seq:
* Socket::AncillaryData.ip_pktinfo(addr, ifindex) => ancdata
@@ -458,7 +458,7 @@ ancillary_s_ip_pktinfo(int argc, VALUE *argv, VALUE self)
#define ancillary_s_ip_pktinfo rb_f_notimplement
#endif
-#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) && defined(HAVE_IPI_SPEC_DST) /* GNU/Linux */
+#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST) /* GNU/Linux */
/*
* call-seq:
* ancdata.ip_pktinfo => [addr, ifindex, spec_dst]
@@ -793,7 +793,7 @@ anc_inspect_ip_recvdstaddr(int level, int type, VALUE data, VALUE ret)
}
#endif
-#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) && defined(HAVE_IPI_SPEC_DST) /* GNU/Linux */
+#if defined(IPPROTO_IP) && defined(IP_PKTINFO) && defined(HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST) /* GNU/Linux */
static int
anc_inspect_ip_pktinfo(int level, int type, VALUE data, VALUE ret)
{
@@ -1045,7 +1045,7 @@ ancillary_inspect(VALUE self)
# if defined(IP_RECVDSTADDR) /* 4.4BSD */
case IP_RECVDSTADDR: inspected = anc_inspect_ip_recvdstaddr(level, type, data, ret); break;
# endif
-# if defined(IP_PKTINFO) && defined(HAVE_TYPE_STRUCT_IN_PKTINFO) && defined(HAVE_IPI_SPEC_DST) /* GNU/Linux */
+# if defined(IP_PKTINFO) && defined(HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST) /* GNU/Linux */
case IP_PKTINFO: inspected = anc_inspect_ip_pktinfo(level, type, data, ret); break;
# endif
}
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index bb1bda57df..fdbbd15781 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -148,7 +148,9 @@ bsock_close_write(VALUE sock)
/*
* Document-method: setsockopt
- * call-seq: setsockopt(level, optname, optval)
+ * call-seq:
+ * setsockopt(level, optname, optval)
+ * setsockopt(socketoption)
*
* Sets a socket option. These are protocol and system specific, see your
* local system documentation for details.
@@ -156,8 +158,12 @@ bsock_close_write(VALUE sock)
* === Parameters
* * +level+ is an integer, usually one of the SOL_ constants such as
* Socket::SOL_SOCKET, or a protocol level.
+ * A string or symbol of the name, possibly without prefix, is also
+ * accepted.
* * +optname+ is an integer, usually one of the SO_ constants, such
* as Socket::SO_REUSEADDR.
+ * A string or symbol of the name, possibly without prefix, is also
+ * accepted.
* * +optval+ is the value of the option, it is passed to the underlying
* setsockopt() as a pointer to a certain number of bytes. How this is
* done depends on the type:
@@ -167,16 +173,21 @@ bsock_close_write(VALUE sock)
* int is passed as for a Fixnum. Note that +false+ must be passed,
* not +nil+.
* - String: the string's data and length is passed to the socket.
+ * * +socketoption+ is an instance of Socket::Option
*
* === Examples
*
* Some socket options are integers with boolean values, in this case
* #setsockopt could be called like this:
+ * sock.setsockopt(:SOCKET, :REUSEADDR, true)
* sock.setsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR, true)
+ * sock.setsockopt(Socket::Option.bool(:INET, :SOCKET, :REUSEADDR, true))
*
* Some socket options are integers with numeric values, in this case
* #setsockopt could be called like this:
+ * sock.setsockopt(:IP, :TTL, 255)
* sock.setsockopt(Socket::IPPROTO_IP, Socket::IP_TTL, 255)
+ * sock.setsockopt(Socket::Option.int(:INET, :IP, :TTL, 255))
*
* Option values may be structs. Passing them can be complex as it involves
* examining your system headers to determine the correct definition. An
@@ -247,28 +258,39 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
#if !defined(__BEOS__)
/*
* Document-method: getsockopt
- * call-seq: getsockopt(level, optname)
+ * call-seq:
+ * getsockopt(level, optname) => socketoption
*
* Gets a socket option. These are protocol and system specific, see your
* local system documentation for details. The option is returned as
- * a String with the data being the binary value of the socket option.
+ * a Socket::Option.
*
* === Parameters
* * +level+ is an integer, usually one of the SOL_ constants such as
* Socket::SOL_SOCKET, or a protocol level.
+ * A string or symbol of the name, possibly without prefix, is also
+ * accepted.
* * +optname+ is an integer, usually one of the SO_ constants, such
* as Socket::SO_REUSEADDR.
+ * A string or symbol of the name, possibly without prefix, is also
+ * accepted.
*
* === Examples
*
* Some socket options are integers with boolean values, in this case
* #getsockopt could be called like this:
+ *
+ * reuseaddr = sock.getsockopt(:SOCKET, :REUSEADDR).bool
+ *
* optval = sock.getsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR)
* optval = optval.unpack "i"
* reuseaddr = optval[0] == 0 ? false : true
*
* Some socket options are integers with numeric values, in this case
* #getsockopt could be called like this:
+ *
+ * ipttl = sock.getsockopt(:IP, :TTL).int
+ *
* optval = sock.getsockopt(Socket::IPPROTO_IP, Socket::IP_TTL)
* ipttl = optval.unpack("i")[0]
*
@@ -282,8 +304,13 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
* };
*
* In this case #getsockopt could be called like this:
+ *
+ * # Socket::Option knows linger structure.
+ * onoff, linger = sock.getsockopt(:SOCKET, :LINGER).linger
+ *
* optval = sock.getsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER)
* onoff, linger = optval.unpack "ii"
+ * onoff = onoff == 0 ? false : true
*/
static VALUE
bsock_getsockopt(VALUE sock, VALUE lev, VALUE optname)
diff --git a/ext/socket/depend b/ext/socket/depend
index 000a013c5f..f870b9f834 100644
--- a/ext/socket/depend
+++ b/ext/socket/depend
@@ -1,6 +1,6 @@
SOCK_HEADERS = $(srcdir)/rubysocket.h $(hdrdir)/ruby/ruby.h $(arch_hdrdir)/ruby/config.h \
$(hdrdir)/ruby/defines.h $(hdrdir)/ruby/io.h \
- $(srcdir)/sockport.h constdefs.h
+ $(srcdir)/addrinfo.h $(srcdir)/sockport.h constdefs.h
init.o: init.c $(SOCK_HEADERS)
constants.o: constants.c constdefs.c $(SOCK_HEADERS)
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 8b0f2eb110..20952e31f6 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -107,7 +107,7 @@ if have_struct_member("struct sockaddr", "sa_len", headers)
$defs[-1] = "-DHAVE_SA_LEN "
end
-have_header("netinet/tcp.h") if not /cygwin/ =~ RUBY_PLATFORM # for cygwin 1.1.5
+have_header("netinet/tcp.h") if /cygwin/ !~ RUBY_PLATFORM # for cygwin 1.1.5
have_header("netinet/udp.h")
if have_func("sendmsg") | have_func("recvmsg")
@@ -115,8 +115,8 @@ if have_func("sendmsg") | have_func("recvmsg")
have_struct_member('struct msghdr', 'msg_accrights', ['sys/types.h', 'sys/socket.h'])
end
-getaddr_info_ok = enable_config("wide-getaddrinfo") do
- checking_for("wide getaddrinfo") {try_run(<<EOF)}
+getaddr_info_ok = (enable_config("wide-getaddrinfo") && :wide) ||
+ (checking_for("wide getaddrinfo") {try_run(<<EOF)} && :os)
#{cpp_include(headers)}
#include <stdlib.h>
@@ -224,7 +224,6 @@ main()
exit(EXIT_FAILURE);
}
EOF
-end
if ipv6 and not getaddr_info_ok
abort <<EOS
@@ -249,6 +248,23 @@ Fatal: invalid value for --with-lookup-order-hack (expected INET, INET6 or UNSPE
EOS
end
+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
+conftest_gai_strerror_is_const()
+{
+ *gai_strerror(0) = 0;
+}
+EOF
+ $defs << "-DGAI_STRERROR_CONST"
+ end
+end
+
$objs = [
"init.#{$OBJEXT}",
"constants.#{$OBJEXT}",
@@ -266,9 +282,13 @@ $objs = [
"raddrinfo.#{$OBJEXT}"
]
-unless getaddr_info_ok and have_func("getnameinfo", headers) and have_func("getaddrinfo", headers)
+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] = "-DHAVE_ADDR8"
+ $defs[-1] = "s6_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}"]
@@ -277,19 +297,6 @@ unless getaddr_info_ok and have_func("getnameinfo", headers) and have_func("geta
have_func("inet_ntop") or have_func("inet_ntoa")
have_func("inet_pton") or have_func("inet_aton")
have_func("getservbyport")
- if have_func("gai_strerror")
- unless checking_for("gai_strerror() returns const pointer") {!try_compile(<<EOF)}
-#{cpp_include(headers)}
-#include <stdlib.h>
-void
-conftest_gai_strerror_is_const()
-{
- *gai_strerror(0) = 0;
-}
-EOF
- $defs << "-DGAI_STRERROR_CONST"
- end
- end
have_header("arpa/nameser.h")
have_header("resolv.h")
end
@@ -312,14 +319,11 @@ have_header("sys/uio.h")
have_type("struct in_pktinfo", headers) {|src|
src.sub(%r'^/\*top\*/', '\1'"\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\*/', '\1'"\n#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO)") <<
"#else\n" << "#error\n" << ">>>>>> no in6_pktinfo <<<<<<\n" << "#endif\n"
}
-if have_struct_member("struct in_pktinfo", "ipi_spec_dst", headers)
- $defs[-1] = "-DHAVE_IPI_SPEC_DST"
-end
have_type("struct sockcred", headers)
have_type("struct cmsgcred", headers)
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index 53656b4c02..d5ef517943 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -83,10 +83,6 @@
#include "addrinfo.h"
#include "sockport.h"
-#if defined(__KAME__) && defined(INET6)
-# define FAITH
-#endif
-
#define SUCCESS 0
#define ANY 0
#define YES 1
@@ -482,11 +478,7 @@ getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *h
break;
#ifdef INET6
case AF_INET6:
-#ifdef HAVE_ADDR8
- pfx = ((struct in6_addr *)pton)->s6_addr8[0];
-#else
pfx = ((struct in6_addr *)pton)->s6_addr[0];
-#endif
if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
pai->ai_flags &= ~AI_CANONNAME;
break;
@@ -651,9 +643,10 @@ get_addr(const char *hostname, int af, struct addrinfo **res, struct addrinfo *p
GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);
in6 = &((struct sockaddr_in6 *)cur->ai_next->ai_addr)->sin6_addr;
- memcpy(&in6->s6_addr32[0], &faith_prefix,
- sizeof(struct in6_addr) - sizeof(struct in_addr));
- memcpy(&in6->s6_addr32[3], ap, sizeof(struct in_addr));
+ memcpy(&in6->s6_addr, &faith_prefix,
+ sizeof(struct in6_addr) - sizeof(struct in_addr));
+ memcpy(&in6->s6_addr + sizeof(struct in_addr), ap,
+ sizeof(struct in_addr));
} else
#endif /* FAITH */
GET_AI(cur->ai_next, afd, ap, port);
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index 689b91c291..7f090e9655 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -35,6 +35,9 @@
*/
#include "ruby/config.h"
+#ifdef RUBY_EXTCONF_H
+#include RUBY_EXTCONF_H
+#endif
#include <stdio.h>
#include <sys/types.h>
#ifndef _WIN32
@@ -133,7 +136,7 @@ inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len)
#endif
int
-getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags)
+getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags)
{
struct afd *afd;
struct hostent *hp;
diff --git a/ext/socket/init.c b/ext/socket/init.c
index b143dccd5f..d744f8c559 100644
--- a/ext/socket/init.c
+++ b/ext/socket/init.c
@@ -28,7 +28,7 @@ VALUE rb_eSocket;
VALUE rb_cSOCKSSocket;
#endif
-int rsock_do_not_reverse_lookup = 0;
+int rsock_do_not_reverse_lookup = 1;
void
rsock_raise_socket_error(const char *reason, int error)
diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c
index e87f9edc00..ee455998f0 100644
--- a/ext/socket/ipsocket.c
+++ b/ext/socket/ipsocket.c
@@ -129,61 +129,108 @@ rsock_init_inetsock(VALUE sock, VALUE remote_host, VALUE remote_serv,
inetsock_cleanup, (VALUE)&arg);
}
+static ID id_numeric, id_hostname;
+
+int
+rsock_revlookup_flag(VALUE revlookup, int *norevlookup)
+{
+#define return_norevlookup(x) {*norevlookup = x; return 1;}
+ ID id;
+
+ switch (revlookup) {
+ case Qtrue: return_norevlookup(0);
+ case Qfalse: return_norevlookup(1);
+ case Qnil: break;
+ default:
+ Check_Type(revlookup, T_SYMBOL);
+ id = SYM2ID(revlookup);
+ if (id == id_numeric) return_norevlookup(1);
+ if (id == id_hostname) return_norevlookup(0);
+ rb_raise(rb_eArgError, "invalid reverse_lookup flag: :%s", rb_id2name(id));
+ }
+ return 0;
+#undef return_norevlookup
+}
+
/*
* call-seq:
- * ipsocket.addr => [address_family, port, hostname, numeric_address]
+ * ipsocket.addr([reverse_lookup]) => [address_family, port, hostname, numeric_address]
*
* Returns the local address as an array which contains
* address_family, port, hostname and numeric_address.
*
+ * If +reverse_lookup+ is +true+ or +:hostname+,
* hostname is obtained from numeric_address using reverse lookup.
- * If ipsocket.do_not_reverse_lookup is true,
+ * Or if it is +false+, or +:numeric+,
* hostname is same as numeric_address.
+ * Or if it is +nil+ or ommitted, obeys to +ipsocket.do_not_reverse_lookup+.
+ * See +Socket.getaddrinfo+ also.
*
* TCPSocket.open("www.ruby-lang.org", 80) {|sock|
* p sock.addr #=> ["AF_INET", 49429, "hal", "192.168.0.128"]
+ * p sock.addr(true) #=> ["AF_INET", 49429, "hal", "192.168.0.128"]
+ * p sock.addr(false) #=> ["AF_INET", 49429, "192.168.0.128", "192.168.0.128"]
+ * p sock.addr(:hostname) #=> ["AF_INET", 49429, "hal", "192.168.0.128"]
+ * p sock.addr(:numeric) #=> ["AF_INET", 49429, "192.168.0.128", "192.168.0.128"]
* }
*
*/
static VALUE
-ip_addr(VALUE sock)
+ip_addr(int argc, VALUE *argv, VALUE sock)
{
rb_io_t *fptr;
struct sockaddr_storage addr;
socklen_t len = sizeof addr;
+ int norevlookup;
GetOpenFile(sock, fptr);
+ if (argc < 1 || !rsock_revlookup_flag(argv[0], &norevlookup))
+ norevlookup = fptr->mode & FMODE_NOREVLOOKUP;
if (getsockname(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
rb_sys_fail("getsockname(2)");
- return rsock_ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP);
+ return rsock_ipaddr((struct sockaddr*)&addr, norevlookup);
}
/*
* call-seq:
- * ipsocket.peeraddr => [address_family, port, hostname, numeric_address]
+ * ipsocket.peeraddr([reverse_lookup]) => [address_family, port, hostname, numeric_address]
*
* Returns the remote address as an array which contains
* address_family, port, hostname and numeric_address.
* It is defined for connection oriented socket such as TCPSocket.
*
+ * If +reverse_lookup+ is +true+ or +:hostname+,
+ * hostname is obtained from numeric_address using reverse lookup.
+ * Or if it is +false+, or +:numeric+,
+ * hostname is same as numeric_address.
+ * Or if it is +nil+ or ommitted, obeys to +ipsocket.do_not_reverse_lookup+.
+ * See +Socket.getaddrinfo+ also.
+ *
* TCPSocket.open("www.ruby-lang.org", 80) {|sock|
* p sock.peeraddr #=> ["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68"]
+ * p sock.peeraddr(true) #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"]
+ * p sock.peeraddr(false) #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"]
+ * p sock.peeraddr(:hostname) #=> ["AF_INET", 80, "carbon.ruby-lang.org", "221.186.184.68"]
+ * p sock.peeraddr(:numeric) #=> ["AF_INET", 80, "221.186.184.68", "221.186.184.68"]
* }
*
*/
static VALUE
-ip_peeraddr(VALUE sock)
+ip_peeraddr(int argc, VALUE *argv, VALUE sock)
{
rb_io_t *fptr;
struct sockaddr_storage addr;
socklen_t len = sizeof addr;
+ int norevlookup;
GetOpenFile(sock, fptr);
+ if (argc < 1 || !rsock_revlookup_flag(argv[0], &norevlookup))
+ norevlookup = fptr->mode & FMODE_NOREVLOOKUP;
if (getpeername(fptr->fd, (struct sockaddr*)&addr, &len) < 0)
rb_sys_fail("getpeername(2)");
- return rsock_ipaddr((struct sockaddr*)&addr, fptr->mode & FMODE_NOREVLOOKUP);
+ return rsock_ipaddr((struct sockaddr*)&addr, norevlookup);
}
/*
@@ -243,10 +290,12 @@ void
Init_ipsocket(void)
{
rb_cIPSocket = rb_define_class("IPSocket", rb_cBasicSocket);
- rb_define_method(rb_cIPSocket, "addr", ip_addr, 0);
- rb_define_method(rb_cIPSocket, "peeraddr", ip_peeraddr, 0);
+ rb_define_method(rb_cIPSocket, "addr", ip_addr, -1);
+ rb_define_method(rb_cIPSocket, "peeraddr", ip_peeraddr, -1);
rb_define_method(rb_cIPSocket, "recvfrom", ip_recvfrom, -1);
rb_define_singleton_method(rb_cIPSocket, "getaddress", ip_s_getaddress, 1);
rb_undef_method(rb_cIPSocket, "getpeereid");
+ id_numeric = rb_intern_const("numeric");
+ id_hostname = rb_intern_const("hostname");
}
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index fed3f2391e..de8c7dc768 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -479,36 +479,39 @@ typedef struct {
} rb_addrinfo_t;
static void
-addrinfo_mark(rb_addrinfo_t *rai)
+addrinfo_mark(void *ptr)
{
+ rb_addrinfo_t *rai = ptr;
if (rai) {
rb_gc_mark(rai->inspectname);
rb_gc_mark(rai->canonname);
}
}
-static void
-addrinfo_free(rb_addrinfo_t *rai)
+#define addrinfo_free RUBY_TYPED_DEFAULT_FREE
+
+static size_t
+addrinfo_memsize(const void *ptr)
{
- xfree(rai);
+ return ptr ? sizeof(rb_addrinfo_t) : 0;
}
+static const rb_data_type_t addrinfo_type = {
+ "socket/addrinfo",
+ addrinfo_mark, addrinfo_free, addrinfo_memsize,
+};
+
static VALUE
addrinfo_s_allocate(VALUE klass)
{
- return Data_Wrap_Struct(klass, addrinfo_mark, addrinfo_free, 0);
+ return TypedData_Wrap_Struct(klass, &addrinfo_type, 0);
}
-#define IS_ADDRINFO(obj) (RDATA(obj)->dmark == (RUBY_DATA_FUNC)addrinfo_mark)
-static rb_addrinfo_t *
+#define IS_ADDRINFO(obj) rb_typeddata_is_kind_of(obj, &addrinfo_type)
+static inline rb_addrinfo_t *
check_addrinfo(VALUE self)
{
- Check_Type(self, RUBY_T_DATA);
- if (!IS_ADDRINFO(self)) {
- rb_raise(rb_eTypeError, "wrong argument type %s (expected Addrinfo)",
- rb_class2name(CLASS_OF(self)));
- }
- return DATA_PTR(self);
+ return rb_check_typeddata(self, &addrinfo_type);
}
static rb_addrinfo_t *
@@ -2040,7 +2043,7 @@ VALUE
rsock_sockaddr_string_value(volatile VALUE *v)
{
VALUE val = *v;
- if (TYPE(val) == RUBY_T_DATA && IS_ADDRINFO(val)) {
+ if (IS_ADDRINFO(val)) {
*v = addrinfo_to_sockaddr(val);
}
StringValue(*v);
@@ -2057,7 +2060,7 @@ rsock_sockaddr_string_value_ptr(volatile VALUE *v)
VALUE
rb_check_sockaddr_string_type(VALUE val)
{
- if (TYPE(val) == RUBY_T_DATA && IS_ADDRINFO(val))
+ if (IS_ADDRINFO(val))
return addrinfo_to_sockaddr(val);
return rb_check_string_type(val);
}
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 27980c3874..51644887e8 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -98,7 +98,7 @@
#define pseudo_AF_FTIP pseudo_AF_RTIP
#ifndef HAVE_GETADDRINFO
-# include "addrinfo.h"
+#include "addrinfo.h"
#endif
#include "sockport.h"
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index bdc6d16d1c..ab7bd95094 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -502,12 +502,12 @@ sock_listen(VALUE sock, VALUE log)
/*
* call-seq:
- * socket.recvfrom(maxlen) => [mesg, sender_sockaddr]
- * socket.recvfrom(maxlen, flags) => [mesg, sender_sockaddr]
+ * 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
- * received. The second element, _sender_sockaddr_, contains protocol-specific information
+ * received. The second element, _sender_addrinfo_, contains protocol-specific information
* on the sender.
*
* === Parameters
@@ -522,7 +522,7 @@ sock_listen(VALUE sock, VALUE log)
* sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
* socket.bind( sockaddr )
* socket.listen( 5 )
- * client, client_sockaddr = socket.accept
+ * client, client_addrinfo = socket.accept
* data = client.recvfrom( 20 )[0].chomp
* puts "I only received 20 bytes '#{data}'"
* sleep 1
@@ -613,14 +613,14 @@ sock_recvfrom(int argc, VALUE *argv, VALUE sock)
/*
* call-seq:
- * socket.recvfrom_nonblock(maxlen) => [mesg, sender_sockaddr]
- * socket.recvfrom_nonblock(maxlen, flags) => [mesg, sender_sockaddr]
+ * 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.
* _flags_ is zero or more of the +MSG_+ options.
* The first element of the results, _mesg_, is the data received.
- * The second element, _sender_sockaddr_, contains protocol-specific information
+ * The second element, _sender_addrinfo_, contains protocol-specific information
* on the sender.
*
* When recvfrom(2) returns 0, Socket#recvfrom_nonblock returns
@@ -639,7 +639,7 @@ sock_recvfrom(int argc, VALUE *argv, VALUE sock)
* sockaddr = Socket.sockaddr_in(2200, 'localhost')
* socket.bind(sockaddr)
* socket.listen(5)
- * client, client_sockaddr = socket.accept
+ * client, client_addrinfo = socket.accept
* begin # emulate blocking recvfrom
* pair = client.recvfrom_nonblock(20)
* rescue IO::WaitReadable
@@ -709,14 +709,13 @@ sock_accept(VALUE sock)
/*
* call-seq:
- * socket.accept_nonblock => [client_socket, client_sockaddr]
+ * socket.accept_nonblock => [client_socket, client_addrinfo]
*
* Accepts an incoming connection using accept(2) after
* O_NONBLOCK is set for the underlying file descriptor.
* It returns an array containing the accepted socket
* for the incoming connection, _client_socket_,
- * and a string that contains the +struct+ sockaddr information
- * about the caller, _client_sockaddr_.
+ * and an Addrinfo, _client_addrinfo_.
*
* === Example
* # In one script, start this first
@@ -727,7 +726,7 @@ sock_accept(VALUE sock)
* socket.bind(sockaddr)
* socket.listen(5)
* begin # emulate blocking accept
- * client_socket, client_sockaddr = socket.accept_nonblock
+ * client_socket, client_addrinfo = socket.accept_nonblock
* rescue IO::WaitReadable, Errno::EINTR
* IO.select([socket])
* retry
@@ -774,12 +773,11 @@ sock_accept_nonblock(VALUE sock)
/*
* call-seq:
- * socket.sysaccept => [client_socket_fd, client_sockaddr]
+ * 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_,
- * and a string that contains the +struct+ sockaddr information
- * about the caller, _client_sockaddr_.
+ * and an Addrinfo, _client_addrinfo_.
*
* === Example
* # In one script, start this first
@@ -789,7 +787,7 @@ sock_accept_nonblock(VALUE sock)
* sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
* socket.bind( sockaddr )
* socket.listen( 5 )
- * client_fd, client_sockaddr = socket.sysaccept
+ * client_fd, client_addrinfo = socket.sysaccept
* client_socket = Socket.for_fd( client_fd )
* puts "The client said, '#{client_socket.readline.chomp}'"
* client_socket.puts "Hello from script one!"
@@ -872,7 +870,7 @@ sock_gethostname(VALUE obj)
#endif
static VALUE
-make_addrinfo(struct addrinfo *res0)
+make_addrinfo(struct addrinfo *res0, int norevlookup)
{
VALUE base, ary;
struct addrinfo *res;
@@ -882,7 +880,7 @@ make_addrinfo(struct addrinfo *res0)
}
base = rb_ary_new();
for (res = res0; res; res = res->ai_next) {
- ary = rsock_ipaddr(res->ai_addr, rsock_do_not_reverse_lookup);
+ ary = rsock_ipaddr(res->ai_addr, norevlookup);
if (res->ai_canonname) {
RARRAY_PTR(ary)[2] = rb_str_new2(res->ai_canonname);
}
@@ -904,7 +902,7 @@ sock_sockaddr(struct sockaddr *addr, size_t len)
ptr = (char*)&((struct sockaddr_in*)addr)->sin_addr.s_addr;
len = sizeof(((struct sockaddr_in*)addr)->sin_addr.s_addr);
break;
-#ifdef INET6
+#ifdef AF_INET6
case AF_INET6:
ptr = (char*)&((struct sockaddr_in6*)addr)->sin6_addr.s6_addr;
len = sizeof(((struct sockaddr_in6*)addr)->sin6_addr.s6_addr);
@@ -957,7 +955,7 @@ sock_s_gethostbyaddr(int argc, VALUE *argv)
if (!NIL_P(family)) {
t = rsock_family_arg(family);
}
-#ifdef INET6
+#ifdef AF_INET6
else if (RSTRING_LEN(addr) == 16) {
t = AF_INET6;
}
@@ -1071,7 +1069,7 @@ sock_s_getservbyport(int argc, VALUE *argv)
/*
* call-seq:
- * Socket.getaddrinfo(nodename, servname[, family[, socktype[, protocol[, flags]]]]) => array
+ * Socket.getaddrinfo(nodename, servname[, family[, socktype[, protocol[, flags[, reverse_lookup]]]]]) => array
*
* Obtains address information for _nodename_:_servname_.
*
@@ -1092,14 +1090,22 @@ sock_s_getservbyport(int argc, VALUE *argv)
* # ["AF_INET", 0, "localhost", "127.0.0.1", 2, 2, 17], # PF_INET/SOCK_DGRAM/IPPROTO_UDP
* # ["AF_INET", 0, "localhost", "127.0.0.1", 2, 3, 0]] # PF_INET/SOCK_RAW/IPPROTO_IP
*
+ * _reverse_lookup_ directs the form of the third element, and has to
+ * be one of below.
+ * If it is ommitted, the default value is +nil+.
+ *
+ * +true+, +:hostname+: hostname is obtained from numeric address using reverse lookup, which may take a time.
+ * +false+, +:numeric+: hostname is same as numeric address.
+ * +nil+: obey to the current +do_not_reverse_lookup+ flag.
*/
static VALUE
sock_s_getaddrinfo(int argc, VALUE *argv)
{
- VALUE host, port, family, socktype, protocol, flags, ret;
+ VALUE host, port, family, socktype, protocol, flags, ret, revlookup;
struct addrinfo hints, *res;
+ int norevlookup;
- rb_scan_args(argc, argv, "24", &host, &port, &family, &socktype, &protocol, &flags);
+ rb_scan_args(argc, argv, "25", &host, &port, &family, &socktype, &protocol, &flags, &revlookup);
MEMZERO(&hints, struct addrinfo, 1);
hints.ai_family = NIL_P(family) ? PF_UNSPEC : rsock_family_arg(family);
@@ -1113,9 +1119,12 @@ sock_s_getaddrinfo(int argc, VALUE *argv)
if (!NIL_P(flags)) {
hints.ai_flags = NUM2INT(flags);
}
+ if (NIL_P(revlookup) || !rsock_revlookup_flag(revlookup, &norevlookup)) {
+ norevlookup = rsock_do_not_reverse_lookup;
+ }
res = rsock_getaddrinfo(host, port, &hints, 0);
- ret = make_addrinfo(res);
+ ret = make_addrinfo(res, norevlookup);
freeaddrinfo(res);
return ret;
}
@@ -1414,7 +1423,7 @@ sock_s_unpack_sockaddr_un(VALUE self, VALUE addr)
static VALUE
sockaddr_obj(struct sockaddr *addr)
{
- socklen_t len;
+ size_t len;
#if defined(AF_INET6) && defined(__KAME__)
struct sockaddr_in6 addr6;
#endif
@@ -1545,13 +1554,22 @@ socket_s_ip_address_list(VALUE self)
goto finish;
}
- close(fd);
- fd = -1;
-
list = rb_ary_new();
for (i = 0; i < ln.lifn_count; i++) {
struct lifreq *req = &lc.lifc_req[i];
if (IS_IP_FAMILY(req->lifr_addr.ss_family)) {
+ if (req->lifr_addr.ss_family == AF_INET6 &&
+ IN6_IS_ADDR_LINKLOCAL(&((struct sockaddr_in6 *)(&req->lifr_addr))->sin6_addr) &&
+ ((struct sockaddr_in6 *)(&req->lifr_addr))->sin6_scope_id == 0) {
+ struct lifreq req2;
+ memcpy(req2.lifr_name, req->lifr_name, LIFNAMSIZ);
+ ret = ioctl(fd, SIOCGLIFINDEX, &req2);
+ if (ret == -1) {
+ reason = "SIOCGLIFINDEX";
+ goto finish;
+ }
+ ((struct sockaddr_in6 *)(&req->lifr_addr))->sin6_scope_id = req2.lifr_index;
+ }
rb_ary_push(list, sockaddr_obj((struct sockaddr *)&req->lifr_addr));
}
}
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 802c462b56..faf974e78d 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -696,10 +696,9 @@ strio_extend(struct StringIO *ptr, long pos, long len)
* strio.ungetc(string) -> nil
*
* Pushes back one character (passed as a parameter) onto *strio*
- * such that a subsequent buffered read will return it. Pushing back
- * behind the beginning of the buffer string is not possible. Nothing
- * will be done if such an attempt is made.
- * In other case, there is no limitation for multiple pushbacks.
+ * such that a subsequent buffered read will return it. There is no
+ * limitation for multiple pushbacks including pushing back behind the
+ * beginning of the buffer string.
*/
static VALUE
strio_ungetc(VALUE self, VALUE c)
@@ -726,17 +725,26 @@ strio_ungetc(VALUE self, VALUE c)
c = rb_str_conv_enc(c, enc2, enc);
}
}
- /* get logical position */
- lpos = 0; p = RSTRING_PTR(ptr->string); pend = p + ptr->pos;
- for (;;) {
- clen = rb_enc_mbclen(p, pend, enc);
- if (p+clen >= pend) break;
- p += clen;
- lpos++;
+ if (RSTRING_LEN(ptr->string) < ptr->pos) {
+ long len = RSTRING_LEN(ptr->string);
+ rb_str_resize(ptr->string, ptr->pos - 1);
+ memset(RSTRING_PTR(ptr->string) + len, 0, ptr->pos - len - 1);
+ rb_str_concat(ptr->string, c);
+ ptr->pos--;
+ }
+ else {
+ /* get logical position */
+ lpos = 0; p = RSTRING_PTR(ptr->string); pend = p + ptr->pos;
+ for (;;) {
+ clen = rb_enc_mbclen(p, pend, enc);
+ if (p+clen >= pend) break;
+ p += clen;
+ lpos++;
+ }
+ clen = p - RSTRING_PTR(ptr->string);
+ rb_str_update(ptr->string, lpos, ptr->pos ? 1 : 0, c);
+ ptr->pos = clen;
}
- clen = p - RSTRING_PTR(ptr->string);
- rb_str_update(ptr->string, lpos, ptr->pos ? 1 : 0, c);
- ptr->pos = clen;
return Qnil;
}
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 490689b3d2..f7101823f5 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -353,9 +353,9 @@ strscan_concat(VALUE self, VALUE str)
}
/*
- * Returns the position of the scan pointer. In the 'reset' position, this
+ * Returns the byte position of the scan pointer. In the 'reset' position, this
* value is zero. In the 'terminated' position (i.e. the string is exhausted),
- * this value is the length of the string.
+ * this value is the bytesize of the string.
*
* In short, it's a 0-based index into the string.
*
@@ -378,7 +378,7 @@ strscan_get_pos(VALUE self)
/*
* call-seq: pos=(n)
*
- * Modify the scan pointer.
+ * Set the byte position of the scan pointer.
*
* s = StringScanner.new('test string')
* s.pos = 7 # -> 7
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 7552abed91..f17a6af4d2 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -1174,6 +1174,8 @@ module TkCore
opts = ''
end
+ # RUN_EVENTLOOP_ON_MAIN_THREAD = true
+
unless self.const_defined? :RUN_EVENTLOOP_ON_MAIN_THREAD
if WITH_RUBY_VM ### check Ruby 1.9 !!!!!!!
# *** NEED TO FIX ***
@@ -1275,6 +1277,14 @@ module TkCore
INTERP = INTERP_THREAD[:interp]
INTERP_THREAD_STATUS = INTERP_THREAD[:status]
+
+ # delete the interpreter and kill the eventloop thread at exit
+ END{
+ if INTERP_THREAD.alive?
+ INTERP.delete
+ INTERP_THREAD.kill
+ end
+ }
end
def INTERP.__getip
@@ -4890,7 +4900,7 @@ class TkObject<TkKernel
begin
cget(name)
rescue
- if self.kind_of?(TkWindow)
+ if self.kind_of?(TkWindow) && name != "to_ary" && name != "to_str"
fail NameError,
"unknown option '#{id}' for #{self.inspect} (deleted widget?)"
else
diff --git a/ext/tk/lib/tk/variable.rb b/ext/tk/lib/tk/variable.rb
index f6ebe551fb..0487b034bd 100644
--- a/ext/tk/lib/tk/variable.rb
+++ b/ext/tk/lib/tk/variable.rb
@@ -1164,10 +1164,8 @@ end
[other, self.to_s]
when Symbol
[other, self.to_sym]
- when Integer
- [other, self.to_i]
- when Float
- [other, self.to_f]
+ when Numeric
+ [other, self.numeric]
when Array
[other, self.to_a]
else
@@ -1218,7 +1216,7 @@ end
end
end
def *(other)
- num_or_str(self._value) * other.to_i
+ num_or_str(self._value) * other
#begin
# number(self._value) * other
#rescue
@@ -1229,7 +1227,7 @@ end
number(self._value) / other
end
def %(other)
- num_or_str(self._value) % other.to_i
+ num_or_str(self._value) % other
#begin
# number(self._value) % other
#rescue
diff --git a/ext/tk/lib/tkextlib/tcllib/plotchart.rb b/ext/tk/lib/tkextlib/tcllib/plotchart.rb
index 6b7a526b75..3c944bb266 100644
--- a/ext/tk/lib/tkextlib/tcllib/plotchart.rb
+++ b/ext/tk/lib/tkextlib/tcllib/plotchart.rb
@@ -145,8 +145,8 @@ module Tk::Tcllib::Plotchart
list(tk_call_without_enc('::Plotchart::coordsToPixel', w.path, x, y))
end
- def self.determine_scale(w, xmax, ymax)
- tk_call_without_enc('::Plotchart::determineScale', w.path, xmax, ymax)
+ def self.determine_scale(*args) # (xmin, xmax, inverted=false)
+ tk_call_without_enc('::Plotchart::determineScale', *args)
end
def self.set_zoom_pan(w)
diff --git a/ext/tk/sample/tkballoonhelp.rb b/ext/tk/sample/tkballoonhelp.rb
index a9bd371db6..a9c00d230d 100644
--- a/ext/tk/sample/tkballoonhelp.rb
+++ b/ext/tk/sample/tkballoonhelp.rb
@@ -111,12 +111,24 @@ class Tk::RbWidget::BalloonHelp<TkLabel
@frame.deiconify
@frame.raise
- @org_cursor = @parent['cursor']
- @parent.cursor('crosshair')
+ begin
+ @org_cursor = @parent.cget('cursor')
+ rescue
+ @org_cursor = @parent['cursor']
+ end
+ begin
+ @parent.configure('cursor', 'crosshair')
+ rescue
+ @parent.cursor('crosshair')
+ end
end
def erase
- @parent.cursor(@org_cursor)
+ begin
+ @parent.configure('cursor', @org_cursor)
+ rescue
+ @parent.cursor(@org_cursor)
+ end
@frame.withdraw
end
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c
index 6a670ce6fa..76cb5345be 100644
--- a/ext/tk/tkutil/tkutil.c
+++ b/ext/tk/tkutil/tkutil.c
@@ -1167,8 +1167,8 @@ subst_free(ptr)
}
}
-static struct cbsubst_info *
-allocate_cbsubst_info()
+static VALUE
+allocate_cbsubst_info(struct cbsubst_info **inf_ptr)
{
struct cbsubst_info *inf;
volatile VALUE proc, aliases;
@@ -1191,15 +1191,16 @@ allocate_cbsubst_info()
aliases = rb_hash_new();
inf->aliases = aliases;
- return inf;
+ if (inf_ptr != (struct cbsubst_info **)NULL) *inf_ptr = inf;
+
+ return Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free, inf);
}
static void
cbsubst_init()
{
- rb_const_set(cCB_SUBST, ID_SUBST_INFO,
- Data_Wrap_Struct(cSUBST_INFO, subst_mark, subst_free,
- allocate_cbsubst_info()));
+ rb_const_set(cCB_SUBST, ID_SUBST_INFO,
+ allocate_cbsubst_info((struct cbsubst_info **)NULL));
}
static VALUE
@@ -1517,6 +1518,7 @@ cbsubst_table_setup(argc, argv, self)
VALUE *argv;
VALUE self;
{
+ volatile VALUE cbsubst_obj;
volatile VALUE key_inf;
volatile VALUE longkey_inf;
volatile VALUE proc_inf;
@@ -1538,7 +1540,7 @@ cbsubst_table_setup(argc, argv, self)
}
/* init */
- subst_inf = allocate_cbsubst_info();
+ cbsubst_obj = allocate_cbsubst_info(&subst_inf);
/*
* keys : array of [subst, type, ivar]
@@ -1625,9 +1627,7 @@ cbsubst_table_setup(argc, argv, self)
RARRAY_PTR(inf)[1]);
}
- rb_const_set(self, ID_SUBST_INFO,
- Data_Wrap_Struct(cSUBST_INFO, subst_mark,
- subst_free, subst_inf));
+ rb_const_set(self, ID_SUBST_INFO, cbsubst_obj);
return self;
}
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/win32ole.c b/ext/win32ole/win32ole.c
index 080d3aa2d2..3fff8ba171 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -130,7 +130,7 @@ const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00,
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
-#define WIN32OLE_VERSION "1.4.6"
+#define WIN32OLE_VERSION "1.4.7"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -357,6 +357,10 @@ 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(VALUE pair, struct oleparam* pOp);
static VALUE set_argv(VARIANTARG* realargs, unsigned int beg, unsigned int end);
@@ -509,6 +513,10 @@ static VALUE folemethod_size_opt_params(VALUE self);
static VALUE ole_method_params(ITypeInfo *pTypeInfo, UINT method_index);
static VALUE folemethod_params(VALUE self);
static VALUE folemethod_inspect(VALUE self);
+static VALUE foleparam_s_allocate(VALUE klass);
+static VALUE oleparam_ole_param_from_index(VALUE self, ITypeInfo *pTypeInfo, UINT method_index, int param_index);
+static VALUE oleparam_ole_param(VALUE self, VALUE olemethod, int n);
+static VALUE foleparam_initialize(VALUE self, VALUE olemethod, VALUE n);
static VALUE foleparam_name(VALUE self);
static VALUE ole_param_ole_type(ITypeInfo *pTypeInfo, UINT method_index, UINT index);
static VALUE foleparam_ole_type(VALUE self);
@@ -2489,7 +2497,7 @@ ole_const_load(ITypeLib *pTypeLib, VALUE klass, VALUE self)
continue;
pName = ole_wc2mb(bstr);
val = ole_variant2val(V_UNION1(pVarDesc, lpvarValue));
- *pName = toupper(*pName);
+ *pName = toupper((int)*pName);
id = rb_intern(pName);
if (rb_is_const_id(id)) {
rb_define_const(klass, pName, val);
@@ -3088,6 +3096,42 @@ fole_s_create_guid(VALUE self)
}
/*
+ * WIN32OLE.ole_initialize and WIN32OLE.ole_uninitialize
+ * are used in win32ole.rb to fix the issue bug #2618 (ruby-core:27634).
+ * 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_pure_initialize();
+ return Qnil;
+}
+
+/* :nodoc */
+static VALUE
+fole_s_ole_uninitialize(VALUE self)
+{
+ ole_pure_uninitialize();
+ return Qnil;
+}
+
+/*
* Document-class: WIN32OLE
*
* <code>WIN32OLE</code> objects represent OLE Automation object in Ruby.
@@ -7159,6 +7203,74 @@ folemethod_inspect(VALUE self)
* <code>WIN32OLE_PARAM</code> objects represent param information of
* the OLE method.
*/
+static VALUE foleparam_s_allocate(VALUE klass)
+{
+ struct oleparamdata *pparam;
+ VALUE obj;
+ obj = Data_Make_Struct(klass,
+ struct oleparamdata,
+ 0, oleparam_free, pparam);
+ pparam->pTypeInfo = NULL;
+ pparam->method_index = 0;
+ pparam->index = 0;
+ return obj;
+}
+
+static VALUE
+oleparam_ole_param_from_index(VALUE self, ITypeInfo *pTypeInfo, UINT method_index, int param_index)
+{
+ FUNCDESC *pFuncDesc;
+ HRESULT hr;
+ BSTR *bstrs;
+ UINT len;
+ struct oleparamdata *pparam;
+ hr = pTypeInfo->lpVtbl->GetFuncDesc(pTypeInfo, method_index, &pFuncDesc);
+ if (FAILED(hr))
+ ole_raise(hr, rb_eRuntimeError, "fail to ITypeInfo::GetFuncDesc");
+
+ len = 0;
+ bstrs = ALLOCA_N(BSTR, pFuncDesc->cParams + 1);
+ hr = pTypeInfo->lpVtbl->GetNames(pTypeInfo, pFuncDesc->memid,
+ bstrs, pFuncDesc->cParams + 1,
+ &len);
+ if (FAILED(hr)) {
+ pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
+ ole_raise(hr, rb_eRuntimeError, "fail to ITypeInfo::GetNames");
+ }
+ SysFreeString(bstrs[0]);
+ if (param_index < 1 || len <= (UINT)param_index)
+ {
+ pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
+ rb_raise(rb_eIndexError, "index of param must be in 1..%d", len);
+ }
+
+ Data_Get_Struct(self, struct oleparamdata, pparam);
+ pparam->pTypeInfo = pTypeInfo;
+ OLE_ADDREF(pTypeInfo);
+ pparam->method_index = method_index;
+ pparam->index = param_index - 1;
+ rb_ivar_set(self, rb_intern("name"), WC2VSTR(bstrs[param_index]));
+
+ pTypeInfo->lpVtbl->ReleaseFuncDesc(pTypeInfo, pFuncDesc);
+ return self;
+}
+
+static VALUE oleparam_ole_param(VALUE self, VALUE olemethod, int n)
+{
+ struct olemethoddata *pmethod;
+ Data_Get_Struct(olemethod, struct olemethoddata, pmethod);
+ return oleparam_ole_param_from_index(self, pmethod->pTypeInfo, pmethod->index, n);
+}
+
+static VALUE foleparam_initialize(VALUE self, VALUE olemethod, VALUE n)
+{
+ int idx;
+ if (!rb_obj_is_kind_of(olemethod, cWIN32OLE_METHOD)) {
+ rb_raise(rb_eTypeError, "1st parameter must be WIN32OLE_METHOD object");
+ }
+ idx = FIX2INT(n);
+ return oleparam_ole_param(self, olemethod, idx);
+}
/*
* call-seq:
@@ -8971,6 +9083,8 @@ Init_win32ole()
rb_define_singleton_method(cWIN32OLE, "locale", fole_s_get_locale, 0);
rb_define_singleton_method(cWIN32OLE, "locale=", fole_s_set_locale, 1);
rb_define_singleton_method(cWIN32OLE, "create_guid", fole_s_create_guid, 0);
+ rb_define_singleton_method(cWIN32OLE, "ole_initialize", fole_s_ole_initialize, 0);
+ rb_define_singleton_method(cWIN32OLE, "ole_uninitialize", fole_s_ole_uninitialize, 0);
rb_define_method(cWIN32OLE, "invoke", fole_invoke, -1);
rb_define_method(cWIN32OLE, "[]", fole_getproperty_with_bracket, -1);
@@ -9127,6 +9241,8 @@ Init_win32ole()
rb_define_method(cWIN32OLE_METHOD, "inspect", folemethod_inspect, 0);
cWIN32OLE_PARAM = rb_define_class("WIN32OLE_PARAM", rb_cObject);
+ rb_define_alloc_func(cWIN32OLE_PARAM, foleparam_s_allocate);
+ rb_define_method(cWIN32OLE_PARAM, "initialize", foleparam_initialize, 2);
rb_define_method(cWIN32OLE_PARAM, "name", foleparam_name, 0);
rb_define_method(cWIN32OLE_PARAM, "ole_type", foleparam_ole_type, 0);
rb_define_method(cWIN32OLE_PARAM, "ole_type_detail", foleparam_ole_type_detail, 0);
diff --git a/ext/zlib/doc/zlib.rd b/ext/zlib/doc/zlib.rd
deleted file mode 100644
index 0a5e2d0abf..0000000000
--- a/ext/zlib/doc/zlib.rd
+++ /dev/null
@@ -1,917 +0,0 @@
-=begin
-#
-# zlib.rd.src
-#
-# Copyright (C) UENO Katsuhiro 2000-2003
-#
-# $Id$
-#
-
-= Ruby/zlib version 0.6.0
-
-Ruby/zlib is an extension library to use zlib from Ruby.
-Ruby/zlib also provides the features for accessing gzipped files.
-
-You can modify or redistribute Ruby/zlib in the same manner of
-Ruby interpreter. The latest version of Ruby/zlib would be found
-at ((<URL:http://www.blue.sky.or.jp/>)).
-
-Any comments and suggestions are always welcome. Please send
-them to ruby-list ML, ruby-ext ML, ruby-talk ML, or the author's
-mail address ((<URL:mailto:katsu@blue.sky.or.jp>)).
-
-This document is experimental and broken English version.
-If you find some mistakes or strange expressions (including
-kidding or unnatural ones) in this document, please let me know
-for my study.
-
-* ((<Zlib>))
-
- * ((<Zlib::Error>))
- * ((<Zlib::ZStream>))
- * ((<Zlib::Deflate>))
- * ((<Zlib::Inflate>))
- * ((<Zlib::GzipFile>))
- * ((<Zlib::GzipFile::Error>))
- * ((<Zlib::GzipWriter>))
- * ((<Zlib::GzipReader>))
-
-* ((<Changes from 0.5 to 0.6>))
-* ((<Changes from 0.4 to 0.5>))
-
-== Zlib
-
-Zlib is the module which provides the other features in zlib C
-library. See zlib.h for detail of each module function.
-
-=== Module Functions:
-
---- Zlib.zlib_version
-
- Returns the string which represents the version of zlib
- library.
-
---- Zlib.adler32([string[, adler]])
-
- Calculates Alder-32 checksum for ((|string|)),
- and returns updated value of ((|alder|)).
- If ((|string|)) is omitted, it returns the Adler-32 initial
- value. If ((|alder|)) is omitted, it assumes that the initial
- value is given to ((|alder|)).
-
---- Zlib.crc32([string[, crc]])
-
- Calculates CRC checksum for ((|string|)), and returns
- updated value of ((|crc|)). If ((|string|)) is omitted,
- it returns the CRC initial value. ((|crc|)) is omitted,
- it assumes that the initial value is given to ((|crc|)).
-
---- Zlib.crc_table
-
- Returns the table for calculating CRC checksum as an array.
-
-=== Constants:
-
---- Zlib::VERSION
-
- The Ruby/zlib version string.
-
---- Zlib::ZLIB_VERSION
-
- The string which represents the version of zlib.h.
-
---- Zlib::BINARY
---- Zlib::ASCII
---- Zlib::UNKNOWN
-
- The integers representing data types which
- ((<Zlib::ZStream#data_type>)) method returns.
-
---- Zlib::NO_COMPRESSION
---- Zlib::BEST_SPEED
---- Zlib::BEST_COMPRESSION
---- Zlib::DEFAULT_COMPRESSION
-
- The integers representing compression levels which are
- an argument for ((<Zlib::Deflate.new>)),
- ((<Zlib::Deflate#deflate>)), and so on.
-
---- Zlib::FILTERED
---- Zlib::HUFFMAN_ONLY
---- Zlib::DEFAULT_STRATEGY
-
- The integers representing compression methods which are
- an argument for ((<Zlib::Deflate.new>)) and
- ((<Zlib::Deflate#params>)).
-
---- Zlib::DEF_MEM_LEVEL
---- Zlib::MAX_MEM_LEVEL
-
- The integers representing memory levels which are an
- argument for ((<Zlib::Deflate.new>)),
- ((<Zlib::Deflate#params>)), and so on.
-
---- Zlib::MAX_WBITS
-
- The default value of ((|windowBits|)) which is an argument for
- ((<Zlib::Deflate.new>)) and ((<Zlib::Inflate.new>)).
-
---- Zlib::NO_FLUSH
---- Zlib::SYNC_FLUSH
---- Zlib::FULL_FLUSH
---- Zlib::FINISH
-
- The integers to control the output of the deflate stream,
- which are an argument for ((<Zlib::Deflate#deflate>)) and so on.
-
---- Zlib::OS_CODE
---- Zlib::OS_MSDOS
---- Zlib::OS_AMIGA
---- Zlib::OS_VMS
---- Zlib::OS_UNIX
---- Zlib::OS_VMCMS
---- Zlib::OS_ATARI
---- Zlib::OS_OS2
---- Zlib::OS_MACOS
---- Zlib::OS_ZSYSTEM
---- Zlib::OS_CPM
---- Zlib::OS_TOPS20
---- Zlib::OS_WIN32
---- Zlib::OS_QDOS
---- Zlib::OS_RISCOS
---- Zlib::OS_UNKNOWN
-
- The return values of ((<Zlib::GzipFile#os_code>)) method.
-
-
-== Zlib::Error
-
-The superclass for all exceptions raised by Ruby/zlib.
-
-The following exceptions are defined as subclasses of Zlib::Error.
-These exceptions are raised when zlib library functions return
-with an error status.
-
- * Zlib::StreamEnd
- * Zlib::NeedDict
- * Zlib::DataError
- * Zlib::StreamError
- * Zlib::MemError
- * Zlib::BufError
- * Zlib::VersionError
-
-=== SuperClass:
-
-* StandardError
-
-
-== Zlib::ZStream
-
-The abstract class for the stream which handles the compressed
-data. The operations are defined in the subclasses,
-((<Zlib::Deflate>)) for compression, and ((<Zlib::Inflate>))
-for decompression.
-
-An instance of Zlib::ZStream has one stream (struct zstream) and
-two variable-length buffers which associated to the input
-(next_in) of the stream and the output (next_out) of the stream.
-In this document, "input buffer" means the buffer for input, and
-"output buffer" means the buffer for output.
-
-Data inputed into an instance of Zlib::ZStream are temporally
-stored into the end of input buffer, and then data in input buffer
-are processed from the beginning of the buffer until no more
-output from the stream is produced (i.e. until avail_out > 0
-after processing). During processing, output buffer is allocated
-and expanded automatically to hold all output data.
-
-Some particular instance methods consume the data in output buffer
-and return them as a String.
-
-Here is an ascii art for describing above:
-
- +================ an instance of Zlib::ZStream ================+
- || ||
- || +--------+ +-------+ +--------+ ||
- || +--| output |<---------|zstream|<---------| input |<--+ ||
- || | | buffer | next_out+-------+next_in | buffer | | ||
- || | +--------+ +--------+ | ||
- || | | ||
- +===|======================================================|===+
- | |
- v |
- "output data" "input data"
-
-If an error is occurred during processing input buffer,
-an exception which is a subclass of ((<Zlib::Error>)) is raised.
-At that time, both input and output buffer keeps their conditions
-at the time when the error is occurred.
-
-=== SuperClass:
-
-* Object
-
-=== Class Methods:
-
---- Zlib::ZStream.new
-
- See ((<Zlib::Deflate.new>)) and ((<Zlib::Inflate.new>)).
-
-=== Methods:
-
---- Zlib::ZStream#avail_in
-
- Returns bytes of data in input buffer.
- Normally, returns 0.
-
---- Zlib::ZStream#avail_out
-
- Returns bytes of free spaces in output buffer.
- Because the free spaces are allocated automatically,
- this method returns 0 normally.
-
---- Zlib::ZStream#avail_out = size
-
- Allocates free spaces of ((|size|)) bytes in output buffer.
- If there are more than ((|size|)) bytes spaces in the buffer,
- the buffer is truncated.
- Because the free spaces are allocated automatically,
- you usually need not to use this method.
-
---- Zlib::ZStream#flush_next_in
-
- Flushes input buffer and returns all data in that buffer.
-
---- Zlib::ZStream#flush_next_out
-
- Flushes output buffer and returns all data in that buffer.
-
---- Zlib::ZStream#total_in
-
- Returns the total bytes of the input data to the stream.
-
---- Zlib::ZStream#total_out
-
- Returns the total bytes of the output data from the stream.
-
---- Zlib::ZStream#data_type
-
- Guesses the type of the data which have been inputed into
- the stream. The returned value is either ((<Zlib::BINARY>)),
- ((<Zlib::ASCII>)), or ((<Zlib::UNKNOWN>)).
-
---- Zlib::ZStream#adler
-
- Returns the alder-32 checksum.
-
---- Zlib::ZStream#reset
-
- Resets and initializes the stream. All data in both
- input and output buffer are discarded.
-
---- Zlib::ZStream#finish
-
- Finishes the stream and flushes output buffer.
- See ((<Zlib::Deflate#finish>)) and ((<Zlib::Inflate#finish>))
- for detail of the behavior.
-
---- Zlib::ZStream#finished?
---- Zlib::ZStream#stream_end?
-
- Returns true if the stream is finished.
-
---- Zlib::ZStream#close
---- Zlib::ZStream#end
-
- Closes the stream. All operations on the closed stream
- will raise an exception.
-
---- Zlib::ZStream#closed?
---- Zlib::ZStream#ended?
-
- Returns true if the stream closed.
-
-
-== Zlib::Deflate
-
-The class for compressing string data.
-
-=== SuperClass:
-
-* ((<Zlib::ZStream>))
-
-=== Class Methods:
-
---- Zlib::Deflate.deflate(string[, level])
-
- Compresses ((|string|)). The avail values of ((|level|)) are
- ((<Zlib::NO_COMPRESSION>)), ((<Zlib::BEST_SPEED>)),
- ((<Zlib::BEST_COMPRESSION>)), ((<Zlib::DEFAULT_COMPRESSION>)),
- and the integer from 0 to 9.
-
- This method is almost equivalent to the following code:
-
- def deflate(string, level)
- z = Zlib::Deflate.new(level)
- dst = z.deflate(string, Zlib::FINISH)
- z.close
- dst
- end
-
---- Zlib::Deflate.new([level[, windowBits[, memlevel[, strategy]]]])
-
- Creates a new deflate stream for compression.
- See zlib.h for details of each argument.
- If an argument is nil, the default value of that
- argument is used.
-
-=== Methods:
-
---- Zlib::Deflate#clone
-
- Duplicates the deflate stream.
-
---- Zlib::Deflate#deflate(string[, flush])
-
- Inputs ((|string|)) into the deflate stream and returns
- the output from the stream. Calling this method,
- both input and output buffer of the stream are flushed.
- If ((|string|)) is nil, this method finishes the stream,
- just like ((<Zlib::ZStream#finish>)).
- The value of ((|flush|)) should be either ((<Zlib::NO_FLUSH>)),
- ((<Zlib::SYNC_FLUSH>)), ((<Zlib::FULL_FLUSH>)), or
- ((<Zlib::FINISH>)).
- See zlib.h for details.
-
---- Zlib::Deflate#<< string
-
- Inputs ((|string|)) into the deflate stream just like
- ((<Zlib::Deflate#deflate>)), but returns Zlib::Deflate object
- itself. The output from the stream is preserved in output
- buffer.
-
---- Zlib::Deflate#flush([flush])
-
- This method is equivalent to (({deflate('', ((|flush|)))})).
- If ((|flush|)) is omitted, ((<Zlib::SYNC_FLUSH>)) is used
- as ((|flush|)). This method is just provided for
- readability of your Ruby script.
-
---- Zlib::Deflate#finish
-
- Finishes the stream. This method is equivalent to
- (({deflate('', Zlib::FINISH)})).
-
---- Zlib::Deflate#params(level, strategy)
-
- Changes the parameters of the deflate stream.
- See zlib.h for details. The output from the stream
- by changing the params is preserved in output buffer.
-
---- Zlib::Deflate#set_dictionary(string)
-
- Sets the preset dictionary and returns ((|string|)).
- This method is available just only after
- ((<Zlib::Deflate.new>)) or ((<Zlib::ZStream#reset>)) method
- was called. See zlib.h for details.
-
-
-== Zlib::Inflate
-
-The class for decompressing compressed data.
-Unlike ((<Zlib::Deflate>)), an instance of this class is not able
-to duplicate (clone, dup) itself.
-
-=== SuperClass:
-
-* ((<Zlib::ZStream>))
-
-=== Class Methods:
-
---- Zlib::Inflate.inflate(string)
-
- Decompresses ((|string|)). Raises a ((<Zlib::NeedDict>))
- exception if a preset dictionary is needed for decompression.
-
- This method is almost equivalent to the following code:
-
- def inflate(string)
- zstream = Zlib::Inflate.new
- buf = zstream.inflate(string)
- zstream.finish
- zstream.close
- buf
- end
-
---- Zlib::Inflate.new([windowBits])
-
- Creates a new inflate stream for decompression.
- See zlib.h for details of the argument.
- If ((|windowBits|)) is nil, the default value is used.
-
-=== Methods:
-
---- Zlib::Inflate#inflate(string)
-
- Inputs ((|string|)) into the inflate stream and returns
- the output from the stream. Calling this method,
- both input and output buffer of the stream are flushed.
- If ((|string|)) is nil, this method finishes the stream,
- just like ((<Zlib::ZStream#finish>)).
-
- Raises a ((<Zlib::NeedDict>)) exception if a preset
- dictionary is needed to decompress. Set the dictionary
- by ((<Zlib::Inflate#set_dictionary>)) and then call
- this method again with an empty string.
-
---- Zlib::Inflate#<< string
-
- Inputs ((|string|)) into the inflate stream just like
- ((<Zlib::Inflate#inflate>)), but returns Zlib::Inflate object
- itself. The output from the stream is preserved in output
- buffer.
-
---- Zlib::Inflate#finish
-
- Finishes the inflate stream and returns the garbage
- following the compressed data. Raises an exception
- if the stream is not finished
- (i.e. ((<Zlib::ZStream#finished?>)) doesn't returns true).
-
- The inflate stream finishes itself as soon as it meets
- the end code of the compressed data, you need not to call
- this method explicitly. However, this method is useful
- for checking whether the data is correctly ended or not.
-
---- Zlib::Inflate#set_dictionary(string)
-
- Sets the preset dictionary and returns ((|string|))
- This method is available just only after a ((<Zlib::NeedDict>))
- exception was raised. See zlib.h for details.
-
---- Zlib::Inflate#sync(string)
-
- Inputs ((|string|)) into the end of input buffer and
- skips data until a full flush point can be found.
- If the point is found in the buffer, this method flushes
- the buffer and returns false. Otherwise it returns true
- and the following data of full flush point is preserved
- in the buffer.
-
---- Zlib::Inflate#sync_point?
-
- What is this?
-
-
-== Zlib::GzipFile
-
-The abstract class for handling a gzip formatted compressed file.
-The operations are defined in the subclasses,
-((<Zlib::GzipReader>)) for reading, and ((<Zlib::GzipWriter>))
-for writing.
-
-GzipReader should be used with associating an instance of IO class
-(or an object which has the same methods as IO has).
-
-=== SuperClass:
-
-* Object
-
-=== Class Methods:
-
---- Zlib::GzipFile.new(args...)
-
- See ((<Zlib::GzipReader.new>)) and ((<Zlib::GzipWriter.new>)).
-
---- Zlib::GzipFile.wrap(args...) {|gz| ... }
-
- See ((<Zlib::GzipReader.wrap>)) and ((<Zlib::GzipWriter.wrap>)).
-
---- Zlib::GzipFile.open(args...) {|gz| ... }
-
- See ((<Zlib::GzipReader.open>)) and ((<Zlib::GzipWriter.open>)).
-
-=== Methods:
-
---- Zlib::GzipFile#closed?
---- Zlib::GzipFile#to_io
-
- Same as IO.
-
---- Zlib::GzipFile#close
-
- Closes the GzipFile object. This method calls close method
- of the associated IO object. Returns the associated IO object.
-
---- Zlib::GzipFile#finish
-
- Closes the GzipFile object. Unlike ((<Zlib::GzipFile#close>)),
- this method ((*never*)) calls close method of the associated IO
- object. Returns the associated IO object.
-
---- Zlib::GzipFile#crc
-
- Returns CRC value of the uncompressed data.
-
---- Zlib::GzipFile#level
-
- Returns compression level.
-
---- Zlib::GzipFile#mtime
-
- Returns last modification time recorded in the gzip
- file header.
-
---- Zlib::GzipFile#os_code
-
- Returns OS code number recorded in the gzip file header.
-
---- Zlib::GzipFile#orig_name
-
- Returns original filename recorded in the gzip file header,
- or nil if original filename is not present.
-
---- Zlib::GzipFile#comment
-
- Returns comments recorded in the gzip file header, or
- nil if the comments is not present.
-
---- Zlib::GzipFile#sync
---- Zlib::GzipFile#sync= flag
-
- Same as IO. If ((|flag|)) is true, the associated IO object
- must respond to flush method. While `sync' mode is true,
- the compression ratio decreases sharply.
-
---- Zlib::GzipFile#path
-
- Returns the path string of the associated IO-like object. This
- method is only defined when the IO-like object responds to
- #path().
-
-
-== Zlib::GzipFile::Error
-
-The superclass for all exceptions raised during processing a gzip
-file.
-
-The following exceptions are defined as subclasses of
-Zlib::GzipFile::Error.
-
-: Zlib::GzipFile::NoFooter
-
- Raised when gzip file footer has not found.
-
-: Zlib::GzipFile::CRCError
-
- Raised when the CRC checksum recorded in gzip file footer
- is not equivalent to CRC checksum of the actually
- uncompressed data.
-
-: Zlib::GzipFile::LengthError
-
- Raised when the data length recorded in gzip file footer
- is not equivalent to length of the actually uncompressed data.
-
-=== SuperClass:
-
-* ((<Zlib::Error>))
-
-
-== Zlib::GzipReader
-
-The class for reading a gzipped file. GzipReader should be used
-with associating an instance of IO class (or an object which has
-the same methods as IO has).
-
- Zlib::GzipReader.open('hoge.gz') {|gz|
- print gz.read
- }
-
- f = File.open('hoge.gz')
- gz = Zlib::GzipReader.new(f)
- print gz.read
- gz.close
-
-=== SuperClass:
-
-* ((<Zlib::GzipFile>))
-
-=== Included Modules:
-
-* Enumerable
-
-=== Class Methods:
-
---- Zlib::GzipReader.new(io)
-
- Creates a GzipReader object associated with ((|io|)).
- The GzipReader object reads gzipped data from ((|io|)),
- and parses/decompresses them. At least, ((|io|)) must have
- read method that behaves same as read method in IO class.
-
- If the gzip file header is incorrect, raises an
- ((<Zlib::GzipFile::Error>)) exception.
-
---- Zlib::GzipReader.wrap(io) {|gz| ... }
-
- Creates a GzipReader object associated with ((|io|)), and
- executes the block with the newly created GzipReader object,
- just like File::open. The GzipReader object will be closed
- automatically after executing the block. If you want to keep
- the associated IO object opening, you may call
- ((<Zlib::GzipFile#finish>)) method in the block.
-
---- Zlib::GzipReader.open(filename)
---- Zlib::GzipReader.open(filename) {|gz| ... }
-
- Opens a file specified by ((|filename|)) as a gzipped file,
- and returns a GzipReader object associated with that file.
- Further details of this method are same as
- ((<Zlib::GzipReader.new>)) and ((<ZLib::GzipReader.wrap>)).
-
-=== ¥á¥½¥Ã¥É:
-
---- Zlib::GzipReader#eof
---- Zlib::GzipReader#eof?
-
- Returns true if the object reaches the end of compressed data.
- Note that eof? does ((*not*)) return true when reaches the
- end of ((*file*)).
-
---- Zlib::GzipReader#pos
---- Zlib::GzipReader#tell
-
- Returns the total bytes of data decompressed until now.
- Not that it does ((*not*)) the position of file pointer.
-
---- Zlib::GzipReader#each([rs])
---- Zlib::GzipReader#each_line([rs])
---- Zlib::GzipReader#each_byte([rs])
---- Zlib::GzipReader#gets([rs])
---- Zlib::GzipReader#getc
---- Zlib::GzipReader#lineno
---- Zlib::GzipReader#lineno=
---- Zlib::GzipReader#read([length])
---- Zlib::GzipReader#readchar
---- Zlib::GzipReader#readline([rs])
---- Zlib::GzipReader#readlines([rs])
---- Zlib::GzipReader#ungetc(char)
-
- Same as IO, but raises ((<Zlib::Error>)) or
- ((<Zlib::GzipFile::Error>)) exception if an error was found
- in the gzip file.
-
- Be careful of the footer of gzip file. A gzip file has
- the checksum of pre-compressed data in its footer.
- GzipReader checks all uncompressed data against that checksum
- at the following cases, and if failed, raises
- ((<Zlib::GzipFile::NoFooter>)), ((<Zlib::GzipFile::CRCError>)),
- or ((<Zlib::GzipFile::LengthError>)) exception.
-
- * When an reading request is received beyond the end of file
- (the end of compressed data).
- That is, when ((<Zlib::GzipReader#read>)),
- ((<Zlib::GzipReader#gets>)), or some other methods for reading
- returns nil.
-
- * When ((<Zlib::GzipFile#close>)) method is called after
- the object reaches the end of file.
-
- * When ((<Zlib::GzipReader#unused>)) method is called after
- the object reaches the end of file.
-
---- Zlib::GzipReader#rewind
-
- Resets the position of the file pointer to the point
- created the GzipReader object.
- The associated IO object need to respond to seek method.
-
---- Zlib::GzipReader#unused
-
- Returns the rest of the data which had read for parsing gzip
- format, or nil if the whole gzip file is not parsed yet.
-
-
-== Zlib::GzipWriter
-
-The class for writing a gzipped file. GzipWriter should be used
-with associate with an instance of IO class (or an object which
-has the same methods as IO has).
-
- Zlib::GzipWriter.open('hoge.gz') {|gz|
- gz.write 'jugemu jugemu gokou no surikire...'
- }
-
- f = File.open('hoge.gz', 'w')
- gz = Zlib::GzipWriter.new(f)
- gz.write 'jugemu jugemu gokou no surikire...'
- gz.close
-
-NOTE: Due to the limitation in finalizer of Ruby, you must close
-explicitly GzipWriter object by ((<Zlib::GzipWriter#close>)) etc.
-Otherwise, GzipWriter should be not able to write gzip footer and
-generate broken gzip file.
-
-=== SuperClass:
-
-* ((<Zlib::GzipFile>))
-
-=== Class Methods:
-
---- Zlib::GzipWriter.new(io[, level[, strategy]])
-
- Creates a GzipWriter object associated with ((|io|)).
- ((|level|)) and ((|strategy|)) should be same as the
- arguments of ((<Zlib::Deflate.new>)). The GzipWriter object
- writes gzipped data to ((|io|)). At least, ((|io|)) must
- respond to write method that behaves same as write method
- in IO class.
-
---- Zlib::GzipWriter.wrap(io[, level[, strategy]]) {|gz| ... }
-
- Creates a GzipWriter object associated with ((|io|)), and
- executes the block with the newly created GzipWriter object,
- just like File::open. The GzipWriter object will be closed
- automatically after executing the block. If you want to keep
- the associated IO object opening, you may call
- ((<Zlib::GzipFile#finish>)) method in the block.
-
---- Zlib::GzipWriter.open(filename[, level[, strategy]])
---- Zlib::GzipWriter.open(filename[, level[, strategy]]) {|gz| ... }
-
- Opens a file specified by ((|filename|)) for writing
- gzip compressed data, and returns a GzipWriter object
- associated with that file. Further details of this method
- are same as ((<Zlib::GzipWriter.new>)) and
- ((<Zlib::GzipWriter#wrap>)).
-
-
-=== Methods:
-
---- Zlib::GzipWriter#close
---- Zlib::GzipWriter#finish
-
- Closes the GzipFile object. This method calls close method
- of the associated IO object. Returns the associated IO object.
- See ((<Zlib::GzipFile#close>)) and ((<Zlib::GzipFile#finish>))
- for the difference between close and finish.
-
- ((*NOTE: Due to the limitation in finalizer of Ruby, you must
- close GzipWriter object explicitly. Otherwise, GzipWriter
- should be not able to write gzip footer and generate broken
- gzip file.*))
-
---- Zlib::GzipWriter#pos
---- Zlib::GzipWriter#tell
-
- Returns the total bytes of data compressed until now.
- Note that it does ((*not*)) the position of file pointer.
-
---- Zlib::GzipWriter#<< str
---- Zlib::GzipWriter#putc(ch)
---- Zlib::GzipWriter#puts(obj...)
---- Zlib::GzipWriter#print(arg...)
---- Zlib::GzipWriter#printf(format, arg...)
---- Zlib::GzipWriter#write(str)
-
- Same as IO.
-
---- Zlib::GzipWriter#flush([flush])
-
- Flushes all the internal buffers of the GzipWriter object.
- The meaning of ((|flush|)) is same as one of the argument of
- ((<Zlib::Deflate#deflate>)).
- ((<Zlib::SYNC_FLUSH>)) is used if ((|flush|)) is omitted.
- It is no use giving ((|flush|)) ((<Zlib::NO_FLUSH>)).
-
---- Zlib::GzipWriter#mtime= time
-
- Sets last modification time to be stored in the gzip file
- header. ((<Zlib::GzipFile::Error>)) exception will be raised
- if this method is called after writing method (like
- ((<Zlib::GzipWriter#write>))) was called.
-
---- Zlib::GzipWriter#orig_name= filename
-
- Sets original filename to be stored in the gzip file header.
- ((<Zlib::GzipFile::Error>)) exception will be raised
- if this method is called after writing method (like
- ((<Zlib::GzipWriter#write>))) was called.
-
---- Zlib::GzipWriter#comment= string
-
- Sets comments to be stored in the gzip file header.
- ((<Zlib::GzipFile::Error>)) exception will be raised
- if this method is called after writing method (like
- ((<Zlib::GzipWriter#write>))) was called.
-
-
-== Changes from 0.5 to 0.6
-
-* New methods:
-
- * ((<Zlib::GzipFile.wrap>))
- * ((<Zlib::GzipFile#finish>))
-
-* New constants:
-
- * ((<Zlib::ZLIB_VERSION>))
- * ((<Zlib::OS_VMCMS>))
- * ((<Zlib::OS_ZSYSTEM>))
- * ((<Zlib::OS_CPM>))
- * ((<Zlib::OS_QDOS>))
- * ((<Zlib::OS_RISCOS>))
- * ((<Zlib::OS_UNKNOWN>))
-
-* Changed methods:
-
- * ((<Zlib::GzipFile.new>)) now takes no block. Use
- ((<Zlib::GzipFile.wrap>)) instead.
-
- * ((<Zlib::GzipFile#close>)) now takes no argument. Use
- ((<Zlib::GzipFile#finish>)) instead.
-
-* Renamed methods:
-
- * Zlib.version is renamed to ((<Zlib.zlib_version>)).
-
-* Changed constants:
-
- * ((<Zlib::VERSION>)) indicates the version of Ruby/zlib.
- The zlib.h version is now in ((<Zlib::ZLIB_VERSION>)).
-
-* Backward compatibility:
-
- * For backward compatibility for 0.5, the obsoleted methods and
- arguments are still available.
-
- * Obsoleted classes, methods, and constants for backward
- compatibility for 0.4 or earlier are removed.
-
-== Changes from 0.4 to 0.5
-
-Almost all the code are rewritten.
-I hope all changes are enumerated below :-)
-
-* The names of almost classes and some methods are changed.
- All classes and constants are now defined under module
- ((<Zlib>)). The obsoleted names are also available for backward
- compatibility.
-
- * Classes
-
- * Deflate -> ((<Zlib::Deflate>))
- * Inflate -> ((<Zlib::Inflate>))
- * Zlib::Gzip -> ((<Zlib::GzipFile>))
- * GzipReader -> ((<Zlib::GzipReader>))
- * GzipWriter -> ((<Zlib::GzipWriter>))
- * Zlib::Gzip::Error -> ((<Zlib::GzipFile::Error>))
- * Zlib::GzipReader::NoFooter -> ((<Zlib::GzipFile::NoFooter>))
- * Zlib::GzipReader::CRCError -> ((<Zlib::GzipFile::CRCError>))
- * Zlib::GzipReader::LengthError -> ((<Zlib::GzipFile::LengthError>))
-
- * Constants
-
- * Zlib::ZStream::BINARY -> ((<Zlib::BINARY>))
- * Zlib::ZStream::ASCII -> ((<Zlib::ASCII>))
- * Zlib::ZStream::UNKNOWN -> ((<Zlib::UNKNOWN>))
- * Zlib::Deflate::NO_COMPRESSION -> ((<Zlib::NO_COMPRESSION>))
- * Zlib::Deflate::BEST_SPEED -> ((<Zlib::BEST_SPEED>))
- * Zlib::Deflate::BEST_COMPRESSION -> ((<Zlib::BEST_COMPRESSION>))
- * Zlib::Deflate::DEFAULT_COMPRESSION -> ((<Zlib::DEFAULT_COMPRESSION>))
- * Zlib::Deflate::FILTERED -> ((<Zlib::FILTERED>))
- * Zlib::Deflate::HUFFMAN_ONLY -> ((<Zlib::HUFFMAN_ONLY>))
- * Zlib::Deflate::DEFAULT_STRATEGY -> ((<Zlib::DEFAULT_STRATEGY>))
- * Zlib::Deflate::MAX_WBITS -> ((<Zlib::MAX_WBITS>))
- * Zlib::Deflate::DEF_MEM_LEVEL -> ((<Zlib::DEF_MEM_LEVEL>))
- * Zlib::Deflate::MAX_MEM_LEVEL -> ((<Zlib::MAX_MEM_LEVEL>))
- * Zlib::Deflate::NO_FLUSH -> ((<Zlib::NO_FLUSH>))
- * Zlib::Deflate::SYNC_FLUSH -> ((<Zlib::SYNC_FLUSH>))
- * Zlib::Deflate::FULL_FLUSH -> ((<Zlib::FULL_FLUSH>))
- * Zlib::Inflate::MAX_WBITS -> ((<Zlib::MAX_WBITS>))
- * Zlib::GzipReader::OS_* -> ((<Zlib::OS_*|Zlib::OS_CODE>))
-
- * Methods
-
- * Zlib::ZStream#flush_out -> ((<Zlib::ZStream#flush_next_out>))
-
-* Made buffer for input (next_in).
-
-* ((<Zlib::GzipReader#unused>)) returns nil after closing.
-
-* Now you are up to call ((<Zlib::GzipWriter#close>)) explicitly
-to avoid segv in finalizer.
-((<[ruby-dev:11915]|URL:http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/11915>))
-
-* divided initialize from new.
-
-* remove sanity checks for arguments for deflateInit2 and
- inflateInit2.
-
-* adapted the behavior of ((<Zlib::GzipWriter#puts>)) to Ruby-1.7.
-
-* Made all functions static.
-
-
-=end
diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb
index 53b971b189..499f55a046 100644
--- a/ext/zlib/extconf.rb
+++ b/ext/zlib/extconf.rb
@@ -56,6 +56,9 @@ if %w'z libz zlib1 zlib zdll'.find {|z| have_library(z, 'deflateReset')} and
$defs.concat(defines.collect{|d|' -D'+d})
+ have_func('crc32_combine', 'zlib.h')
+ have_func('adler32_combine', 'zlib.h')
+
create_makefile('zlib')
end
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 0471b1f006..3c50b99785 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -11,6 +11,19 @@
#include <time.h>
#include <ruby/encoding.h>
+#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) /* empty */
+# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) /* empty */
+#endif
+
#define RUBY_ZLIB_VERSION "0.6.0"
@@ -306,7 +319,7 @@ do_checksum(argc, argv, func)
/*
* call-seq: Zlib.adler32(string, adler)
*
- * Calculates Alder-32 checksum for +string+, and returns updated value of
+ * Calculates Adler-32 checksum for +string+, and returns updated value of
* +adler+. If +string+ is omitted, it returns the Adler-32 initial value. If
* +adler+ is omitted, it assumes that the initial value is given to +adler+.
*
@@ -318,6 +331,25 @@ rb_zlib_adler32(int argc, VALUE *argv, VALUE klass)
return do_checksum(argc, argv, adler32);
}
+#ifdef HAVE_ADLER32_COMBINE
+/*
+ * call-seq: Zlib.adler32_combine(adler1, adler2, len2)
+ *
+ * Combine two Adler-32 check values in to one. +alder1+ is the first Adler-32
+ * value, +adler2+ is the second Adler-32 value. +len2+ is the length of the
+ * string used to generate +adler2+.
+ *
+ */
+static VALUE
+rb_zlib_adler32_combine(VALUE klass, VALUE adler1, VALUE adler2, VALUE len2)
+{
+ return ULONG2NUM(
+ adler32_combine(NUM2ULONG(adler1), NUM2ULONG(adler2), NUM2LONG(len2)));
+}
+#else
+#define rb_zlib_adler32_combine rb_f_notimplement
+#endif
+
/*
* call-seq: Zlib.crc32(string, adler)
*
@@ -333,6 +365,25 @@ rb_zlib_crc32(int argc, VALUE *argv, VALUE klass)
return do_checksum(argc, argv, crc32);
}
+#ifdef HAVE_CRC32_COMBINE
+/*
+ * call-seq: Zlib.crc32_combine(crc1, crc2, len2)
+ *
+ * Combine two CRC-32 check values in to one. +crc1+ is the first CRC-32
+ * value, +crc2+ is the second CRC-32 value. +len2+ is the length of the
+ * string used to generate +crc2+.
+ *
+ */
+static VALUE
+rb_zlib_crc32_combine(VALUE klass, VALUE crc1, VALUE crc2, VALUE len2)
+{
+ return ULONG2NUM(
+ crc32_combine(NUM2ULONG(crc1), NUM2ULONG(crc2), NUM2LONG(len2)));
+}
+#else
+#define rb_zlib_crc32_combine rb_f_notimplement
+#endif
+
/*
* Returns the table for calculating CRC checksum as an array.
*/
@@ -398,7 +449,13 @@ static const struct zstream_funcs inflate_funcs = {
static voidpf
zlib_mem_alloc(voidpf opaque, uInt items, uInt size)
{
- return xmalloc(items * size);
+ voidpf p = xmalloc(items * size);
+ /* zlib FAQ: Valgrind (or some similar memory access checker) says that
+ deflate is performing a conditional jump that depends on an
+ uninitialized value. Isn't that a bug?
+ http://www.zlib.net/zlib_faq.html#faq36 */
+ VALGRIND_MAKE_MEM_DEFINED(p, items * size);
+ return p;
}
static void
@@ -2382,7 +2439,14 @@ gzfile_ensure_close(VALUE obj)
}
/*
- * See Zlib::GzipReader#wrap and Zlib::GzipWriter#wrap.
+ * call-seq: Zlib::GzipFile.wrap(io) { |gz| ... }
+ *
+ * Creates a GzipFile object associated with +io+, and
+ * executes the block with the newly created GzipFile object,
+ * just like File.open. The GzipFile object will be closed
+ * automatically after executing the block. If you want to keep
+ * the associated IO object opening, you may call
+ * +Zlib::GzipFile#finish+ method in the block.
*/
static VALUE
rb_gzfile_s_wrap(int argc, VALUE *argv, VALUE klass)
@@ -2747,7 +2811,7 @@ rb_gzwriter_s_allocate(VALUE klass)
*
* Opens a file specified by +filename+ for writing gzip compressed data, and
* returns a GzipWriter object associated with that file. Further details of
- * this method are found in Zlib::GzipWriter.new and Zlib::GzipWriter#wrap.
+ * this method are found in Zlib::GzipWriter.new and Zlib::GzipFile.wrap.
*/
static VALUE
rb_gzwriter_s_open(int argc, VALUE *argv, VALUE klass)
@@ -2947,7 +3011,7 @@ rb_gzreader_s_allocate(VALUE klass)
*
* Opens a file specified by +filename+ as a gzipped file, and returns a
* GzipReader object associated with that file. Further details of this method
- * are in Zlib::GzipReader.new and ZLib::GzipReader.wrap.
+ * are in Zlib::GzipReader.new and ZLib::GzipFile.wrap.
*/
static VALUE
rb_gzreader_s_open(int argc, VALUE *argv, VALUE klass)
@@ -3468,7 +3532,9 @@ Init_zlib()
rb_define_module_function(mZlib, "zlib_version", rb_zlib_version, 0);
rb_define_module_function(mZlib, "adler32", rb_zlib_adler32, -1);
+ rb_define_module_function(mZlib, "adler32_combine", rb_zlib_adler32_combine, 3);
rb_define_module_function(mZlib, "crc32", rb_zlib_crc32, -1);
+ rb_define_module_function(mZlib, "crc32_combine", rb_zlib_crc32_combine, 3);
rb_define_module_function(mZlib, "crc_table", rb_zlib_crc_table, 0);
rb_define_const(mZlib, "VERSION", rb_str_new2(RUBY_ZLIB_VERSION));
diff --git a/file.c b/file.c
index 444906b01f..c7fed56f75 100644
--- a/file.c
+++ b/file.c
@@ -71,15 +71,15 @@ int flock(int, int);
#define lstat stat
#endif
-#ifdef __BEOS__ /* should not change ID if -1 */
+#if defined(__BEOS__) || defined(__HAIKU__) /* should not change ID if -1 */
static int
be_chown(const char *path, uid_t owner, gid_t group)
{
- if (owner == -1 || group == -1) {
+ if (owner == (uid_t)-1 || group == (gid_t)-1) {
struct stat st;
if (stat(path, &st) < 0) return -1;
- if (owner == -1) owner = st.st_uid;
- if (group == -1) group = st.st_gid;
+ if (owner == (uid_t)-1) owner = st.st_uid;
+ if (group == (gid_t)-1) group = st.st_gid;
}
return chown(path, owner, group);
}
@@ -87,20 +87,48 @@ be_chown(const char *path, uid_t owner, gid_t group)
static int
be_fchown(int fd, uid_t owner, gid_t group)
{
- if (owner == -1 || group == -1) {
+ if (owner == (uid_t)-1 || group == (gid_t)-1) {
struct stat st;
if (fstat(fd, &st) < 0) return -1;
- if (owner == -1) owner = st.st_uid;
- if (group == -1) group = st.st_gid;
+ if (owner == (uid_t)-1) owner = st.st_uid;
+ if (group == (gid_t)-1) group = st.st_gid;
}
return fchown(fd, owner, group);
}
#define fchown be_fchown
-#endif /* __BEOS__ */
+#endif /* __BEOS__ || __HAIKU__ */
#define insecure_obj_p(obj, level) (level >= 4 || (level > 0 && OBJ_TAINTED(obj)))
static VALUE
+file_path_convert(VALUE name)
+{
+#ifndef _WIN32 /* non Windows == Unix */
+ rb_encoding *fname_encoding = rb_enc_from_index(ENCODING_GET(name));
+ rb_encoding *fs_encoding;
+# ifdef __APPLE__
+ /* Mac OS X's file system encoding is UTF-8 */
+ if (rb_usascii_encoding() != fname_encoding
+ && rb_ascii8bit_encoding() != fname_encoding
+ && (fs_encoding = rb_filesystem_encoding()) != fname_encoding
+ && rb_enc_find("UTF8-MAC") != fname_encoding) {
+ /* Don't call rb_enc_find() before UTF-8 */
+ name = rb_str_conv_enc(name, fname_encoding, fs_encoding);
+ }
+# else /* Unix other than Mac OS X */
+ if (rb_default_internal_encoding() != NULL
+ && rb_usascii_encoding() != fname_encoding
+ && rb_ascii8bit_encoding() != fname_encoding
+ && (fs_encoding = rb_filesystem_encoding()) != fname_encoding) {
+ /* Don't call rb_filesystem_encoding() before US-ASCII and ASCII-8BIT */
+ name = rb_str_conv_enc(name, fname_encoding, fs_encoding);
+ }
+# endif
+#endif
+ return name;
+}
+
+static VALUE
rb_get_path_check(VALUE obj, int level)
{
VALUE tmp;
@@ -119,7 +147,9 @@ rb_get_path_check(VALUE obj, int level)
else {
tmp = obj;
}
+ StringValue(tmp);
exit:
+ tmp = file_path_convert(tmp);
StringValueCStr(tmp);
if (obj != tmp && insecure_obj_p(tmp, level)) {
rb_insecure_operation();
@@ -959,7 +989,7 @@ eaccess(const char *path, int mode)
else if (group_member(st.st_gid))
mode <<= 3;
- if ((st.st_mode & mode) == mode) return 0;
+ if ((int)(st.st_mode & mode) == mode) return 0;
return -1;
#else
@@ -3100,6 +3130,151 @@ rb_file_s_absolute_path(int argc, VALUE *argv)
return rb_file_absolute_path(fname, dname);
}
+static void
+realpath_rec(long *prefixlenp, VALUE *resolvedp, char *unresolved, VALUE loopcheck, int strict, int last)
+{
+ while (*unresolved) {
+ char *testname = unresolved;
+ char *unresolved_firstsep = rb_path_next(unresolved);
+ long testnamelen = unresolved_firstsep - unresolved;
+ char *unresolved_nextname = unresolved_firstsep;
+ while (isdirsep(*unresolved_nextname)) unresolved_nextname++;
+ unresolved = unresolved_nextname;
+ if (testnamelen == 1 && testname[0] == '.') {
+ }
+ else if (testnamelen == 2 && testname[0] == '.' && testname[1] == '.') {
+ if (*prefixlenp < RSTRING_LEN(*resolvedp)) {
+ char *resolved_names = RSTRING_PTR(*resolvedp) + *prefixlenp;
+ char *lastsep = rb_path_last_separator(resolved_names);
+ long len = lastsep ? lastsep - resolved_names : 0;
+ rb_str_set_len(*resolvedp, *prefixlenp + len);
+ }
+ }
+ else {
+ VALUE checkval;
+ VALUE testpath = rb_str_dup(*resolvedp);
+ if (*prefixlenp < RSTRING_LEN(testpath))
+ rb_str_cat2(testpath, "/");
+ rb_str_cat(testpath, testname, testnamelen);
+ checkval = rb_hash_aref(loopcheck, testpath);
+ if (!NIL_P(checkval)) {
+ if (checkval == ID2SYM(rb_intern("resolving"))) {
+ errno = ELOOP;
+ rb_sys_fail(RSTRING_PTR(testpath));
+ }
+ else {
+ *resolvedp = rb_str_dup(checkval);
+ }
+ }
+ else {
+ struct stat sbuf;
+ int ret;
+ ret = lstat(RSTRING_PTR(testpath), &sbuf);
+ if (ret == -1) {
+ if (errno == ENOENT) {
+ if (strict || !last || *unresolved_firstsep)
+ rb_sys_fail(RSTRING_PTR(testpath));
+ *resolvedp = testpath;
+ break;
+ }
+ else {
+ rb_sys_fail(RSTRING_PTR(testpath));
+ }
+ }
+#ifdef HAVE_READLINK
+ if (S_ISLNK(sbuf.st_mode)) {
+ volatile VALUE link;
+ char *link_prefix, *link_names;
+ long link_prefixlen;
+ rb_hash_aset(loopcheck, testpath, ID2SYM(rb_intern("resolving")));
+ link = rb_file_s_readlink(rb_cFile, testpath);
+ link_prefix = RSTRING_PTR(link);
+ link_names = skiproot(link_prefix);
+ link_prefixlen = link_names - link_prefix;
+ if (link_prefixlen == 0) {
+ realpath_rec(prefixlenp, resolvedp, link_names, loopcheck, strict, *unresolved_firstsep == '\0');
+ }
+ else {
+ *resolvedp = rb_str_new(link_prefix, link_prefixlen);
+ *prefixlenp = link_prefixlen;
+ realpath_rec(prefixlenp, resolvedp, link_names, loopcheck, strict, *unresolved_firstsep == '\0');
+ }
+ rb_hash_aset(loopcheck, testpath, rb_str_dup_frozen(*resolvedp));
+ }
+ else
+#endif
+ {
+ VALUE s = rb_str_dup_frozen(testpath);
+ rb_hash_aset(loopcheck, s, s);
+ *resolvedp = testpath;
+ }
+ }
+ }
+ }
+}
+
+static VALUE
+realpath_internal(VALUE path, int strict)
+{
+ long prefixlen;
+ VALUE resolved;
+ volatile VALUE unresolved_path;
+ char *unresolved_names;
+ VALUE loopcheck;
+
+ rb_secure(2);
+
+ FilePathValue(path);
+ unresolved_path = rb_str_dup_frozen(path);
+ unresolved_names = skiproot(RSTRING_PTR(unresolved_path));
+ prefixlen = unresolved_names - RSTRING_PTR(unresolved_path);
+ loopcheck = rb_hash_new();
+ if (prefixlen == 0) {
+ volatile VALUE curdir = rb_dir_getwd();
+ char *unresolved_curdir_names = skiproot(RSTRING_PTR(curdir));
+ prefixlen = unresolved_curdir_names - RSTRING_PTR(curdir);
+ resolved = rb_str_new(RSTRING_PTR(curdir), prefixlen);
+ realpath_rec(&prefixlen, &resolved, unresolved_curdir_names, loopcheck, 1, 0);
+ }
+ else {
+ resolved = rb_str_new(RSTRING_PTR(unresolved_path), prefixlen);
+ }
+ realpath_rec(&prefixlen, &resolved, unresolved_names, loopcheck, strict, 1);
+ OBJ_TAINT(resolved);
+ return resolved;
+}
+
+/*
+ * call-seq:
+ * File.realpath(pathname) -> real_pathname
+ *
+ * Returns the real (absolute) pathname of +pathname+ in the actual
+ * filesystem not containing symlinks or useless dots.
+ *
+ * All components of the pathname must exist when this method is
+ * called.
+ */
+static VALUE
+rb_file_s_realpath(VALUE klass, VALUE path)
+{
+ return realpath_internal(path, 1);
+}
+
+/*
+ * call-seq:
+ * File.realdirpath(pathname) -> real_pathname
+ *
+ * Returns the real (absolute) pathname of +pathname+ in the actual filesystem.
+ * The real pathname doesn't contain symlinks or useless dots.
+ *
+ * The last component of the real pathname can be nonexistent.
+ */
+static VALUE
+rb_file_s_realdirpath(VALUE klass, VALUE path)
+{
+ return realpath_internal(path, 0);
+}
+
static size_t
rmext(const char *p, long l1, const char *e)
{
@@ -3698,51 +3873,51 @@ test_check(int n, int argc, VALUE *argv)
* File tests on a single file:
*
* 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
- * ?C | Time | Last change time for file1
- * ?d | boolean | True if file1 exists and is a directory
- * ?e | boolean | True if file1 exists
- * ?f | boolean | True if file1 exists and is a regular file
- * ?g | boolean | True if file1 has the \CF{setgid} bit
+ * "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
+ * "C" | Time | Last change time for file1
+ * "d" | boolean | True if file1 exists and is a directory
+ * "e" | boolean | True if file1 exists
+ * "f" | boolean | True if file1 exists and is a regular file
+ * "g" | boolean | True if file1 has the \CF{setgid} bit
* | | set (false under NT)
- * ?G | boolean | True if file1 exists and has a group
+ * "G" | boolean | True if file1 exists and has a group
* | | ownership equal to the caller's group
- * ?k | boolean | True if file1 exists and has the sticky bit set
- * ?l | boolean | True if file1 exists and is a symbolic link
- * ?M | Time | Last modification time for file1
- * ?o | boolean | True if file1 exists and is owned by
+ * "k" | boolean | True if file1 exists and has the sticky bit set
+ * "l" | boolean | True if file1 exists and is a symbolic link
+ * "M" | Time | Last modification time for file1
+ * "o" | boolean | True if file1 exists and is owned by
* | | the caller's effective uid
- * ?O | boolean | True if file1 exists and is owned by
+ * "O" | boolean | True if file1 exists and is owned by
* | | the caller's real uid
- * ?p | boolean | True if file1 exists and is a fifo
- * ?r | boolean | True if file1 is readable by the effective
+ * "p" | boolean | True if file1 exists and is a fifo
+ * "r" | boolean | True if file1 is readable by the effective
* | | uid/gid of the caller
- * ?R | boolean | True if file is readable by the real
+ * "R" | boolean | True if file is readable by the real
* | | uid/gid of the caller
- * ?s | int/nil | If file1 has nonzero size, return the size,
+ * "s" | int/nil | If file1 has nonzero size, return the size,
* | | otherwise return nil
- * ?S | boolean | True if file1 exists and is a socket
- * ?u | boolean | True if file1 has the setuid bit set
- * ?w | boolean | True if file1 exists and is writable by
+ * "S" | boolean | True if file1 exists and is a socket
+ * "u" | boolean | True if file1 has the setuid bit set
+ * "w" | boolean | True if file1 exists and is writable by
* | | the effective uid/gid
- * ?W | boolean | True if file1 exists and is writable by
+ * "W" | boolean | True if file1 exists and is writable by
* | | the real uid/gid
- * ?x | boolean | True if file1 exists and is executable by
+ * "x" | boolean | True if file1 exists and is executable by
* | | the effective uid/gid
- * ?X | boolean | True if file1 exists and is executable by
+ * "X" | boolean | True if file1 exists and is executable by
* | | the real uid/gid
- * ?z | boolean | True if file1 exists and has a zero length
+ * "z" | boolean | True if file1 exists and has a zero length
*
* Tests that take two files:
*
- * ?- | boolean | True if file1 and file2 are identical
- * ?= | boolean | True if the modification times of file1
+ * "-" | boolean | True if file1 and file2 are identical
+ * "=" | boolean | True if the modification times of file1
* | | and file2 are equal
- * ?< | boolean | True if the modification time of file1
+ * "<" | boolean | True if the modification time of file1
* | | is prior to that of file2
- * ?> | boolean | True if the modification time of file1
+ * ">" | boolean | True if the modification time of file1
* | | is after that of file2
*/
@@ -3875,10 +4050,10 @@ rb_f_test(int argc, VALUE *argv)
unknown:
/* unknown command */
if (ISPRINT(cmd)) {
- rb_raise(rb_eArgError, "unknown command ?%c", cmd);
+ rb_raise(rb_eArgError, "unknown command '%s%c'", cmd == '\'' || cmd == '\\' ? "\\" : "", cmd);
}
else {
- rb_raise(rb_eArgError, "unknown command ?\\x%02X", cmd);
+ rb_raise(rb_eArgError, "unknown command \"\\x%02X\"", cmd);
}
return Qnil; /* not reached */
}
@@ -4920,6 +5095,8 @@ InitVM_File(void)
rb_define_singleton_method(rb_cFile, "truncate", rb_file_s_truncate, 2);
rb_define_singleton_method(rb_cFile, "expand_path", rb_file_s_expand_path, -1);
rb_define_singleton_method(rb_cFile, "absolute_path", rb_file_s_absolute_path, -1);
+ rb_define_singleton_method(rb_cFile, "realpath", rb_file_s_realpath, 1);
+ rb_define_singleton_method(rb_cFile, "realdirpath", rb_file_s_realdirpath, 1);
rb_define_singleton_method(rb_cFile, "basename", rb_file_s_basename, -1);
rb_define_singleton_method(rb_cFile, "dirname", rb_file_s_dirname, 1);
rb_define_singleton_method(rb_cFile, "extname", rb_file_s_extname, 1);
diff --git a/gc.c b/gc.c
index 4f0bcf1215..c9960420d4 100644
--- a/gc.c
+++ b/gc.c
@@ -1026,7 +1026,7 @@ rb_newobj_from_heap(rb_objspace_t *objspace)
VALUE obj;
if ((ruby_gc_stress && !ruby_disable_gc_stress) || !freelist) {
- if (!heaps_increment(objspace) && !garbage_collect(objspace)) {
+ if (!heaps_increment(objspace) && !garbage_collect(objspace)) {
during_gc = 0;
rb_memerror();
}
@@ -1477,8 +1477,8 @@ free_method_entry_i(ID key, rb_method_entry_t *me, st_data_t data)
return ST_CONTINUE;
}
-static void
-free_m_table(st_table *tbl)
+void
+rb_free_m_table(st_table *tbl)
{
st_foreach(tbl, free_method_entry_i, 0);
st_free_table(tbl);
@@ -2012,7 +2012,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
case T_MODULE:
case T_CLASS:
rb_clear_cache_by_class((VALUE)obj);
- free_m_table(RCLASS_M_TBL(obj));
+ rb_free_m_table(RCLASS_M_TBL(obj));
if (RCLASS_IV_TBL(obj)) {
st_free_table(RCLASS_IV_TBL(obj));
}
@@ -2071,6 +2071,7 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
break;
case T_ICLASS:
/* iClass shares table with the module */
+ xfree(RANY(obj)->as.klass.ptr);
break;
case T_FLOAT:
diff --git a/gem_prelude.rb b/gem_prelude.rb
index 15a1b43fe9..fac6a3806a 100644
--- a/gem_prelude.rb
+++ b/gem_prelude.rb
@@ -15,7 +15,7 @@ if defined?(Gem) then
def gem(gem_name, *version_requirements)
Gem.push_gem_version_on_load_path(gem_name, *version_requirements)
end
-
+ private :gem
end
module Gem
@@ -66,8 +66,9 @@ if defined?(Gem) then
end
def self.set_home(home)
- home = home.gsub File::ALT_SEPARATOR, File::SEPARATOR if File::ALT_SEPARATOR
- @gem_home = home.force_encoding(Encoding.find('filesystem'))
+ home = home.dup.force_encoding(Encoding.find('filesystem'))
+ home.gsub!(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
+ @gem_home = home
end
def self.set_paths(gpaths)
@@ -232,19 +233,11 @@ if defined?(Gem) then
Dir.entries(gems_directory).each do |gem_directory_name|
next if gem_directory_name == "." || gem_directory_name == ".."
- dash = gem_directory_name.rindex("-")
- next if dash.nil?
-
- gem_name = gem_directory_name[0...dash]
+ next unless gem_name = gem_directory_name[/(.*)-(.*)/, 1]
+ new_version = integers_for($2)
current_version = GemVersions[gem_name]
- new_version = integers_for(gem_directory_name[dash+1..-1])
-
- if current_version then
- if (current_version <=> new_version) == -1 then
- GemVersions[gem_name] = new_version
- GemPaths[gem_name] = File.join(gems_directory, gem_directory_name)
- end
- else
+
+ if !current_version or (current_version <=> new_version) < 0 then
GemVersions[gem_name] = new_version
GemPaths[gem_name] = File.join(gems_directory, gem_directory_name)
end
diff --git a/hash.c b/hash.c
index dbe51c4714..daee40ebbc 100644
--- a/hash.c
+++ b/hash.c
@@ -14,6 +14,7 @@
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/util.h"
+#include <errno.h>
#ifdef __APPLE__
#include <crt_externs.h>
@@ -191,7 +192,7 @@ static VALUE
hash_foreach_call(struct hash_foreach_arg *arg)
{
if (st_foreach(RHASH(arg->hash)->ntbl, hash_foreach_iter, (st_data_t)arg)) {
- rb_raise(rb_eRuntimeError, "hash modified during iteration");
+ rb_raise(rb_eRuntimeError, "hash modified during iteration");
}
return Qnil;
}
@@ -1070,6 +1071,7 @@ replace_i(VALUE key, VALUE val, VALUE hash)
static VALUE
rb_hash_replace(VALUE hash, VALUE hash2)
{
+ rb_hash_modify_check(hash);
hash2 = to_hash(hash2);
if (hash == hash2) return hash;
rb_hash_clear(hash);
@@ -2009,7 +2011,18 @@ rb_env_path_tainted(void)
return path_tainted;
}
-#if !defined(_WIN32) && !(defined(HAVE_SETENV) && defined(HAVE_UNSETENV))
+#if defined(_WIN32) || (defined(HAVE_SETENV) && defined(HAVE_UNSETENV))
+#elif defined __sun__
+static int
+in_origenv(const char *str)
+{
+ char **env;
+ for (env = origenviron; *env; ++env) {
+ if (*env == str) return 1;
+ }
+ return 0;
+}
+#else
static int
envix(const char *nam)
{
@@ -2032,6 +2045,10 @@ ruby_setenv(const char *name, const char *value)
#if defined(_WIN32)
int len;
char *buf;
+ if (strchr(name, '=')) {
+ errno = EINVAL;
+ rb_sys_fail("ruby_setenv");
+ }
if (value) {
len = strlen(name) + 1 + strlen(value) + 1;
buf = ALLOCA_N(char, len);
@@ -2039,7 +2056,7 @@ ruby_setenv(const char *name, const char *value)
putenv(buf);
/* putenv() doesn't handle empty value */
- if (*value)
+ if (!*value)
SetEnvironmentVariable(name,value);
}
else {
@@ -2051,13 +2068,46 @@ ruby_setenv(const char *name, const char *value)
#elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV)
#undef setenv
#undef unsetenv
- if (value)
- setenv(name,value,1);
- else
+ if (value) {
+ if (setenv(name, value, 1))
+ rb_sys_fail("setenv");
+ } else {
+#ifdef VOID_UNSETENV
unsetenv(name);
+#else
+ if (unsetenv(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] == '=') {
+ if (!in_origenv(str)) free(str);
+ while ((env_ptr[0] = env_ptr[1]) != 0) env_ptr++;
+ break;
+ }
+ }
+ if (value) {
+ str = malloc(len += strlen(value) + 2);
+ snprintf(str, len, "%s=%s", name, value);
+ if (putenv(str))
+ rb_sys_fail("putenv");
+ }
#else /* WIN32 */
size_t len;
- int i=envix(name); /* where does it go? */
+ 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? */
int j;
diff --git a/include/ruby.h b/include/ruby.h
index dd7e2b8e59..862b1687d4 100644
--- a/include/ruby.h
+++ b/include/ruby.h
@@ -17,13 +17,13 @@
#define HAVE_RUBY_INTERN_H 1
#define HAVE_RUBY_IO_H 1
#define HAVE_RUBY_MISSING_H 1
-#define HAVE_RUBY_VM_H 1
#define HAVE_RUBY_ONIGURUMA_H 1
#define HAVE_RUBY_RE_H 1
#define HAVE_RUBY_REGEX_H 1
#define HAVE_RUBY_RUBY_H 1
#define HAVE_RUBY_ST_H 1
#define HAVE_RUBY_UTIL_H 1
+#define HAVE_RUBY_VERSION_H 1
#define HAVE_RUBY_VM_H 1
#ifdef _WIN32
#define HAVE_RUBY_WIN32_H 1
diff --git a/include/ruby/defines.h b/include/ruby/defines.h
index 70b1685804..7bb2788aaf 100644
--- a/include/ruby/defines.h
+++ b/include/ruby/defines.h
@@ -99,6 +99,22 @@ void xfree(void*);
# define BDIGIT_DBL_SIGNED long
#endif
+#ifdef INFINITY
+# define HAVE_INFINITY
+#else
+/** @internal */
+extern const unsigned char rb_infinity[];
+# define INFINITY (*(float *)rb_infinity)
+#endif
+
+#ifdef NAN
+# define HAVE_NAN
+#else
+/** @internal */
+extern const unsigned char rb_nan[];
+# define NAN (*(float *)rb_nan)
+#endif
+
#ifdef __CYGWIN__
#undef _WIN32
#endif
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index cbbfa112f1..e58d247e0b 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -303,6 +303,7 @@ VALUE rb_class_new_instance(int, VALUE*, VALUE);
VALUE rb_block_proc(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, VALUE *argv, VALUE);
int rb_proc_arity(VALUE);
@@ -344,6 +345,8 @@ 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);
+/* dir.c */
+VALUE rb_dir_getwd(void);
/* file.c */
VALUE rb_file_s_expand_path(int, VALUE *);
VALUE rb_file_expand_path(VALUE, VALUE);
@@ -544,6 +547,8 @@ VALUE rb_reg_match_last(VALUE);
#define HAVE_RB_REG_NEW_STR 1
VALUE rb_reg_new_str(VALUE, int);
VALUE rb_reg_new(const char *, long, int);
+VALUE rb_reg_alloc(void);
+VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
VALUE rb_reg_match(VALUE, VALUE);
VALUE rb_reg_match2(VALUE);
int rb_reg_options(VALUE);
@@ -655,6 +660,7 @@ VALUE rb_str_associated(VALUE);
void rb_str_setter(VALUE, ID, VALUE*);
VALUE rb_str_intern(VALUE);
VALUE rb_sym_to_s(VALUE);
+long rb_str_strlen(VALUE);
VALUE rb_str_length(VALUE);
long rb_str_offset(VALUE, long);
size_t rb_str_capacity(VALUE);
@@ -785,6 +791,7 @@ VALUE rb_ivar_get(VALUE, ID);
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);
diff --git a/include/ruby/missing.h b/include/ruby/missing.h
index d553f1c738..4a90032632 100644
--- a/include/ruby/missing.h
+++ b/include/ruby/missing.h
@@ -38,6 +38,13 @@ struct timespec {
};
#endif
+#if !defined(HAVE_STRUCT_TIMEZONE)
+struct timezone {
+ int tz_minuteswest;
+ int tz_dsttime;
+};
+#endif
+
#ifndef RUBY_EXTERN
#define RUBY_EXTERN extern
#endif
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 0b2ac2470c..c6b2919c40 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -21,7 +21,7 @@ extern "C" {
#endif
#endif
-#ifndef RUBY_LIB
+#ifndef RUBY_LIB_PREFIX
#include "ruby/config.h"
#ifdef RUBY_EXTCONF_H
#include RUBY_EXTCONF_H
@@ -564,6 +564,7 @@ struct RObject {
RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : \
ROBJECT(o)->as.heap.iv_index_tbl)
+/** @internal */
typedef struct {
VALUE super;
struct st_table *iv_tbl;
@@ -683,6 +684,7 @@ struct RRegexp {
#define RREGEXP_SRC(r) RREGEXP(r)->src
#define RREGEXP_SRC_PTR(r) RSTRING_PTR(RREGEXP(r)->src)
#define RREGEXP_SRC_LEN(r) RSTRING_LEN(RREGEXP(r)->src)
+#define RREGEXP_SRC_END(r) RSTRING_END(RREGEXP(r)->src)
struct RHash {
struct RBasic basic;
@@ -1095,6 +1097,7 @@ VALUE rb_equal(VALUE,VALUE);
PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
PRINTF_ARGS(NORETURN(void rb_fatal(const char*, ...)), 1, 2);
PRINTF_ARGS(NORETURN(void rb_bug(const char*, ...)), 1, 2);
+NORETURN(void rb_bug_errno(const char*, int));
NORETURN(void rb_sys_fail(const char*));
NORETURN(void rb_mod_sys_fail(VALUE, const char*));
NORETURN(void rb_iter_break(void));
diff --git a/include/ruby/st.h b/include/ruby/st.h
index d60ccd9a9a..27e47b816c 100644
--- a/include/ruby/st.h
+++ b/include/ruby/st.h
@@ -12,7 +12,7 @@ extern "C" {
#endif
#endif
-#ifndef RUBY_LIB
+#ifndef RUBY_LIB_PREFIX
#include "ruby/config.h"
#include "ruby/defines.h"
#ifdef RUBY_EXTCONF_H
diff --git a/include/ruby/util.h b/include/ruby/util.h
index a9bc3f1b70..c4833e2160 100644
--- a/include/ruby/util.h
+++ b/include/ruby/util.h
@@ -76,12 +76,6 @@ double ruby_strtod(const char *, char **);
#pragma warning(push)
#pragma warning(disable:4723)
#endif
-static inline double
-ruby_div0(double x)
-{
- double t = 0.0;
- return x / t;
-}
#if defined _MSC_VER && _MSC_VER >= 1300
#pragma warning(pop)
#endif
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 5f0501aa55..aa8b2c26ce 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -197,11 +197,9 @@ extern int rb_w32_fstat(int, struct stat *);
#define strncasecmp _strnicmp
#define fsync _commit
+struct timezone;
+
#ifdef __MINGW32__
-struct timezone {
- int tz_minuteswest;
- int tz_dsttime;
-};
#undef isascii
#define isascii __isascii
#endif
diff --git a/insns.def b/insns.def
index 8be204ceaa..5f789bd441 100644
--- a/insns.def
+++ b/insns.def
@@ -343,6 +343,9 @@ putspecialobject
case VM_SPECIAL_OBJECT_CBASE:
val = vm_get_cbase(GET_ISEQ(), GET_LFP(), GET_DFP());
break;
+ case VM_SPECIAL_OBJECT_CONST_BASE:
+ val = vm_get_const_base(GET_ISEQ(), GET_LFP(), GET_DFP());
+ break;
default:
rb_bug("putspecialobject insn: unknown value_type");
}
@@ -784,19 +787,21 @@ defined
}
break;
case DEFINED_METHOD:{
- VALUE klass = CLASS_OF(v);
- const rb_method_entry_t *me = rb_method_entry(klass, SYM2ID(obj));
-
- if (me) {
- if (!(me->flag & NOEX_PRIVATE)) {
- if (!((me->flag & NOEX_PROTECTED) &&
- !rb_obj_is_kind_of(GET_SELF(),
- rb_class_real(klass)))) {
- expr_type = "method";
- }
- }
- }
- break;
+ VALUE klass = CLASS_OF(v);
+ const rb_method_entry_t *me = rb_method_entry(klass, SYM2ID(obj));
+
+ if (me) {
+ if (!(me->flag & NOEX_PRIVATE)) {
+ if (!((me->flag & NOEX_PROTECTED) &&
+ !rb_obj_is_kind_of(GET_SELF(),
+ rb_class_real(klass)))) {
+ expr_type = "method";
+ }
+ }
+ }
+ if (RTEST(rb_funcall(v, rb_intern("respond_to_missing?"), 2, obj, Qfalse)))
+ expr_type = "method";
+ break;
}
case DEFINED_YIELD:
if (GET_BLOCK_PTR()) {
@@ -804,27 +809,27 @@ defined
}
break;
case DEFINED_ZSUPER:{
- rb_iseq_t *ip = GET_ISEQ();
- while (ip) {
- if (ip->defined_method_id) {
- break;
- }
- ip = ip->parent_iseq;
- }
- if (ip) {
- VALUE klass = vm_search_normal_superclass(ip->klass, GET_SELF());
- if (rb_method_boundp(klass, ip->defined_method_id, 0)) {
- expr_type = "super";
- }
- }
- break;
+ rb_iseq_t *ip = GET_ISEQ();
+ while (ip) {
+ if (ip->defined_method_id) {
+ break;
+ }
+ ip = ip->parent_iseq;
+ }
+ if (ip) {
+ VALUE klass = vm_search_normal_superclass(ip->klass, GET_SELF());
+ if (rb_method_boundp(klass, ip->defined_method_id, 0)) {
+ expr_type = "super";
+ }
+ }
+ break;
}
case DEFINED_REF:{
- val = vm_getspecial(th, GET_LFP(), Qfalse, FIX2INT(obj));
- if (val != Qnil) {
- expr_type = "global-variable";
- }
- break;
+ val = vm_getspecial(th, GET_LFP(), Qfalse, FIX2INT(obj));
+ if (val != Qnil) {
+ expr_type = "global-variable";
+ }
+ break;
}
default:
rb_bug("unimplemented defined? type (VM)");
@@ -944,7 +949,7 @@ defineclass
rb_bug("unknown defineclass type: %d", (int)define_type);
}
- COPY_CREF(class_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC));
+ COPY_CREF(class_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC, NULL));
/* enter scope */
vm_push_frame(th, class_iseq,
@@ -1247,10 +1252,10 @@ opt_case_dispatch
}
}
else {
- struct opt_case_dispatch_i_arg arg = {
- key, -1
- };
+ struct opt_case_dispatch_i_arg arg;
+ arg.obj = key;
+ arg.label = -1;
st_foreach(RHASH_TBL(hash), opt_case_dispatch_i, (st_data_t)&arg);
if (arg.label != -1) {
diff --git a/io.c b/io.c
index a044be44a8..6c29b5aecb 100644
--- a/io.c
+++ b/io.c
@@ -32,7 +32,7 @@
# include <sys/socket.h>
#endif
-#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__EMX__) || defined(__BEOS__)
+#if defined(__BOW__) || defined(__CYGWIN__) || defined(_WIN32) || defined(__EMX__) || defined(__BEOS__) || defined(__HAIKU__)
# define NO_SAFE_RENAME
#endif
@@ -86,7 +86,7 @@
extern void Init_File(void);
extern void InitVM_File(void);
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__HAIKU__)
# ifndef NOFILE
# define NOFILE (OPEN_MAX)
# endif
@@ -158,7 +158,7 @@ static rb_thread_lock_t max_file_descriptor_lock;
# define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_COUNT > 0)
#elif defined(FILE_READEND)
# define STDIO_READ_DATA_PENDING(fp) ((fp)->FILE_READPTR < (fp)->FILE_READEND)
-#elif defined(__BEOS__)
+#elif defined(__BEOS__) || defined(__HAIKU__)
# define STDIO_READ_DATA_PENDING(fp) (fp->_state._eof == 0)
#else
# define STDIO_READ_DATA_PENDING(fp) (!feof(fp))
@@ -171,9 +171,15 @@ static rb_thread_lock_t max_file_descriptor_lock;
#define READ_DATA_PENDING_PTR(fptr) ((fptr)->rbuf+(fptr)->rbuf_off)
#define READ_DATA_BUFFERED(fptr) READ_DATA_PENDING(fptr)
+#if defined(_WIN32)
+#define WAIT_FD_IN_WIN32(fptr) rb_thread_wait_fd((fptr)->fd);
+#else
+#define WAIT_FD_IN_WIN32(fptr) ;
+#endif
+
#define READ_CHECK(fptr) do {\
if (!READ_DATA_PENDING(fptr)) {\
- rb_thread_wait_fd((fptr)->fd);\
+ WAIT_FD_IN_WIN32(fptr);\
rb_io_check_closed(fptr);\
}\
} while(0)
@@ -302,8 +308,9 @@ io_unread(rb_io_t *fptr)
if (fptr->rbuf_len == 0 || fptr->mode & FMODE_DUPLEX)
return;
/* xxx: target position may be negative if buffer is filled by ungetc */
+ errno = 0;
r = lseek(fptr->fd, -fptr->rbuf_len, SEEK_CUR);
- if (r < 0) {
+ if (r < 0 && errno) {
if (errno == ESPIPE)
fptr->mode |= FMODE_DUPLEX;
return;
@@ -359,7 +366,7 @@ flush_before_seek(rb_io_t *fptr)
#define io_set_eof(fptr) (void)(((fptr)->mode & FMODE_TTY) && ((fptr)->mode |= FMODE_EOF))
#define io_unset_eof(fptr) (fptr->mode &= ~FMODE_EOF)
-#define io_seek(fptr, ofs, whence) (io_unset_eof(fptr), lseek(flush_before_seek(fptr)->fd, ofs, whence))
+#define io_seek(fptr, ofs, whence) (errno = 0, io_unset_eof(fptr), lseek(flush_before_seek(fptr)->fd, ofs, whence))
#define io_tell(fptr) lseek(flush_before_seek(fptr)->fd, 0, SEEK_CUR)
#ifndef SEEK_CUR
@@ -1110,7 +1117,7 @@ rb_io_set_pos(VALUE io, VALUE offset)
pos = NUM2OFFT(offset);
GetOpenFile(io, fptr);
pos = io_seek(fptr, pos, SEEK_SET);
- if (pos < 0) rb_sys_fail_path(fptr->pathv);
+ if (pos < 0 && errno) rb_sys_fail_path(fptr->pathv);
return OFFT2NUM(pos);
}
@@ -1138,7 +1145,7 @@ rb_io_rewind(VALUE io)
VALUE argf = rb_vm_argf();
GetOpenFile(io, fptr);
- if (io_seek(fptr, 0L, 0) < 0) rb_sys_fail_path(fptr->pathv);
+ if (io_seek(fptr, 0L, 0) < 0 && errno) rb_sys_fail_path(fptr->pathv);
if (io == ARGF.current_file) {
ARGF.lineno -= fptr->lineno;
}
@@ -1522,7 +1529,7 @@ remain_size(rb_io_t *fptr)
off_t pos;
if (fstat(fptr->fd, &st) == 0 && S_ISREG(st.st_mode)
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__HAIKU__)
&& (st.st_dev > 3)
#endif
)
@@ -1579,17 +1586,22 @@ make_readconv(rb_io_t *fptr, int size)
}
}
-static int
-more_char(rb_io_t *fptr)
+#define MORE_CHAR_SUSPENDED Qtrue
+#define MORE_CHAR_FINISHED Qnil
+static VALUE
+fill_cbuf(rb_io_t *fptr, int ec_flags)
{
const unsigned char *ss, *sp, *se;
unsigned char *ds, *dp, *de;
rb_econv_result_t res;
int putbackable;
int cbuf_len0;
+ VALUE exc;
+
+ ec_flags |= ECONV_PARTIAL_INPUT;
if (fptr->cbuf_len == fptr->cbuf_capa)
- return 0; /* cbuf full */
+ return MORE_CHAR_SUSPENDED; /* cbuf full */
if (fptr->cbuf_len == 0)
fptr->cbuf_off = 0;
else if (fptr->cbuf_off + fptr->cbuf_len == fptr->cbuf_capa) {
@@ -1604,7 +1616,7 @@ more_char(rb_io_t *fptr)
se = sp + fptr->rbuf_len;
ds = dp = (unsigned char *)fptr->cbuf + fptr->cbuf_off + fptr->cbuf_len;
de = (unsigned char *)fptr->cbuf + fptr->cbuf_capa;
- res = rb_econv_convert(fptr->readconv, &sp, se, &dp, de, ECONV_PARTIAL_INPUT|ECONV_AFTER_OUTPUT);
+ res = rb_econv_convert(fptr->readconv, &sp, se, &dp, de, ec_flags);
fptr->rbuf_off += (int)(sp - ss);
fptr->rbuf_len -= (int)(sp - ss);
fptr->cbuf_len += (int)(dp - ds);
@@ -1616,20 +1628,20 @@ more_char(rb_io_t *fptr)
fptr->rbuf_len += putbackable;
}
- rb_econv_check_error(fptr->readconv);
+ exc = rb_econv_make_exception(fptr->readconv);
+ if (!NIL_P(exc))
+ return exc;
if (cbuf_len0 != fptr->cbuf_len)
- return 0;
+ return MORE_CHAR_SUSPENDED;
if (res == econv_finished) {
- clear_readconv(fptr);
- return -1;
+ return MORE_CHAR_FINISHED;
}
if (res == econv_source_buffer_empty) {
if (fptr->rbuf_len == 0) {
- rb_thread_wait_fd(fptr->fd);
- rb_io_check_closed(fptr);
+ READ_CHECK(fptr);
if (io_fillbuf(fptr) == -1) {
ds = dp = (unsigned char *)fptr->cbuf + fptr->cbuf_off + fptr->cbuf_len;
de = (unsigned char *)fptr->cbuf + fptr->cbuf_capa;
@@ -1643,6 +1655,16 @@ more_char(rb_io_t *fptr)
}
static VALUE
+more_char(rb_io_t *fptr)
+{
+ VALUE v;
+ v = fill_cbuf(fptr, ECONV_AFTER_OUTPUT);
+ if (v != MORE_CHAR_SUSPENDED && v != MORE_CHAR_FINISHED)
+ rb_exc_raise(v);
+ return v;
+}
+
+static VALUE
io_shift_cbuf(rb_io_t *fptr, int len, VALUE *strp)
{
VALUE str;
@@ -1663,7 +1685,7 @@ io_shift_cbuf(rb_io_t *fptr, int len, VALUE *strp)
/* xxx: set coderange */
if (fptr->cbuf_len == 0)
fptr->cbuf_off = 0;
- if (fptr->cbuf_off < fptr->cbuf_capa/2) {
+ else if (fptr->cbuf_capa/2 < fptr->cbuf_off) {
memmove(fptr->cbuf, fptr->cbuf+fptr->cbuf_off, fptr->cbuf_len);
fptr->cbuf_off = 0;
}
@@ -1684,10 +1706,19 @@ read_all(rb_io_t *fptr, long siz, VALUE str)
else rb_str_set_len(str, 0);
make_readconv(fptr, 0);
while (1) {
+ VALUE v;
if (fptr->cbuf_len) {
io_shift_cbuf(fptr, fptr->cbuf_len, &str);
}
- if (more_char(fptr) == -1) {
+ v = fill_cbuf(fptr, 0);
+ if (v != MORE_CHAR_SUSPENDED && v != MORE_CHAR_FINISHED) {
+ if (fptr->cbuf_len) {
+ io_shift_cbuf(fptr, fptr->cbuf_len, &str);
+ }
+ rb_exc_raise(v);
+ }
+ if (v == MORE_CHAR_FINISHED) {
+ clear_readconv(fptr);
return io_enc_str(str, fptr);
}
}
@@ -1714,7 +1745,7 @@ read_all(rb_io_t *fptr, long siz, VALUE str)
}
bytes += n;
if (cr != ENC_CODERANGE_BROKEN)
- pos = rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + bytes, enc, &cr);
+ pos += rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + bytes, enc, &cr);
if (bytes < siz) break;
siz += BUFSIZ;
rb_str_resize(str, siz);
@@ -2168,7 +2199,8 @@ appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
return (unsigned char)RSTRING_PTR(str)[RSTRING_LEN(str)-1];
}
}
- } while (more_char(fptr) != -1);
+ } while (more_char(fptr) != MORE_CHAR_FINISHED);
+ clear_readconv(fptr);
*lp = limit;
return EOF;
}
@@ -2199,8 +2231,7 @@ appendline(rb_io_t *fptr, int delim, VALUE *strp, long *lp)
if (limit == 0)
return (unsigned char)RSTRING_PTR(str)[RSTRING_LEN(str)-1];
}
- rb_thread_wait_fd(fptr->fd);
- rb_io_check_closed(fptr);
+ READ_CHECK(fptr);
} while (io_fillbuf(fptr) >= 0);
*lp = limit;
return EOF;
@@ -2222,8 +2253,7 @@ swallow(rb_io_t *fptr, int term)
if (!read_buffered_data(buf, cnt - i, fptr)) /* must not fail */
rb_sys_fail_path(fptr->pathv);
}
- rb_thread_wait_fd(fptr->fd);
- rb_io_check_closed(fptr);
+ READ_CHECK(fptr);
} while (io_fillbuf(fptr) == 0);
return FALSE;
}
@@ -2259,11 +2289,10 @@ rb_io_getline_fast(rb_io_t *fptr, rb_encoding *enc)
}
len += pending;
if (cr != ENC_CODERANGE_BROKEN)
- pos = rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + len, enc, &cr);
+ pos += rb_str_coderange_scan_restartable(RSTRING_PTR(str) + pos, RSTRING_PTR(str) + len, enc, &cr);
if (e) break;
}
- rb_thread_wait_fd(fptr->fd);
- rb_io_check_closed(fptr);
+ READ_CHECK(fptr);
if (io_fillbuf(fptr) < 0) {
if (NIL_P(str)) return Qnil;
break;
@@ -2683,7 +2712,8 @@ io_getc(rb_io_t *fptr, rb_encoding *enc)
}
}
- if (more_char(fptr) == -1) {
+ if (more_char(fptr) == MORE_CHAR_FINISHED) {
+ clear_readconv(fptr);
if (fptr->cbuf_len == 0)
return Qnil;
/* return an incomplete character just before EOF */
@@ -2818,7 +2848,8 @@ rb_io_each_codepoint(VALUE io)
rb_raise(rb_eIOError, "too long character");
}
}
- if (more_char(fptr) == -1) {
+ if (more_char(fptr) == MORE_CHAR_FINISHED) {
+ clear_readconv(fptr);
/* ignore an incomplete character before EOF */
return io;
}
@@ -2831,8 +2862,8 @@ rb_io_each_codepoint(VALUE io)
c = rb_enc_codepoint(fptr->cbuf+fptr->cbuf_off,
fptr->cbuf+fptr->cbuf_off+fptr->cbuf_len,
fptr->encs.enc);
- fptr->rbuf_off += n;
- fptr->rbuf_len -= n;
+ fptr->cbuf_off += n;
+ fptr->cbuf_len -= n;
rb_yield(UINT2NUM(c));
}
}
@@ -3725,8 +3756,9 @@ rb_io_sysseek(int argc, VALUE *argv, VALUE io)
if ((fptr->mode & FMODE_WRITABLE) && fptr->wbuf_len) {
rb_warn("sysseek for buffered IO");
}
+ errno = 0;
pos = lseek(fptr->fd, pos, whence);
- if (pos == -1) rb_sys_fail_path(fptr->pathv);
+ if (pos == -1 && errno) rb_sys_fail_path(fptr->pathv);
return OFFT2NUM(pos);
}
@@ -4090,11 +4122,14 @@ rb_io_oflags_modestr(int oflags)
#else
# define MODE_BINARY(a,b) (a)
#endif
+ int accmode = oflags & (O_RDONLY|O_WRONLY|O_RDWR);
if (oflags & O_APPEND) {
- if ((oflags & O_RDWR) == O_RDWR) {
+ if (accmode == O_WRONLY) {
+ return MODE_BINARY("a", "ab");
+ }
+ if (accmode == O_RDWR) {
return MODE_BINARY("a+", "ab+");
}
- return MODE_BINARY("a", "ab");
}
switch (oflags & (O_RDONLY|O_WRONLY|O_RDWR)) {
case O_RDONLY:
@@ -4152,8 +4187,10 @@ parse_mode_enc(const char *estr, rb_encoding **enc_p, rb_encoding **enc2_p)
if (len == 0 || len > ENCODING_MAXNAMELEN)
idx = -1;
else {
- if (io_encname_bom_p(estr, len))
+ if (io_encname_bom_p(estr, len)) {
estr += 4;
+ len -= 4;
+ }
memcpy(encname, estr, len);
encname[len] = '\0';
estr = encname;
@@ -4164,6 +4201,7 @@ parse_mode_enc(const char *estr, rb_encoding **enc_p, rb_encoding **enc2_p)
long len = strlen(estr);
if (io_encname_bom_p(estr, len)) {
estr += 4;
+ len -= 4;
memcpy(encname, estr, len);
encname[len] = '\0';
estr = encname;
@@ -5386,27 +5424,6 @@ rb_scan_open_args(int argc, VALUE *argv,
opt = pop_last_hash(&argc, argv);
rb_scan_args(argc, argv, "12", &fname, &vmode, &vperm);
FilePathValue(fname);
-#ifdef __APPLE__
- {
- static rb_encoding *fs_encoding;
- static rb_encoding *utf8mac_encoding;
- rb_encoding *fname_encoding = rb_enc_get(fname);
- if (!fs_encoding)
- fs_encoding = rb_filesystem_encoding();
- if (!utf8mac_encoding)
- utf8mac_encoding = rb_enc_find("UTF8-MAC");
- if (rb_usascii_encoding() != fname_encoding
- && rb_ascii8bit_encoding() != fname_encoding
- && rb_utf8_encoding() != fname_encoding
- && utf8mac_encoding != fname_encoding
- && fs_encoding != fname_encoding) {
- static VALUE fs_enc;
- if (!fs_enc)
- fs_enc = rb_enc_from_encoding(fs_encoding);
- fname = rb_str_encode(fname, fs_enc, 0, Qnil);
- }
- }
-#endif
rb_io_extract_modeenc(&vmode, &vperm, opt, &oflags, &fmode, convconfig_p);
@@ -5723,7 +5740,7 @@ io_reopen(VALUE io, VALUE nfile)
nfile = rb_io_get_io(nfile);
if (rb_safe_level() >= 4 &&
- (!OBJ_UNTRUSTED(io) || !OBJ_UNTRUSTED(nfile))) {
+ (!OBJ_UNTRUSTED(io) || !OBJ_UNTRUSTED(nfile))) {
rb_raise(rb_eSecurityError, "Insecure: can't reopen");
}
GetOpenFile(io, fptr);
@@ -5785,10 +5802,10 @@ io_reopen(VALUE io, VALUE nfile)
}
rb_thread_fd_close(fd);
if ((orig->mode & FMODE_READABLE) && pos >= 0) {
- if (io_seek(fptr, pos, SEEK_SET) < 0) {
+ if (io_seek(fptr, pos, SEEK_SET) < 0 && errno) {
rb_sys_fail_path(fptr->pathv);
}
- if (io_seek(orig, pos, SEEK_SET) < 0) {
+ if (io_seek(orig, pos, SEEK_SET) < 0 && errno) {
rb_sys_fail_path(orig->pathv);
}
}
@@ -7939,6 +7956,19 @@ io_s_read(struct foreach_arg *arg)
return io_read(arg->argc, arg->argv, arg->io);
}
+struct seek_arg {
+ VALUE io;
+ VALUE offset;
+ int mode;
+};
+
+static VALUE
+seek_before_read(struct seek_arg *arg)
+{
+ rb_io_binmode(arg->io);
+ return rb_io_seek(arg->io, arg->offset, arg->mode);
+}
+
/*
* call-seq:
* IO.read(name, [length [, offset]] ) => string
@@ -7981,8 +8011,16 @@ rb_io_s_read(int argc, VALUE *argv, VALUE io)
open_key_args(argc, argv, &arg);
if (NIL_P(arg.io)) return Qnil;
if (!NIL_P(offset)) {
- rb_io_binmode(arg.io);
- rb_io_seek(arg.io, offset, SEEK_SET);
+ struct seek_arg sarg;
+ int state = 0;
+ sarg.io = arg.io;
+ sarg.offset = offset;
+ sarg.mode = SEEK_SET;
+ rb_protect((VALUE (*)(VALUE))seek_before_read, (VALUE)&sarg, &state);
+ if (state) {
+ rb_io_close(arg.io);
+ rb_jump_tag(state);
+ }
if (arg.argc == 2) arg.argc = 1;
}
return rb_ensure(io_s_read, (VALUE)&arg, rb_io_close, arg.io);
@@ -8125,8 +8163,9 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
if (use_pread)
copy_length = src_stat.st_size - src_offset;
else {
+ errno = 0;
off_t cur = lseek(stp->src_fd, 0, SEEK_CUR);
- if (cur == (off_t)-1) {
+ if (cur == (off_t)-1 && errno) {
stp->syserr = "lseek";
stp->error_no = errno;
return -1;
@@ -8258,8 +8297,9 @@ nogvl_copy_stream_read_write(struct copy_stream_struct *stp)
if (use_pread && stp->close_src) {
off_t r;
+ errno = 0;
r = lseek(stp->src_fd, src_offset, SEEK_SET);
- if (r == (off_t)-1) {
+ if (r == (off_t)-1 && errno) {
stp->syserr = "lseek";
stp->error_no = errno;
return;
@@ -9277,7 +9317,7 @@ argf_each_line(int argc, VALUE *argv, VALUE argf)
RETURN_ENUMERATOR(argf, argc, argv);
for (;;) {
if (!next_argv()) return argf;
- rb_block_call(ARGF.current_file, rb_intern("each_line"), argc, argv, rb_yield, 0);
+ rb_block_call(ARGF.current_file, rb_intern("each_line"), argc, argv, 0, 0);
ARGF.next_p = 1;
}
}
@@ -9311,7 +9351,7 @@ argf_each_byte(VALUE argf)
RETURN_ENUMERATOR(argf, 0, 0);
for (;;) {
if (!next_argv()) return argf;
- rb_block_call(ARGF.current_file, rb_intern("each_byte"), 0, 0, rb_yield, 0);
+ rb_block_call(ARGF.current_file, rb_intern("each_byte"), 0, 0, 0, 0);
ARGF.next_p = 1;
}
}
@@ -9341,7 +9381,7 @@ argf_each_char(VALUE argf)
RETURN_ENUMERATOR(argf, 0, 0);
for (;;) {
if (!next_argv()) return argf;
- rb_block_call(ARGF.current_file, rb_intern("each_char"), 0, 0, rb_yield, 0);
+ rb_block_call(ARGF.current_file, rb_intern("each_char"), 0, 0, 0, 0);
ARGF.next_p = 1;
}
}
diff --git a/iseq.c b/iseq.c
index 9a416d4abe..296de834aa 100644
--- a/iseq.c
+++ b/iseq.c
@@ -1010,10 +1010,7 @@ iseq_s_disasm(VALUE klass, VALUE body)
rb_secure(1);
- if ((iseq = rb_method_get_iseq(body)) != 0) {
- ret = rb_iseq_disasm(iseq->self);
- }
- else {
+ if (rb_obj_is_proc(body)) {
rb_proc_t *proc;
VALUE iseqval;
GetProcPtr(body, proc);
@@ -1022,6 +1019,9 @@ iseq_s_disasm(VALUE klass, VALUE body)
ret = rb_iseq_disasm(iseqval);
}
}
+ else if ((iseq = rb_method_get_iseq(body)) != 0) {
+ ret = rb_iseq_disasm(iseq->self);
+ }
return ret;
}
diff --git a/lib/cgi.rb b/lib/cgi.rb
index 6355a92804..3af271523b 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -272,3 +272,4 @@ raise "Please, use ruby 1.9.0 or later." if RUBY_VERSION < "1.9.0"
require 'cgi/core'
require 'cgi/cookie'
require 'cgi/util'
+CGI.autoload(:HtmlExtension, 'cgi/html')
diff --git a/lib/cgi/core.rb b/lib/cgi/core.rb
index 240d3bb714..3930663331 100644
--- a/lib/cgi/core.rb
+++ b/lib/cgi/core.rb
@@ -555,11 +555,7 @@ class CGI
%|(offline mode: enter name=value pairs on standard input)\n|
)
end
- array = nil
- begin
- readlines
- rescue
- end
+ array = readlines rescue nil
if not array.nil?
array.join(' ').gsub(/\n/n, '')
else
diff --git a/lib/cgi/util.rb b/lib/cgi/util.rb
index fbba00b963..42f1336e9f 100644
--- a/lib/cgi/util.rb
+++ b/lib/cgi/util.rb
@@ -170,7 +170,7 @@ class CGI
# # </HTML>
#
def CGI::pretty(string, shift = " ")
- lines = string.gsub(/(?!\A)<(?:.|\n)*?>/, "\n\\0").gsub(/<(?:.|\n)*?>(?!\n)/, "\\0\n")
+ lines = string.gsub(/(?!\A)<.*?>/m, "\n\\0").gsub(/<.*?>(?!\n)/m, "\\0\n")
end_pos = 0
while end_pos = lines.index(/^<\/(\w+)/, end_pos)
element = $1.dup
diff --git a/lib/csv.rb b/lib/csv.rb
index d44e4db744..c61e57c222 100644
--- a/lib/csv.rb
+++ b/lib/csv.rb
@@ -198,7 +198,7 @@ require "stringio"
#
class CSV
# The version of the installed library.
- VERSION = "2.4.5".freeze
+ VERSION = "2.4.6".freeze
#
# A CSV::Row is part Array and part Hash. It retains an order for the fields
@@ -364,10 +364,12 @@ class CSV
# or +nil+ if a pair could not be found.
#
def delete(header_or_index, minimum_index = 0)
- if header_or_index.is_a? Integer # by index
+ if header_or_index.is_a? Integer # by index
@row.delete_at(header_or_index)
- else # by header
- @row.delete_at(index(header_or_index, minimum_index))
+ elsif i = index(header_or_index, minimum_index) # by header
+ @row.delete_at(i)
+ else
+ [ ]
end
end
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 77804e47ff..c38aea5947 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -114,10 +114,20 @@
# subclasses. Subclasses should redefine \_\_getobj\_\_. For a concrete
# implementation, see SimpleDelegator.
#
-class Delegator
- [:to_s,:inspect,:=~,:!~,:===,:<=>].each do |m|
- undef_method m
+class Delegator < BasicObject
+ kernel = ::Kernel.dup
+ kernel.class_eval do
+ [:to_s,:inspect,:=~,:!~,:===,:<=>].each do |m|
+ undef_method m
+ end
+ end
+ include kernel
+
+ # :stopdoc:
+ def self.const_missing(n)
+ ::Object.const_get(n)
end
+ # :startdoc:
#
# Pass in the _obj_ to delegate method calls to. All methods supported by
@@ -129,18 +139,11 @@ class Delegator
# Handles the magic of delegation through \_\_getobj\_\_.
def method_missing(m, *args, &block)
+ target = self.__getobj__
begin
- target = self.__getobj__
- unless target.respond_to?(m)
- super(m, *args, &block)
- else
- target.__send__(m, *args, &block)
- end
- rescue Exception
- if i = $@.index{|s| %r"\A#{Regexp.quote(__FILE__)}:\d+:in `method_missing'\z"o =~ s}
- $@[0..i] = []
- end
- ::Kernel::raise
+ target.respond_to?(m) ? target.__send__(m, *args, &block) : super(m, *args, &block)
+ ensure
+ $@.delete_if {|t| %r"\A#{Regexp.quote(__FILE__)}:#{__LINE__-2}:"o =~ t} if $@
end
end
@@ -183,25 +186,33 @@ class Delegator
# Serialization support for the object returned by \_\_getobj\_\_.
def marshal_dump
- __getobj__
+ ivars = instance_variables.reject {|var| /\A@delegate_/ =~ var}
+ [
+ :__v2__,
+ ivars, ivars.map{|var| instance_variable_get(var)},
+ __getobj__
+ ]
end
# Reinitializes delegation from a serialized object.
- def marshal_load(obj)
- __setobj__(obj)
+ def marshal_load(data)
+ version, vars, values, obj = data
+ if version == :__v2__
+ vars.each_with_index{|var, i| instance_variable_set(var, values[i])}
+ __setobj__(obj)
+ else
+ __setobj__(data)
+ end
end
- # Clone support for the object returned by \_\_getobj\_\_.
- def clone
- new = super
- new.__setobj__(__getobj__.clone)
- new
+ # :nodoc:
+ def initialize_clone(obj)
+ self.__setobj__(obj.__getobj__.clone)
end
- # Duplication support for the object returned by \_\_getobj\_\_.
- def dup
- new = super
- new.__setobj__(__getobj__.dup)
- new
+ # :nodoc:
+ def initialize_dup(obj)
+ self.__setobj__(obj.__getobj__.dup)
end
+ private :initialize_clone, :initialize_dup
# Freeze self and target at once.
def freeze
@@ -245,28 +256,16 @@ class SimpleDelegator<Delegator
raise ArgumentError, "cannot delegate to self" if self.equal?(obj)
@delegate_sd_obj = obj
end
-
- def initialize(obj) # :nodoc:
- (self.public_methods - Delegator.public_api).each do |m|
- class << self
- self
- end.class_eval do
- undef_method m
- end
- end
- super
- end
end
# :stopdoc:
def Delegator.delegating_block(mid)
lambda do |*args, &block|
+ target = self.__getobj__
begin
- __getobj__.__send__(mid, *args, &block)
- rescue
- re = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-2}:/o
- $!.backtrace.delete_if {|t| re =~ t}
- raise
+ target.__send__(mid, *args, &block)
+ ensure
+ $@.delete_if {|t| /\A#{Regexp.quote(__FILE__)}:#{__LINE__-2}:/o =~ t} if $@
end
end
end
diff --git a/lib/drb/eq.rb b/lib/drb/eq.rb
index e24512d6a7..6328c81202 100644
--- a/lib/drb/eq.rb
+++ b/lib/drb/eq.rb
@@ -1,5 +1,3 @@
-require 'drb/drb'
-
module DRb
class DRbObject
def ==(other)
diff --git a/lib/find.rb b/lib/find.rb
index 79ff7c1378..591020ea04 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -39,28 +39,24 @@ module Find
while file = paths.shift
catch(:prune) do
yield file.dup.taint
- next unless File.exist? file
- begin
- if File.lstat(file).directory? then
- d = Dir.open(file)
- begin
- for f in d
- next if f == "." or f == ".."
- if File::ALT_SEPARATOR and file =~ /^(?:[\/\\]|[A-Za-z]:[\/\\]?)$/ then
- f = file + f
- elsif file == "/" then
- f = "/" + f
- else
- f = File.join(file, f)
- end
- paths.unshift f.untaint
- end
- ensure
- d.close
- end
- end
- rescue Errno::ENOENT, Errno::EACCES
- end
+ begin
+ s = File.lstat(file)
+ rescue Errno::ENOENT, Errno::EACCES, Errno::ENOTDIR, Errno::ELOOP, Errno::ENAMETOOLONG
+ next
+ end
+ if s.directory? then
+ begin
+ fs = Dir.entries(file)
+ 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)
+ paths.unshift f.untaint
+ }
+ end
end
end
end
diff --git a/lib/getoptlong.rb b/lib/getoptlong.rb
index 2d3b617d6b..7bd9ee55cc 100644
--- a/lib/getoptlong.rb
+++ b/lib/getoptlong.rb
@@ -282,8 +282,11 @@ class GetoptLong
@canonical_names.clear
@argument_flags.clear
- arguments.each do |*arg|
- arg = arg.first # TODO: YARV Hack
+ arguments.each do |arg|
+ if !arg.is_a?(Array)
+ raise ArgumentError, "the option list contains non-Array argument"
+ end
+
#
# Find an argument flag and it set to `argument_flag'.
#
diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb
index 7bc033cee1..190c49ae78 100644
--- a/lib/irb/extend-command.rb
+++ b/lib/irb/extend-command.rb
@@ -122,28 +122,28 @@ module IRB
end
if load_file
- eval %[
+ line = __LINE__; eval %[
def #{cmd_name}(*opts, &b)
require "#{load_file}"
arity = ExtendCommand::#{cmd_class}.instance_method(:execute).arity
- args = (1..arity.abs).map {|i| "arg" + i.to_s }
+ args = (1..(arity < 0 ? ~arity : arity)).map {|i| "arg" + i.to_s }
args << "*opts" if arity < 0
args << "&block"
args = args.join(", ")
- eval %[
+ line = __LINE__; eval %[
def #{cmd_name}(\#{args})
ExtendCommand::#{cmd_class}.execute(irb_context, \#{args})
end
- ]
+ ], nil, __FILE__, line
send :#{cmd_name}, *opts, &b
end
- ]
+ ], nil, __FILE__, line
else
- eval %[
+ line = __LINE__; eval %[
def #{cmd_name}(*opts, &b)
ExtendCommand::#{cmd_class}.execute(irb_context, *opts, &b)
end
- ]
+ ], nil, __FILE__, line
end
for ali, flag in aliases
@@ -160,7 +160,7 @@ module IRB
(override == OVERRIDE_PRIVATE_ONLY) && !respond_to?(to) or
(override == NO_OVERRIDE) && !respond_to?(to, true)
target = self
- (class<<self;self;end).instance_eval{
+ (class << self; self; end).instance_eval{
if target.respond_to?(to, true) &&
!target.respond_to?(EXCB.irb_original_method_name(to), true)
alias_method(EXCB.irb_original_method_name(to), to)
@@ -177,7 +177,7 @@ module IRB
end
def self.extend_object(obj)
- unless (class<<obj;ancestors;end).include?(EXCB)
+ unless (class << obj; ancestors; end).include?(EXCB)
super
for ali, com, flg in @ALIASES
obj.install_alias_method(ali, com, flg)
@@ -207,7 +207,7 @@ module IRB
end
def self.def_extend_command(cmd_name, load_file, *aliases)
- Context.module_eval %[
+ line = __LINE__; Context.module_eval %[
def #{cmd_name}(*opts, &b)
Context.module_eval {remove_method(:#{cmd_name})}
require "#{load_file}"
@@ -216,7 +216,7 @@ module IRB
for ali in aliases
alias_method ali, cmd_name
end
- ]
+ ], __FILE__, line
end
CE.install_extend_commands
diff --git a/lib/mathn.rb b/lib/mathn.rb
index f834893f3f..716b48602d 100644
--- a/lib/mathn.rb
+++ b/lib/mathn.rb
@@ -54,6 +54,7 @@ class Bignum
end
class Rational
+ remove_method :**
def ** (other)
if other.kind_of?(Rational)
other2 = other
@@ -188,6 +189,9 @@ module Math
end
end
+ class << self
+ remove_method(:sqrt)
+ end
module_function :sqrt
module_function :rsqrt
end
diff --git a/lib/matrix.rb b/lib/matrix.rb
index 3c75751e37..d452bf459e 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -26,7 +26,8 @@ module ExceptionForMatrix # :nodoc:
def_exception("ErrDimensionMismatch", "\#{self.name} dimension mismatch")
def_exception("ErrNotRegular", "Not Regular Matrix")
- def_exception("ErrOperationNotDefined", "This operation(%s) can\\'t defined")
+ def_exception("ErrOperationNotDefined", "Operation(%s) can\\'t be defined: %s op %s")
+ def_exception("ErrOperationNotImplemented", "Sorry, Operation(%s) not implemented: %s op %s")
end
#
@@ -497,7 +498,7 @@ class Matrix
def +(m)
case m
when Numeric
- Matrix.Raise ErrOperationNotDefined, "+"
+ Matrix.Raise ErrOperationNotDefined, "+", self.class, m.class
when Vector
m = Matrix.column_vector(m)
when Matrix
@@ -525,7 +526,7 @@ class Matrix
def -(m)
case m
when Numeric
- Matrix.Raise ErrOperationNotDefined, "-"
+ Matrix.Raise ErrOperationNotDefined, "-", self.class, m.class
when Vector
m = Matrix.column_vector(m)
when Matrix
@@ -569,7 +570,7 @@ class Matrix
#
# Returns the inverse of the matrix.
- # Matrix[[1, 2], [2, 1]].inverse
+ # Matrix[[-1, -1], [0, -1]].inverse
# => -1 1
# 0 -1
#
@@ -603,16 +604,16 @@ class Matrix
end
akk = a[k][k]
- size.times do |i|
- next if i == k
- q = a[i][k].quo(akk)
- a[i][k] = 0
+ size.times do |ii|
+ next if ii == k
+ q = a[ii][k].quo(akk)
+ a[ii][k] = 0
(k + 1 ... size).each do |j|
- a[i][j] -= a[k][j] * q
+ a[ii][j] -= a[k][j] * q
end
size.times do |j|
- @rows[i][j] -= @rows[k][j] * q
+ @rows[ii][j] -= @rows[k][j] * q
end
end
@@ -649,9 +650,9 @@ class Matrix
x *= x
end
elsif other.kind_of?(Float) || defined?(Rational) && other.kind_of?(Rational)
- Matrix.Raise ErrOperationNotDefined, "**"
+ Matrix.Raise ErrOperationNotImplemented, "**", self.class, other.class
else
- Matrix.Raise ErrOperationNotDefined, "**"
+ Matrix.Raise ErrOperationNotDefined, "**", self.class, other.class
end
end
@@ -678,8 +679,8 @@ class Matrix
det = 1
size.times do |k|
if (akk = a[k][k]) == 0
- i = (k+1 ... size).find {|i|
- a[i][k] != 0
+ i = (k+1 ... size).find {|ii|
+ a[ii][k] != 0
}
return 0 if i.nil?
a[i], a[k] = a[k], a[i]
@@ -687,10 +688,10 @@ class Matrix
det *= -1
end
- (k + 1 ... size).each do |i|
- q = a[i][k].quo(akk)
+ (k + 1 ... size).each do |ii|
+ q = a[ii][k].quo(akk)
(k + 1 ... size).each do |j|
- a[i][j] -= a[k][j] * q
+ a[ii][j] -= a[k][j] * q
end
end
det *= akk
@@ -718,21 +719,21 @@ class Matrix
det = 1
size.times do |k|
if a[k][k].zero?
- i = (k+1 ... size).find {|i|
- a[i][k] != 0
+ i = (k+1 ... size).find {|ii|
+ a[ii][k] != 0
}
return 0 if i.nil?
a[i], a[k] = a[k], a[i]
det *= -1
end
- (k + 1 ... size).each do |i|
- q = a[i][k].quo(a[k][k])
+ (k + 1 ... size).each do |ii|
+ q = a[ii][k].quo(a[k][k])
(k ... size).each do |j|
- a[i][j] -= a[k][j] * q
+ a[ii][j] -= a[k][j] * q
end
- unless a[i][k].zero?
- a[i], a[k] = a[k], a[i]
+ unless a[ii][k].zero?
+ a[ii], a[k] = a[k], a[ii]
det *= -1
redo
end
@@ -764,15 +765,15 @@ class Matrix
rank = 0
a_column_size.times do |k|
if (akk = a[k][k]) == 0
- i = (k+1 ... a_row_size).find {|i|
- a[i][k] != 0
+ i = (k+1 ... a_row_size).find {|ii|
+ a[ii][k] != 0
}
if i
a[i], a[k] = a[k], a[i]
akk = a[k][k]
else
- i = (k+1 ... a_column_size).find {|i|
- a[k][i] != 0
+ i = (k+1 ... a_column_size).find {|ii|
+ a[k][ii] != 0
}
next if i.nil?
(k ... a_column_size).each do |j|
@@ -782,10 +783,10 @@ class Matrix
end
end
- (k + 1 ... a_row_size).each do |i|
- q = a[i][k].quo(akk)
+ (k + 1 ... a_row_size).each do |ii|
+ q = a[ii][k].quo(akk)
(k + 1... a_column_size).each do |j|
- a[i][j] -= a[k][j] * q
+ a[ii][j] -= a[k][j] * q
end
end
rank += 1
@@ -976,9 +977,7 @@ class Matrix
when Numeric
Scalar.new(@value + other)
when Vector, Matrix
- Scalar.Raise WrongArgType, other.class, "Numeric or Scalar"
- when Scalar
- Scalar.new(@value + other.value)
+ Scalar.Raise ErrOperationNotDefined, "+", @value.class, other.class
else
x, y = other.coerce(self)
x + y
@@ -990,9 +989,7 @@ class Matrix
when Numeric
Scalar.new(@value - other)
when Vector, Matrix
- Scalar.Raise WrongArgType, other.class, "Numeric or Scalar"
- when Scalar
- Scalar.new(@value - other.value)
+ Scalar.Raise ErrOperationNotDefined, "-", @value.class, other.class
else
x, y = other.coerce(self)
x - y
@@ -1016,7 +1013,7 @@ class Matrix
when Numeric
Scalar.new(@value / other)
when Vector
- Scalar.Raise WrongArgType, other.class, "Numeric or Scalar or Matrix"
+ Scalar.Raise ErrOperationNotDefined, "/", @value.class, other.class
when Matrix
self * other.inverse
else
@@ -1030,9 +1027,10 @@ class Matrix
when Numeric
Scalar.new(@value ** other)
when Vector
- Scalar.Raise WrongArgType, other.class, "Numeric or Scalar or Matrix"
+ Scalar.Raise ErrOperationNotDefined, "**", @value.class, other.class
when Matrix
- other.powered_by(self)
+ #other.powered_by(self)
+ Scalar.Raise ErrOperationNotImplemented, "**", @value.class, other.class
else
x, y = other.coerce(self)
x ** y
@@ -1147,10 +1145,11 @@ class Vector
#
def each2(v) # :yield: e1, e2
Vector.Raise ErrDimensionMismatch if size != v.size
- return to_enum(:each2) unless block_given?
+ return to_enum(:each2, v) unless block_given?
size.times do |i|
yield @elements[i], v[i]
end
+ self
end
#
@@ -1159,7 +1158,7 @@ class Vector
#
def collect2(v) # :yield: e1, e2
Vector.Raise ErrDimensionMismatch if size != v.size
- return to_enum(:collect2) unless block_given?
+ return to_enum(:collect2, v) unless block_given?
(0 ... size).collect do |i|
yield @elements[i], v[i]
end
@@ -1214,6 +1213,8 @@ class Vector
Vector.elements(els, false)
when Matrix
Matrix.column_vector(self) * x
+ when Vector
+ Vector.Raise ErrOperationNotDefined, "*", self.class, x.class
else
s, x = x.coerce(self)
s * x
@@ -1258,6 +1259,22 @@ class Vector
end
end
+ #
+ # Vector division.
+ #
+ def /(x)
+ case x
+ when Numeric
+ els = @elements.collect{|e| e / x}
+ Vector.elements(els, false)
+ when Matrix, Vector
+ Vector.Raise ErrOperationNotDefined, "/", self.class, x.class
+ else
+ s, x = x.coerce(self)
+ s / x
+ end
+ end
+
#--
# VECTOR FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
@@ -1290,7 +1307,7 @@ class Vector
# Like Vector#collect2, but returns a Vector instead of an Array.
#
def map2(v, &block) # :yield: e1, e2
- return to_enum(:map2) unless block_given?
+ return to_enum(:map2, v) unless block_given?
els = collect2(v, &block)
Vector.elements(els, false)
end
diff --git a/lib/minitest/spec.rb b/lib/minitest/spec.rb
index 81bd08867a..e730e205e8 100644
--- a/lib/minitest/spec.rb
+++ b/lib/minitest/spec.rb
@@ -9,7 +9,23 @@
require 'minitest/unit'
class Module
- def infect_with_assertions pos_prefix, neg_prefix, skip_re, map = {}
+ def infect_an_assertion meth, new_name, dont_flip = false
+ # warn "%-22p -> %p %p" % [meth, new_name, dont_flip]
+ self.class_eval <<-EOM
+ def #{new_name} *args, &block
+ return MiniTest::Spec.current.#{meth}(*args, &self) if
+ Proc === self
+ return MiniTest::Spec.current.#{meth}(args.first, self) if
+ args.size == 1 unless #{!!dont_flip}
+ return MiniTest::Spec.current.#{meth}(self, *args)
+ end
+ EOM
+ end
+
+ def infect_with_assertions(pos_prefix, neg_prefix,
+ skip_re,
+ dont_flip_re = /\c0/,
+ map = {})
MiniTest::Assertions.public_instance_methods(false).each do |meth|
meth = meth.to_s
@@ -25,14 +41,7 @@ class Module
regexp, replacement = map.find { |re, _| new_name =~ re }
new_name.sub! regexp, replacement if replacement
- # warn "%-22p -> %p %p" % [meth, new_name, regexp]
- self.class_eval <<-EOM
- def #{new_name} *args, &block
- return MiniTest::Spec.current.#{meth}(*args, &self) if Proc === self
- return MiniTest::Spec.current.#{meth}(args.first, self) if args.size == 1
- return MiniTest::Spec.current.#{meth}(self, *args)
- end
- EOM
+ infect_an_assertion meth, new_name, new_name =~ dont_flip_re
end
end
end
@@ -40,6 +49,7 @@ end
Object.infect_with_assertions(:must, :wont,
/^(must|wont)$|wont_(throw)|
must_(block|not?_|nothing|raise$)/x,
+ /(must|wont)_(include|respond_to)/,
/(must_throw)s/ => '\1',
/(?!not)_same/ => '_be_same_as',
/_in_/ => '_be_within_',
@@ -57,7 +67,9 @@ module Kernel
def describe desc, &block
stack = MiniTest::Spec.describe_stack
name = desc.to_s.split(/\W+/).map { |s| s.capitalize }.join + "Spec"
- cls = Object.class_eval "class #{name} < #{stack.last}; end; #{name}"
+ prev = stack.last
+ name = "#{prev == MiniTest::Spec ? nil : prev}::#{name}"
+ cls = Object.class_eval "class #{name} < #{prev}; end; #{name}"
cls.nuke_test_methods!
@@ -85,7 +97,7 @@ class MiniTest::Spec < MiniTest::Unit::TestCase
def self.nuke_test_methods!
self.public_instance_methods.grep(/^test_/).each do |name|
- send :remove_method, name rescue nil
+ self.send :undef_method, name
end
end
@@ -99,11 +111,19 @@ class MiniTest::Spec < MiniTest::Unit::TestCase
end
def self.before(type = :each, &block)
+ if type == :all
+ warn "change before :all to before :each"
+ type = :each
+ end
raise "unsupported before type: #{type}" unless type == :each
define_inheritable_method :setup, &block
end
def self.after(type = :each, &block)
+ if type == :all # REFACTOR
+ warn "change before :all to before :each"
+ type = :each
+ end
raise "unsupported after type: #{type}" unless type == :each
define_inheritable_method :teardown, &block
end
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb
index e936f39fc7..1570b7f457 100644
--- a/lib/minitest/unit.rb
+++ b/lib/minitest/unit.rb
@@ -95,25 +95,25 @@ module MiniTest
end
def assert_includes collection, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(collection)} to include #{mu_pp(obj)}" }
- flip = (obj.respond_to? :include?) && ! (collection.respond_to? :include?) # HACK for specs
- obj, collection = collection, obj if flip
+ msg = message(msg) {
+ "Expected #{mu_pp(collection)} to include #{mu_pp(obj)}"
+ }
assert_respond_to collection, :include?
assert collection.include?(obj), msg
end
def assert_instance_of cls, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to be an instance of #{cls}, not #{obj.class}" }
- flip = (Module === obj) && ! (Module === cls) # HACK for specs
- obj, cls = cls, obj if flip
+ msg = message(msg) {
+ "Expected #{mu_pp(obj)} to be an instance of #{cls}, not #{obj.class}"
+ }
+
assert obj.instance_of?(cls), msg
end
def assert_kind_of cls, obj, msg = nil # TODO: merge with instance_of
msg = message(msg) {
"Expected #{mu_pp(obj)} to be a kind of #{cls}, not #{obj.class}" }
- flip = (Module === obj) && ! (Module === cls) # HACK for specs
- obj, cls = cls, obj if flip
+
assert obj.kind_of?(cls), msg
end
@@ -136,28 +136,29 @@ module MiniTest
def assert_raises *exp
msg = String === exp.last ? exp.pop : nil
+ msg = msg.to_s + "\n" if msg
should_raise = false
begin
yield
should_raise = true
rescue Exception => e
+ details = "#{msg}#{mu_pp(exp)} exception expected, not"
assert(exp.any? { |ex|
ex.instance_of?(Module) ? e.kind_of?(ex) : ex == e.class
- }, exception_details(e, "#{mu_pp(exp)} exception expected, not"))
+ }, exception_details(e, details))
return e
end
exp = exp.first if exp.size == 1
- flunk "#{mu_pp(exp)} expected but nothing was raised." if should_raise
+ flunk "#{msg}#{mu_pp(exp)} expected but nothing was raised." if
+ should_raise
end
def assert_respond_to obj, meth, msg = nil
msg = message(msg) {
"Expected #{mu_pp(obj)} (#{obj.class}) to respond to ##{meth}"
}
- flip = (Symbol === obj) && ! (Symbol === meth) # HACK for specs
- obj, meth = meth, obj if flip
assert obj.respond_to?(meth), msg
end
@@ -247,13 +248,17 @@ module MiniTest
end
def refute_equal exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to not be equal to #{mu_pp(exp)}" }
+ msg = message(msg) {
+ "Expected #{mu_pp(act)} to not be equal to #{mu_pp(exp)}"
+ }
refute exp == act, msg
end
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}" }
+ msg = message(msg) {
+ "Expected #{exp} - #{act} (#{n}) to not be < #{delta}"
+ }
refute delta > n, msg
end
@@ -262,24 +267,22 @@ module MiniTest
end
def refute_includes collection, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(collection)} to not include #{mu_pp(obj)}" }
- flip = (obj.respond_to? :include?) && ! (collection.respond_to? :include?) # HACK for specs
- obj, collection = collection, obj if flip
+ msg = message(msg) {
+ "Expected #{mu_pp(collection)} to not include #{mu_pp(obj)}"
+ }
assert_respond_to collection, :include?
refute collection.include?(obj), msg
end
def refute_instance_of cls, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to not be an instance of #{cls}" }
- flip = (Module === obj) && ! (Module === cls) # HACK for specs
- obj, cls = cls, obj if flip
+ msg = message(msg) {
+ "Expected #{mu_pp(obj)} to not be an instance of #{cls}"
+ }
refute obj.instance_of?(cls), msg
end
def refute_kind_of cls, obj, msg = nil # TODO: merge with instance_of
msg = message(msg) { "Expected #{mu_pp(obj)} to not be a kind of #{cls}" }
- flip = (Module === obj) && ! (Module === cls) # HACK for specs
- obj, cls = cls, obj if flip
refute obj.kind_of?(cls), msg
end
@@ -296,19 +299,22 @@ module MiniTest
end
def refute_operator o1, op, o2, msg = nil
- msg = message(msg) { "Expected #{mu_pp(o1)} to not be #{op} #{mu_pp(o2)}" }
+ msg = message(msg) {
+ "Expected #{mu_pp(o1)} to not be #{op} #{mu_pp(o2)}"
+ }
refute o1.__send__(op, o2), msg
end
def refute_respond_to obj, meth, msg = nil
msg = message(msg) { "Expected #{mu_pp(obj)} to not respond to #{meth}" }
- flip = (Symbol === obj) && ! (Symbol === meth) # HACK for specs
- obj, meth = meth, obj if flip
+
refute obj.respond_to?(meth), msg
end
def refute_same exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to not be the same as #{mu_pp(exp)}" }
+ msg = message(msg) {
+ "Expected #{mu_pp(act)} to not be the same as #{mu_pp(exp)}"
+ }
refute exp.equal?(act), msg
end
@@ -319,7 +325,7 @@ module MiniTest
end
class Unit
- VERSION = "1.4.2"
+ VERSION = "1.5.0"
attr_accessor :report, :failures, :errors, :skips
attr_accessor :test_count, :assertion_count
@@ -520,8 +526,8 @@ module MiniTest
include MiniTest::Assertions
end # class TestCase
- end # class Test
-end # module Mini
+ end # class Unit
+end # module MiniTest
if $DEBUG then
# this helps me ferret out porting issues
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 7635b4b7a3..fc9353e5cd 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -367,11 +367,13 @@ The complier failed to generate an executable file.
You have to install development tools first.
MSG
end
- src = create_tmpsrc(src, &b)
- xsystem(command)
-ensure
- log_src(src)
- rm_rf 'conftest.dSYM'
+ begin
+ src = create_tmpsrc(src, &b)
+ xsystem(command)
+ ensure
+ log_src(src)
+ rm_rf 'conftest.dSYM'
+ end
end
def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
@@ -830,7 +832,7 @@ end
def have_header(header, preheaders = nil, &b)
checking_for header do
if try_header(cpp_include(preheaders)+cpp_include(header), &b)
- $defs.push(format("-DHAVE_%s", header.tr("a-z./\055", "A-Z___")))
+ $defs.push(format("-DHAVE_%s", header.tr_cpp))
true
else
false
@@ -985,6 +987,11 @@ def have_const(const, headers = nil, opt = "", &b)
end
end
+STRING_OR_FAILED_FORMAT = "%s"
+def STRING_OR_FAILED_FORMAT.%(x)
+ x ? super : "failed"
+end
+
# Returns the size of the given +type+. You may optionally specify additional
# +headers+ to search in for the +type+.
#
@@ -1002,10 +1009,7 @@ def check_sizeof(type, headers = nil, opts = "", &b)
prelude << "static rbcv_typedef_ *rbcv_ptr_;\n"
prelude = [prelude]
expr = "sizeof((*rbcv_ptr_)#{"." << member if member})"
- fmt = "%s"
- def fmt.%(x)
- x ? super : "failed"
- end
+ fmt = STRING_OR_FAILED_FORMAT
checking_for checking_message("size of #{type}", headers), fmt do
if UNIVERSAL_INTS.include?(type)
type
@@ -1021,6 +1025,37 @@ def check_sizeof(type, headers = nil, opts = "", &b)
end
end
+# Returns the signedness of the given +type+. You may optionally
+# specify additional +headers+ to search in for the +type+.
+#
+# If the +type+ is found and is a numeric type, a macro is passed as a
+# preprocessor constant to the compiler using the +type+ name, in
+# uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+
+# name, followed by '=X' where 'X' is positive integer if the +type+ is
+# unsigned, or negative integer if the +type+ is signed.
+#
+# For example, if size_t is defined as unsigned, then
+# check_signedness('size_t') would returned +1 and the
+# SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
+# compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
+# done.
+#
+def check_signedness(type, headers = nil)
+ signed = nil
+ checking_for("signedness of #{type}", STRING_OR_FAILED_FORMAT) do
+ if try_static_assert("(#{type})-1 < 0")
+ signed = -1
+ elsif try_static_assert("(#{type})-1 > 0")
+ signed = +1
+ else
+ next nil
+ end
+ $defs.push("-DSIGNEDNESS_OF_%s=%+d" % [type.tr_cpp, signed])
+ signed < 0 ? "signed" : "unsigned"
+ end
+ signed
+end
+
# :stopdoc:
# Used internally by the what_type? method to determine if +type+ is a scalar
@@ -1123,10 +1158,12 @@ end
# Internal use only.
#
def find_executable0(bin, path = nil)
- ext = config_string('EXEEXT')
+ exts = config_string('EXECUTABLE_EXTS') {|s| s.split} || config_string('EXEEXT') {|s| [s]}
if File.expand_path(bin) == bin
return bin if File.executable?(bin)
- ext and File.executable?(file = bin + ext) and return file
+ if exts
+ exts.each {|ext| File.executable?(file = bin + ext) and return file}
+ end
return nil
end
if path ||= ENV['PATH']
@@ -1137,7 +1174,9 @@ def find_executable0(bin, path = nil)
file = nil
path.each do |dir|
return file if File.executable?(file = File.join(dir, bin))
- return file if ext and File.executable?(file << ext)
+ if exts
+ exts.each {|ext| File.executable?(ext = file + ext) and return ext}
+ end
end
nil
end
@@ -1259,7 +1298,7 @@ end
#
def create_header(header = "extconf.h")
message "creating %s\n", header
- sym = header.tr("a-z./\055", "A-Z___")
+ sym = header.tr_cpp
hdr = ["#ifndef #{sym}\n#define #{sym}\n"]
for line in $defs
case line
@@ -1465,8 +1504,8 @@ CPPFLAGS = #{extconf_h}#{$CPPFLAGS}
CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']}
ldflags = #{$LDFLAGS}
dldflags = #{$DLDFLAGS}
-archflag = #{$ARCH_FLAG}
-DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
+ARCH_FLAG = #{$ARCH_FLAG}
+DLDFLAGS = $(ldflags) $(dldflags)
LDSHARED = #{CONFIG['LDSHARED']}
LDSHAREDXX = #{config_string('LDSHAREDXX') || '$(LDSHARED)'}
AR = #{CONFIG['AR']}
@@ -1645,8 +1684,8 @@ def create_makefile(target, srcprefix = nil)
target_prefix = ""
end
- srcprefix ||= '$(srcdir)'
- RbConfig::expand(srcdir = srcprefix.dup)
+ srcprefix = "$(srcdir)/#{srcprefix}".chomp('/')
+ RbConfig.expand(srcdir = srcprefix.dup)
ext = ".#{$OBJEXT}"
if not $objs
@@ -1698,7 +1737,9 @@ def create_makefile(target, srcprefix = nil)
dllib = target ? "$(TARGET).#{CONFIG['DLEXT']}" : ""
staticlib = target ? "$(TARGET).#$LIBEXT" : ""
mfile = open("Makefile", "wb")
- mfile.print(*configuration(srcprefix))
+ conf = configuration(srcprefix)
+ conf = yield(conf) if block_given?
+ mfile.puts(conf)
mfile.print "
libpath = #{($DEFLIBPATH|$LIBPATH).join(" ")}
LIBPATH = #{libpath}
diff --git a/lib/monitor.rb b/lib/monitor.rb
index b9bf28ded0..d4bfb670b2 100644
--- a/lib/monitor.rb
+++ b/lib/monitor.rb
@@ -87,46 +87,57 @@ module MonitorMixin
class ConditionVariable
class Timeout < Exception; end
+ #
+ # Releases the lock held in the associated monitor 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.
+ #
def wait(timeout = nil)
- if timeout
- raise NotImplementedError, "timeout is not implemented yet"
- end
@monitor.__send__(:mon_check_owner)
count = @monitor.__send__(:mon_exit_for_cond)
begin
- @cond.wait(@monitor.instance_variable_get("@mon_mutex"))
+ @cond.wait(@monitor.instance_variable_get("@mon_mutex"), timeout)
return true
ensure
@monitor.__send__(:mon_enter_for_cond, count)
end
end
+ #
+ # Calls wait repeatedly while the given block yields a truthy value.
+ #
def wait_while
while yield
wait
end
end
+ #
+ # Calls wait repeatedly until the given block yields a truthy value.
+ #
def wait_until
until yield
wait
end
end
+ #
+ # Wakes up the first thread in line waiting for this lock.
+ #
def signal
@monitor.__send__(:mon_check_owner)
@cond.signal
end
+ #
+ # Wakes up all threads waiting for this lock.
+ #
def broadcast
@monitor.__send__(:mon_check_owner)
@cond.broadcast
end
- def count_waiters
- raise NotImplementedError
- end
-
private
def initialize(monitor)
@@ -195,7 +206,8 @@ module MonitorMixin
alias synchronize mon_synchronize
#
- # FIXME: This isn't documented in Nutshell.
+ # Creates a new MonitorMixin::ConditionVariable associated with the
+ # receiver.
#
def new_cond
return ConditionVariable.new(self)
diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb
index c35ee368af..f393a15bff 100644
--- a/lib/net/ftp.rb
+++ b/lib/net/ftp.rb
@@ -25,6 +25,7 @@ module Net
class FTPTempError < FTPError; end
class FTPPermError < FTPError; end
class FTPProtoError < FTPError; end
+ class FTPConnectionError < FTPError; end
# :startdoc:
#
@@ -132,7 +133,7 @@ module Net
@passive = false
@debug_mode = false
@resume = false
- @sock = nil
+ @sock = NullSocket.new
@logged_in = false
if host
connect(host)
@@ -461,7 +462,7 @@ module Net
end
synchronize do
with_binary(true) do
- conn = transfercmd(cmd, rest_offset)
+ conn = transfercmd(cmd)
loop do
buf = file.read(blocksize)
break if buf == nil
@@ -605,7 +606,11 @@ module Net
f = open(localfile)
begin
f.binmode
- storbinary("STOR " + remotefile, f, blocksize, rest_offset, &block)
+ if rest_offset
+ storbinary("APPE " + remotefile, f, blocksize, rest_offset, &block)
+ else
+ storbinary("STOR " + remotefile, f, blocksize, rest_offset, &block)
+ end
ensure
f.close
end
@@ -962,8 +967,15 @@ module Net
return dirname
end
private :parse257
- end
+ # :stopdoc:
+ class NullSocket
+ def method_missing(mid, *args)
+ raise FTPConnectionError, "not connected"
+ end
+ end
+ # :startdoc:
+ end
end
diff --git a/lib/net/http.rb b/lib/net/http.rb
index fb8a3cc08b..ebe51496f6 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -26,6 +26,7 @@
#++
require 'net/protocol'
+autoload :OpenSSL, 'openssl'
require 'uri'
module Net #:nodoc:
@@ -442,15 +443,51 @@ module Net #:nodoc:
BufferedIO
end
+ # call-seq:
+ # HTTP.start(address, port, p_addr, p_port, p_user, p_pass, &block)
+ # HTTP.start(address, port=nil, p_addr=nil, p_port=nil, p_user=nil, p_pass=nil, opt, &block)
+ #
# creates a new Net::HTTP object and opens its TCP connection and
- # HTTP session. If the optional block is given, the newly
+ # HTTP session.
+ #
+ # Argments are following:
+ # _address_ :: hostname or IP address of the server
+ # _port_ :: port of the server
+ # _p_addr_ :: address of proxy
+ # _p_port_ :: port of proxy
+ # _p_user_ :: user of proxy
+ # _p_pass_ :: pass of proxy
+ # _opt_ :: optional hash
+ #
+ # _opt_ sets following values by its accessor.
+ # The keys are ca_file, ca_path, cert, cert_store, ciphers,
+ # close_on_empty_response, key, open_timeout, read_timeout, ssl_timeout,
+ # ssl_version, use_ssl, verify_callback, verify_depth and verify_mode.
+ # If you set :use_ssl as true, you can use https and default value of
+ # verify_mode is set as OpenSSL::SSL::VERIFY_PEER.
+ #
+ # If the optional block is given, the newly
# created Net::HTTP object is passed to it and closed when the
# block finishes. In this case, the return value of this method
# is the return value of the block. If no block is given, the
# return value of this method is the newly created Net::HTTP object
# itself, and the caller is responsible for closing it upon completion.
- def HTTP.start(address, port = nil, p_addr = nil, p_port = nil, p_user = nil, p_pass = nil, &block) # :yield: +http+
- new(address, port, p_addr, p_port, p_user, p_pass).start(&block)
+ def HTTP.start(address, *arg, &block) # :yield: +http+
+ arg.pop if opt = Hash.try_convert(arg[-1])
+ port, p_addr, p_port, p_user, p_pass = *arg
+ port = https_default_port if !port && opt && opt[:use_ssl]
+ http = new(address, port, p_addr, p_port, p_user, p_pass)
+
+ if opt
+ opt = {verify_mode: OpenSSL::SSL::VERIFY_PEER}.update(opt) if opt[:use_ssl]
+ http.methods.grep(/\A(\w+)=\z/) do |meth|
+ key = $1.to_sym
+ opt.key?(key) or next
+ http.__send__(meth, opt[key])
+ end
+ end
+
+ http.start(&block)
end
class << HTTP
@@ -544,7 +581,33 @@ module Net #:nodoc:
# returns true if use SSL/TLS with HTTP.
def use_ssl?
- false # redefined in net/https
+ @use_ssl
+ end
+
+ # Turn on/off SSL.
+ # This flag must be set before starting session.
+ # If you change use_ssl value after session started,
+ # a Net::HTTP object raises IOError.
+ def use_ssl=(flag)
+ flag = (flag ? true : false)
+ if started? and @use_ssl != flag
+ raise IOError, "use_ssl value changed, but session already started"
+ end
+ @use_ssl = flag
+ end
+
+ SSL_ATTRIBUTES = %w(
+ ssl_version key cert ca_file ca_path cert_store ciphers
+ verify_mode verify_callback verify_depth ssl_timeout
+ )
+ attr_accessor(*SSL_ATTRIBUTES)
+
+ # return the X.509 certificates the server presented.
+ def peer_cert
+ if not use_ssl? or not @socket
+ return nil
+ end
+ @socket.io.peer_cert
end
# Opens TCP connection and HTTP session.
@@ -1457,13 +1520,13 @@ module Net #:nodoc:
return nil unless @header['content-range']
m = %r<bytes\s+(\d+)-(\d+)/(\d+|\*)>i.match(self['Content-Range']) or
raise HTTPHeaderSyntaxError, 'wrong Content-Range format'
- m[1].to_i .. m[2].to_i + 1
+ m[1].to_i .. m[2].to_i
end
# The length of the range represented in Content-Range: header.
def range_length
r = content_range() or return nil
- r.end - r.begin
+ r.end - r.begin + 1
end
# Returns a content type string such as "text/html".
diff --git a/lib/net/https.rb b/lib/net/https.rb
index 636ae1be4d..9839504870 100644
--- a/lib/net/https.rb
+++ b/lib/net/https.rb
@@ -1,6 +1,6 @@
=begin
-= $RCSfile$ -- SSL/TLS enhancement for Net::HTTP.
+= net/https -- SSL/TLS enhancement for Net::HTTP.
== Info
'OpenSSL for Ruby 2' project
@@ -11,16 +11,6 @@
This program is licenced under the same licence as Ruby.
(See the file 'LICENCE'.)
-== Requirements
- This program requires Net 1.2.0 or higher version.
- You can get it from RAA or Ruby's CVS repository.
-
-== Version
- $Id$
-
- 2001-11-06: Contiributed to Ruby/OpenSSL project.
- 2004-03-06: Some code is merged in to net/http.
-
== Example
Here is a simple HTTP client:
@@ -100,37 +90,3 @@ It can be replaced by the following code:
require 'net/http'
require 'openssl'
-
-module Net
- class HTTP
- remove_method :use_ssl?
- def use_ssl?
- @use_ssl
- end
-
- # Turn on/off SSL.
- # This flag must be set before starting session.
- # If you change use_ssl value after session started,
- # a Net::HTTP object raises IOError.
- def use_ssl=(flag)
- flag = (flag ? true : false)
- if started? and @use_ssl != flag
- raise IOError, "use_ssl value changed, but session already started"
- end
- @use_ssl = flag
- end
-
- SSL_ATTRIBUTES = %w(
- ssl_version key cert ca_file ca_path cert_store ciphers
- verify_mode verify_callback verify_depth ssl_timeout
- )
- attr_accessor(*SSL_ATTRIBUTES)
-
- def peer_cert
- if not use_ssl? or not @socket
- return nil
- end
- @socket.io.peer_cert
- end
- end
-end
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 8b7529d79d..980fed61ca 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -270,6 +270,16 @@ module Net
return @@debug = val
end
+ # Returns the max number of flags interned to symbols.
+ def self.max_flag_count
+ return @@max_flag_count
+ end
+
+ # Sets the max number of flags interned to symbols.
+ def self.max_flag_count=(count)
+ @@max_flag_count = count
+ end
+
# Adds an authenticator for Net::IMAP#authenticate. +auth_type+
# is the type of authentication this authenticator supports
# (for instance, "LOGIN"). The +authenticator+ is an object
@@ -929,6 +939,7 @@ module Net
@@debug = false
@@authenticators = {}
+ @@max_flag_count = 10000
# call-seq:
# Net::IMAP.new(host, options = {})
@@ -1006,7 +1017,8 @@ module Net
end
def receive_responses
- while true
+ connection_closed = false
+ until connection_closed
synchronize do
@exception = nil
end
@@ -1043,7 +1055,7 @@ module Net
if resp.name == "BYE" && @logout_command_tag.nil?
@sock.close
@exception = ByeResponseError.new(resp)
- break
+ connection_closed = true
end
when ContinuationRequest
@continuation_request_arrival.signal
@@ -1929,6 +1941,14 @@ module Net
end
class ResponseParser # :nodoc:
+ def initialize
+ @str = nil
+ @pos = nil
+ @lex_state = nil
+ @token = nil
+ @flag_symbols = {}
+ end
+
def parse(str)
@str = str
@pos = 0
@@ -2939,7 +2959,16 @@ module Net
if @str.index(/\(([^)]*)\)/ni, @pos)
@pos = $~.end(0)
return $1.scan(FLAG_REGEXP).collect { |flag, atom|
- atom || flag.capitalize.intern
+ if atom
+ atom
+ else
+ symbol = flag.capitalize.untaint.intern
+ @flag_symbols[symbol] = true
+ if @flag_symbols.length > IMAP.max_flag_count
+ raise FlagCountError, "number of flag symbols exceeded"
+ end
+ symbol
+ end
}
else
parse_error("invalid flag list")
@@ -3410,6 +3439,10 @@ module Net
# out due to inactivity.
class ByeResponseError < ResponseError
end
+
+ # Error raised when too many flags are interned to symbols.
+ class FlagCountError < Error
+ end
end
end
diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb
index 17eec1f5e2..f233827a59 100644
--- a/lib/net/telnet.rb
+++ b/lib/net/telnet.rb
@@ -10,7 +10,6 @@
#
require "socket"
-require "delegate"
require "timeout"
require "English"
@@ -93,7 +92,7 @@ module Net
# of relevant RFCs, see
# http://www.omnifarious.org/~hopper/technical/telnet-rfc.html
#
- class Telnet < SimpleDelegator
+ class Telnet
# :stopdoc:
IAC = 255.chr # "\377" # "\xff" # interpret as command
@@ -368,7 +367,6 @@ module Net
@dumplog.log_dump('#', message) if @options.has_key?("Dump_log")
end
- super(@sock)
end # initialize
# The socket the Telnet object is using. Note that this object becomes
diff --git a/lib/pathname.rb b/lib/pathname.rb
index 226b0da229..bfd3771c28 100644
--- a/lib/pathname.rb
+++ b/lib/pathname.rb
@@ -435,61 +435,6 @@ class Pathname
end
private :cleanpath_conservative
- def realpath_rec(prefix, unresolved, h, strict, last = true)
- resolved = []
- until unresolved.empty?
- n = unresolved.shift
- if n == '.'
- next
- elsif n == '..'
- resolved.pop
- else
- path = prepend_prefix(prefix, File.join(*(resolved + [n])))
- if h.include? path
- if h[path] == :resolving
- raise Errno::ELOOP.new(path)
- else
- prefix, *resolved = h[path]
- end
- else
- begin
- s = File.lstat(path)
- rescue Errno::ENOENT => e
- raise e if strict || !last || !unresolved.empty?
- resolved << n
- break
- end
- if s.symlink?
- h[path] = :resolving
- link_prefix, link_names = split_names(File.readlink(path))
- if link_prefix == ''
- prefix, *resolved = h[path] = realpath_rec(prefix, resolved + link_names, h, strict, unresolved.empty?)
- else
- prefix, *resolved = h[path] = realpath_rec(link_prefix, link_names, h, strict, unresolved.empty?)
- end
- else
- resolved << n
- h[path] = [prefix, *resolved]
- end
- end
- end
- end
- return prefix, *resolved
- end
- private :realpath_rec
-
- def real_path_internal(strict = false)
- path = @path
- prefix, names = split_names(path)
- if prefix == ''
- prefix, names2 = split_names(Dir.pwd)
- names = names2 + names
- end
- prefix, *names = realpath_rec(prefix, names, {}, strict)
- self.class.new(prepend_prefix(prefix, File.join(*names)))
- end
- private :real_path_internal
-
#
# Returns the real (absolute) pathname of +self+ in the actual
# filesystem not containing symlinks or useless dots.
@@ -498,7 +443,7 @@ class Pathname
# called.
#
def realpath
- real_path_internal(true)
+ self.class.new(File.realpath(@path))
end
#
@@ -508,7 +453,7 @@ class Pathname
# The last component of the real pathname can be nonexistent.
#
def realdirpath
- real_path_internal(false)
+ self.class.new(File.realdirpath(@path))
end
# #parent returns the parent directory.
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 0d635c4ac2..65cce7b238 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -131,6 +131,7 @@ class PStore
@filename = file
@abort = false
@ultra_safe = false
+ @thread_safe = thread_safe
if @thread_safe
@lock = Mutex.new
else
diff --git a/lib/rake.rb b/lib/rake.rb
index f14b9b519f..b46b196878 100644
--- a/lib/rake.rb
+++ b/lib/rake.rb
@@ -1237,7 +1237,7 @@ 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[to_a inspect]
diff --git a/lib/rdoc/generator/html.rb b/lib/rdoc/generator/html.rb
index 60e0c175fe..3bce7b21aa 100644
--- a/lib/rdoc/generator/html.rb
+++ b/lib/rdoc/generator/html.rb
@@ -231,6 +231,10 @@ class RDoc::Generator::HTML
open op_file, 'w' do |io|
item.write_on io, file_list, class_list, method_list
end
+
+ file_list.clear
+ class_list.clear
+ method_list.clear
end
end
diff --git a/lib/rdoc/markup/to_html_crossref.rb b/lib/rdoc/markup/to_html_crossref.rb
index e73fbf5c8f..930218bb7e 100644
--- a/lib/rdoc/markup/to_html_crossref.rb
+++ b/lib/rdoc/markup/to_html_crossref.rb
@@ -65,7 +65,7 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
# The key thing is that there must be at least
# one special character (period, slash, or
# underscore).
- | [\/\w]+[_\/\.][\w\/\.]+
+ | (?:\.\.\/)*[-\/\w]+[_\/\.][-\w\/\.]+
# Things that have markup suppressed
| \\[^\s]
diff --git a/lib/rdoc/parser/ruby.rb b/lib/rdoc/parser/ruby.rb
index fde3964a60..1697ab85aa 100644
--- a/lib/rdoc/parser/ruby.rb
+++ b/lib/rdoc/parser/ruby.rb
@@ -2046,7 +2046,7 @@ class RDoc::Parser::Ruby < RDoc::Parser
when TkSTRING then
name = name_t.text[1..-2]
else
- warn "#{container.top_level.file_relative_name}:#{name_t.line_no} unknown name token #{name_t.inspect} for meta-method"
+ warn "#{container.toplevel.file_relative_name}:#{name_t.line_no} unknown name token #{name_t.inspect} for meta-method"
name = 'unknown'
end
end
diff --git a/lib/resolv.rb b/lib/resolv.rb
index 9a65746959..ffced98052 100644
--- a/lib/resolv.rb
+++ b/lib/resolv.rb
@@ -9,10 +9,10 @@ rescue LoadError
end
# Resolv is a thread-aware DNS resolver library written in Ruby. Resolv can
-# handle multiple DNS requests concurrently without blocking. The ruby
+# handle multiple DNS requests concurrently without blocking the entire ruby
# interpreter.
#
-# See also resolv-replace.rb to replace the libc resolver with # Resolv.
+# See also resolv-replace.rb to replace the libc resolver with Resolv.
#
# Resolv can look up various DNS resources using the DNS module directly.
#
@@ -313,6 +313,16 @@ class Resolv
# nil:: Uses /etc/resolv.conf.
# String:: Path to a file using /etc/resolv.conf's format.
# Hash:: Must contain :nameserver, :search and :ndots keys.
+ # :nameserver_port can be used to specify port number of nameserver address.
+ #
+ # The value of :nameserver should be an address string or
+ # an array of address strings.
+ # - :nameserver => '8.8.8.8'
+ # - :nameserver => ['8.8.8.8', '8.8.4.4']
+ #
+ # The value of :nameserver_port should be an array of
+ # pair of nameserver address and port number.
+ # - :nameserver_port => [['8.8.8.8', 53], ['8.8.4.4', 53]]
#
# Example:
#
@@ -485,13 +495,13 @@ class Resolv
requester = make_requester
senders = {}
begin
- @config.resolv(name) {|candidate, tout, nameserver|
+ @config.resolv(name) {|candidate, tout, nameserver, port|
msg = Message.new
msg.rd = 1
msg.add_question(candidate, typeclass)
- unless sender = senders[[candidate, nameserver]]
- sender = senders[[candidate, nameserver]] =
- requester.sender(msg, candidate, nameserver)
+ unless sender = senders[[candidate, nameserver, port]]
+ sender = senders[[candidate, nameserver, port]] =
+ requester.sender(msg, candidate, nameserver, port)
end
reply, reply_name = requester.request(sender, tout)
case reply.rcode
@@ -510,10 +520,11 @@ class Resolv
end
def make_requester # :nodoc:
- if nameserver = @config.single?
- Requester::ConnectedUDP.new(nameserver)
+ nameserver_port = @config.nameserver_port
+ if nameserver_port.length == 1
+ Requester::ConnectedUDP.new(*nameserver_port[0])
else
- Requester::UnconnectedUDP.new
+ Requester::UnconnectedUDP.new(*nameserver_port)
end
end
@@ -599,10 +610,10 @@ class Resolv
}
end
- def self.bind_random_port(udpsock, is_ipv6=false) # :nodoc:
+ def self.bind_random_port(udpsock, bind_host="0.0.0.0") # :nodoc:
begin
port = rangerand(1024..65535)
- udpsock.bind(is_ipv6 ? "::" : "", port)
+ udpsock.bind(bind_host, port)
rescue Errno::EADDRINUSE
retry
end
@@ -611,7 +622,7 @@ class Resolv
class Requester # :nodoc:
def initialize
@senders = {}
- @sock = nil
+ @socks = nil
end
def request(sender, tout)
@@ -619,10 +630,11 @@ class Resolv
sender.send
while (now = Time.now) < timelimit
timeout = timelimit - now
- if !IO.select([@sock], nil, nil, timeout)
+ select_result = IO.select(@socks, nil, nil, timeout)
+ if !select_result
raise ResolvTimeout
end
- reply, from = recv_reply
+ reply, from = recv_reply(select_result[0])
begin
msg = Message.decode(reply)
rescue DecodeError
@@ -638,9 +650,11 @@ class Resolv
end
def close
- sock = @sock
- @sock = nil
- sock.close if sock
+ socks = @socks
+ @socks = nil
+ if socks
+ socks.each {|sock| sock.close }
+ end
end
class Sender # :nodoc:
@@ -652,16 +666,31 @@ class Resolv
end
class UnconnectedUDP < Requester # :nodoc:
- def initialize
+ def initialize(*nameserver_port)
super()
- @sock = UDPSocket.new
- @sock.do_not_reverse_lookup = true
- @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
- DNS.bind_random_port(@sock)
+ @nameserver_port = nameserver_port
+ @socks_hash = {}
+ @socks = []
+ nameserver_port.each {|host, port|
+ if host.index(':')
+ bind_host = "::"
+ af = Socket::AF_INET6
+ else
+ bind_host = "0.0.0.0"
+ af = Socket::AF_INET
+ end
+ next if @socks_hash[bind_host]
+ sock = UDPSocket.new(af)
+ sock.do_not_reverse_lookup = true
+ sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
+ DNS.bind_random_port(sock, bind_host)
+ @socks << sock
+ @socks_hash[bind_host] = sock
+ }
end
- def recv_reply
- reply, from = @sock.recvfrom(UDPSize)
+ def recv_reply(readable_socks)
+ reply, from = readable_socks[0].recvfrom(UDPSize)
return reply, [from[3],from[1]]
end
@@ -670,8 +699,9 @@ class Resolv
id = DNS.allocate_request_id(host, port)
request = msg.encode
request[0,2] = [id].pack('n')
+ sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
return @senders[[service, id]] =
- Sender.new(request, data, @sock, host, port)
+ Sender.new(request, data, sock, host, port)
end
def close
@@ -701,15 +731,16 @@ class Resolv
@host = host
@port = port
is_ipv6 = host.index(':')
- @sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET)
- @sock.do_not_reverse_lookup = true
- @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
- DNS.bind_random_port(@sock, is_ipv6)
- @sock.connect(host, port)
+ sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET)
+ @socks = [sock]
+ sock.do_not_reverse_lookup = true
+ sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
+ DNS.bind_random_port(sock, is_ipv6 ? "::" : "0.0.0.0")
+ sock.connect(host, port)
end
- def recv_reply
- reply = @sock.recv(UDPSize)
+ def recv_reply(readable_socks)
+ reply = readable_socks[0].recv(UDPSize)
return reply, nil
end
@@ -720,7 +751,7 @@ class Resolv
id = DNS.allocate_request_id(@host, @port)
request = msg.encode
request[0,2] = [id].pack('n')
- return @senders[[nil,id]] = Sender.new(request, data, @sock)
+ return @senders[[nil,id]] = Sender.new(request, data, @socks[0])
end
def close
@@ -743,14 +774,15 @@ class Resolv
super()
@host = host
@port = port
- @sock = TCPSocket.new(@host, @port)
- @sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
+ sock = TCPSocket.new(@host, @port)
+ @socks = [sock]
+ sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
@senders = {}
end
- def recv_reply
- len = @sock.read(2).unpack('n')[0]
- reply = @sock.read(len)
+ def recv_reply(readable_socks)
+ len = readable_socks[0].read(2).unpack('n')[0]
+ reply = @socks[0].read(len)
return reply, nil
end
@@ -761,7 +793,7 @@ class Resolv
id = DNS.allocate_request_id(@host, @port)
request = msg.encode
request[0,2] = [request.length, id].pack('nn')
- return @senders[[nil,id]] = Sender.new(request, data, @sock)
+ return @senders[[nil,id]] = Sender.new(request, data, @socks[0])
end
class Sender < Requester::Sender # :nodoc:
@@ -840,13 +872,13 @@ class Resolv
config_hash[:search] = [search].flatten if search
end
end
- config_hash
+ config_hash || {}
end
def lazy_initialize
@mutex.synchronize {
unless @initialized
- @nameserver = []
+ @nameserver_port = []
@search = nil
@ndots = 1
case @config_info
@@ -865,11 +897,18 @@ class Resolv
else
raise ArgumentError.new("invalid resolv configuration: #{@config_info.inspect}")
end
- @nameserver = config_hash[:nameserver] if config_hash.include? :nameserver
+ if config_hash.include? :nameserver
+ @nameserver_port = config_hash[:nameserver].map {|ns| [ns, Port] }
+ end
+ if config_hash.include? :nameserver_port
+ @nameserver_port = config_hash[:nameserver_port].map {|ns, port| [ns, (port || Port)] }
+ end
@search = config_hash[:search] if config_hash.include? :search
@ndots = config_hash[:ndots] if config_hash.include? :ndots
- @nameserver = ['0.0.0.0'] if @nameserver.empty?
+ if @nameserver_port.empty?
+ @nameserver_port << ['0.0.0.0', Port]
+ end
if @search
@search = @search.map {|arg| Label.split(arg) }
else
@@ -881,9 +920,14 @@ class Resolv
end
end
- if !@nameserver.kind_of?(Array) ||
- !@nameserver.all? {|ns| String === ns }
- raise ArgumentError.new("invalid nameserver config: #{@nameserver.inspect}")
+ if !@nameserver_port.kind_of?(Array) ||
+ @nameserver_port.any? {|ns_port|
+ !(Array === ns_port) ||
+ ns_port.length != 2
+ !(String === ns_port[0]) ||
+ !(Integer === ns_port[1])
+ }
+ raise ArgumentError.new("invalid nameserver config: #{@nameserver_port.inspect}")
end
if !@search.kind_of?(Array) ||
@@ -903,13 +947,17 @@ class Resolv
def single?
lazy_initialize
- if @nameserver.length == 1
- return @nameserver[0]
+ if @nameserver_port.length == 1
+ return @nameserver_port[0]
else
return nil
end
end
+ def nameserver_port
+ @nameserver_port
+ end
+
def generate_candidates(name)
candidates = nil
name = Name.create(name)
@@ -930,7 +978,7 @@ class Resolv
def generate_timeouts
ts = [InitialTimeout]
- ts << ts[-1] * 2 / @nameserver.length
+ ts << ts[-1] * 2 / @nameserver_port.length
ts << ts[-1] * 2
ts << ts[-1] * 2
return ts
@@ -943,9 +991,9 @@ class Resolv
candidates.each {|candidate|
begin
timeouts.each {|tout|
- @nameserver.each {|nameserver|
+ @nameserver_port.each {|nameserver, port|
begin
- yield candidate, tout, nameserver
+ yield candidate, tout, nameserver, port
rescue ResolvTimeout
end
}
@@ -1363,6 +1411,10 @@ class Resolv
yield self
end
+ def inspect
+ "\#<#{self.class}: #{@data[0, @index].inspect} #{@data[@index..-1].inspect}>"
+ end
+
def get_length16
len, = self.get_unpack('n')
save_limit = @limit
@@ -2075,8 +2127,11 @@ class Resolv
end
def initialize(address) # :nodoc:
- unless address.kind_of?(String) && address.length == 4
- raise ArgumentError.new('IPv4 address must be 4 bytes')
+ unless address.kind_of?(String)
+ raise ArgumentError, 'IPv4 address must be a string'
+ end
+ unless address.length == 4
+ raise ArgumentError, "IPv4 address expects 4 bytes but #{address.length} bytes"
end
@address = address
end
diff --git a/lib/rexml/document.rb b/lib/rexml/document.rb
index 0fde6df1a1..0337553a2e 100644
--- a/lib/rexml/document.rb
+++ b/lib/rexml/document.rb
@@ -66,25 +66,27 @@ module REXML
# of the document
def add( child )
if child.kind_of? XMLDecl
- @children.unshift child
+ if @children[0].kind_of? XMLDecl
+ @children[0] = child
+ else
+ @children.unshift child
+ end
child.parent = self
elsif child.kind_of? DocType
# Find first Element or DocType node and insert the decl right
# before it. If there is no such node, just insert the child at the
# end. If there is a child and it is an DocType, then replace it.
- insert_before_index = 0
- @children.find { |x|
- insert_before_index += 1
+ insert_before_index = @children.find_index { |x|
x.kind_of?(Element) || x.kind_of?(DocType)
}
- if @children[ insert_before_index ] # Not null = not end of list
- if @children[ insert_before_index ].kind_of DocType
+ if insert_before_index # Not null = not end of list
+ if @children[ insert_before_index ].kind_of? DocType
@children[ insert_before_index ] = child
else
- @children[ index_before_index-1, 0 ] = child
+ @children[ insert_before_index-1, 0 ] = child
end
else # Insert at end of list
- @children[insert_before_index] = child
+ @children << child
end
child.parent = self
else
diff --git a/lib/rexml/formatters/default.rb b/lib/rexml/formatters/default.rb
index 56a1d93783..db44453e1e 100644
--- a/lib/rexml/formatters/default.rb
+++ b/lib/rexml/formatters/default.rb
@@ -63,7 +63,9 @@ module REXML
def write_element( node, output )
output << "<#{node.expanded_name}"
- node.attributes.to_a.sort_by {|attr| attr.name}.each do |attr|
+ node.attributes.to_a.map { |a|
+ Hash === a ? a.values : a
+ }.flatten.sort_by {|attr| attr.name}.each do |attr|
output << " "
attr.write( output )
end unless node.attributes.empty?
diff --git a/lib/rexml/parent.rb b/lib/rexml/parent.rb
index 7ed1761654..0a9f805109 100644
--- a/lib/rexml/parent.rb
+++ b/lib/rexml/parent.rb
@@ -34,6 +34,7 @@ module REXML
found = false
@children.delete_if {|c| c.equal?(object) and found = true }
object.parent = nil if found
+ found ? object : nil
end
def each(&block)
diff --git a/lib/rexml/parsers/baseparser.rb b/lib/rexml/parsers/baseparser.rb
index 2f758265bb..3c80231c35 100644
--- a/lib/rexml/parsers/baseparser.rb
+++ b/lib/rexml/parsers/baseparser.rb
@@ -66,7 +66,7 @@ module REXML
VERSION = /\bversion\s*=\s*["'](.*?)['"]/um
ENCODING = /\bencoding\s*=\s*["'](.*?)['"]/um
- STANDALONE = /\bstandalone\s*=\s["'](.*?)['"]/um
+ STANDALONE = /\bstandalone\s*=\s*["'](.*?)['"]/um
ENTITY_START = /^\s*<!ENTITY/
IDENTITY = /^([!\*\w\-]+)(\s+#{NCNAME_STR})?(\s+["'](.*?)['"])?(\s+['"](.*?)["'])?/u
diff --git a/lib/rexml/rexml.rb b/lib/rexml/rexml.rb
index ab2f44561b..f89951171a 100644
--- a/lib/rexml/rexml.rb
+++ b/lib/rexml/rexml.rb
@@ -24,7 +24,7 @@ module REXML
COPYRIGHT = "Copyright © 2001-2008 Sean Russell <ser@germane-software.com>"
DATE = "2008/019"
VERSION = "3.1.7.3"
- REVISION = "$Revision$".gsub(/\$Revision:|\$/,'').strip
+ REVISION = %w$Revision$[1] || ''
Copyright = COPYRIGHT
Version = VERSION
diff --git a/lib/rexml/text.rb b/lib/rexml/text.rb
index d09dc3ac54..0f15f00c31 100644
--- a/lib/rexml/text.rb
+++ b/lib/rexml/text.rb
@@ -88,7 +88,7 @@ module REXML
# Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell"
# In the last example, the +entity_filter+ argument is ignored.
#
- # +pattern+ INTERNAL USE ONLY
+ # +illegal+ INTERNAL USE ONLY
def initialize(arg, respect_whitespace=false, parent=nil, raw=nil,
entity_filter=nil, illegal=NEEDS_A_SECOND_CHECK )
@@ -117,7 +117,7 @@ module REXML
@string.gsub!( /\r\n?/, "\n" )
- Text.check(@string, NEEDS_A_SECOND_CHECK, doctype) if @raw and @parent
+ Text.check(@string, illegal, doctype) if @raw
end
def parent= parent
@@ -160,7 +160,7 @@ module REXML
else
raise "Illegal character '#{$1}' in raw string \"#{string}\""
end
- elsif $3 and !SUBSTITUTES.include?($1)
+ elsif @parent and $3 and !SUBSTITUTES.include?($1)
if !doctype or !doctype.entities.has_key?($3)
raise "Undeclared entity '#{$1}' in raw string \"#{string}\""
end
@@ -274,7 +274,7 @@ module REXML
def indent_text(string, level=1, style="\t", indentfirstline=true)
return string if level < 0
new_string = ''
- string.each { |line|
+ string.each_line { |line|
indent_string = style * level
new_line = (indent_string + line).sub(/[\s]+$/,'')
new_string << new_line
diff --git a/lib/rss/maker/base.rb b/lib/rss/maker/base.rb
index 5d795443a4..88ea831164 100644
--- a/lib/rss/maker/base.rb
+++ b/lib/rss/maker/base.rb
@@ -358,7 +358,7 @@ module RSS
:date => date,
:dc_dates => dc_dates.to_a.dup,
}
- _date = date
+ _date = _parse_date_if_needed(date)
if _date and !dc_dates.any? {|dc_date| dc_date.value == _date}
dc_date = self.class::DublinCoreDates::DublinCoreDate.new(self)
dc_date.value = _date.dup
@@ -370,6 +370,11 @@ module RSS
date = keep[:date]
dc_dates.replace(keep[:dc_dates])
end
+
+ def _parse_date_if_needed(date_value)
+ date_value = Time.parse(date_value) if date_value.is_a?(String)
+ date_value
+ end
end
module SetupDefaultLanguage
@@ -503,12 +508,24 @@ module RSS
end
%w(id about language
- managingEditor webMaster rating docs date
- lastBuildDate ttl).each do |element|
+ managingEditor webMaster rating docs ttl).each do |element|
attr_accessor element
add_need_initialize_variable(element)
end
+ %w(date lastBuildDate).each do |date_element|
+ attr_reader date_element
+ add_need_initialize_variable(date_element)
+ end
+
+ def date=(_date)
+ @date = _parse_date_if_needed(_date)
+ end
+
+ def lastBuildDate=(_date)
+ @lastBuildDate = _parse_date_if_needed(_date)
+ end
+
def pubDate
date
end
@@ -703,11 +720,20 @@ module RSS
def_classed_elements(name, attribute)
end
- %w(date comments id published).each do |element|
+ %w(comments id published).each do |element|
attr_accessor element
add_need_initialize_variable(element)
end
+ %w(date).each do |date_element|
+ attr_reader date_element
+ add_need_initialize_variable(date_element)
+ end
+
+ def date=(_date)
+ @date = _parse_date_if_needed(_date)
+ end
+
def pubDate
date
end
@@ -764,6 +790,8 @@ module RSS
end
class SourceBase < Base
+ include SetupDefaultDate
+
%w(authors categories contributors generator icon
logo rights subtitle title).each do |name|
def_classed_element(name)
@@ -775,7 +803,7 @@ module RSS
def_classed_elements(name, attribute)
end
- %w(id content date).each do |element|
+ %w(id content).each do |element|
attr_accessor element
add_need_initialize_variable(element)
end
@@ -783,6 +811,15 @@ module RSS
alias_method(:url, :link)
alias_method(:url=, :link=)
+ %w(date).each do |date_element|
+ attr_reader date_element
+ add_need_initialize_variable(date_element)
+ end
+
+ def date=(_date)
+ @date = _parse_date_if_needed(_date)
+ end
+
def updated
date
end
diff --git a/lib/rubygems.rb b/lib/rubygems.rb
index 5faca8695f..8ae4243e68 100644
--- a/lib/rubygems.rb
+++ b/lib/rubygems.rb
@@ -5,13 +5,14 @@
# See LICENSE.txt for permissions.
#++
-require 'rubygems/rubygems_version'
require 'rubygems/defaults'
require 'thread'
require 'etc'
module Gem
+ RubyGemsVersion = VERSION = '1.3.5'
+
##
# Raised when RubyGems is unable to load or activate a gem. Contains the
# name and version requirements of the gem that either conflicts with
@@ -34,6 +35,8 @@ module Gem
end
module Kernel
+ # defined in gem_prelude.rb
+ undef gem
##
# Use Kernel#gem to activate a specific version of +gem_name+.
@@ -381,7 +384,7 @@ module Gem
raise Gem::Exception, msg
end
- File.join(spec.full_gem_path, spec.bindir, exec_name).sub(/.*\s.*/m, '"\&"')
+ File.join(spec.full_gem_path, spec.bindir, exec_name)
end
##
@@ -533,26 +536,8 @@ module Gem
##
# Finds the user's home directory.
- #--
- # Some comments from the ruby-talk list regarding finding the home
- # directory:
- #
- # I have HOME, USERPROFILE and HOMEDRIVE + HOMEPATH. Ruby seems
- # to be depending on HOME in those code samples. I propose that
- # it should fallback to USERPROFILE and HOMEDRIVE + HOMEPATH (at
- # least on Win32).
def self.find_home
- unless RUBY_VERSION > '1.9' then
- ['HOME', 'USERPROFILE'].each do |homekey|
- return ENV[homekey] if ENV[homekey]
- end
-
- if ENV['HOMEDRIVE'] && ENV['HOMEPATH'] then
- return "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}"
- end
- end
-
File.expand_path "~"
rescue
if File::ALT_SEPARATOR then
@@ -1103,10 +1088,6 @@ end
require 'rubygems/config_file'
-if RUBY_VERSION < '1.9' then
- require 'rubygems/custom_require'
-end
-
Gem.clear_paths
plugins = Gem.find_files 'rubygems_plugin'
diff --git a/lib/rubygems/command.rb b/lib/rubygems/command.rb
index 3a1e2ac872..dab4366270 100644
--- a/lib/rubygems/command.rb
+++ b/lib/rubygems/command.rb
@@ -49,7 +49,7 @@ class Gem::Command
def self.build_args
@build_args ||= []
end
-
+
def self.build_args=(value)
@build_args = value
end
@@ -197,7 +197,7 @@ class Gem::Command
# def usage
# "#{program_name} FILE [FILE ...]"
# end
- #
+ #
# def arguments
# "FILE name of file to find"
# end
diff --git a/lib/rubygems/command_manager.rb b/lib/rubygems/command_manager.rb
index 0a190161ca..cd1fd6b568 100644
--- a/lib/rubygems/command_manager.rb
+++ b/lib/rubygems/command_manager.rb
@@ -154,11 +154,12 @@ class Gem::CommandManager
def load_and_instantiate(command_name)
command_name = command_name.to_s
+ const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase } << "Command"
+ commands = Gem::Commands
retried = false
begin
- const_name = command_name.capitalize.gsub(/_(.)/) { $1.upcase }
- Gem::Commands.const_get("#{const_name}Command").new
+ commands.const_get(const_name)
rescue NameError
if retried then
raise
@@ -167,7 +168,7 @@ class Gem::CommandManager
require "rubygems/commands/#{command_name}_command"
retry
end
- end
+ end.new
end
end
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index 3220a7497c..5bd5ebd468 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -88,6 +88,8 @@ By default, this RubyGems will install gem as:
end
def execute
+ @verbose = Gem.configuration.really_verbose
+
install_destdir = options[:destdir]
unless install_destdir.empty? then
@@ -113,21 +115,29 @@ By default, this RubyGems will install gem as:
remove_source_caches install_destdir
+ say "RubyGems #{Gem::VERSION} installed"
+
install_rdoc
say
- say "-" * 78
- say
+ if @verbose then
+ say "-" * 78
+ say
+ end
- release_notes = File.join Dir.pwd, 'doc', 'release_notes',
- "rel_#{Gem::RubyGemsVersion.gsub '.', '_'}.rdoc"
+ release_notes = File.join Dir.pwd, 'History.txt'
- if File.exist? release_notes then
- say File.read(release_notes)
- else
- say "Oh-no! Unable to find release notes!"
- say "Looked in: #{release_notes}" if Gem.configuration.really_verbose
- end
+ release_notes = if File.exist? release_notes then
+ open release_notes do |io|
+ text = io.gets '==='
+ text << io.gets('===')
+ text[0...-3]
+ end
+ else
+ "Oh-no! Unable to find release notes!"
+ end
+
+ say release_notes
say
say "-" * 78
@@ -145,7 +155,7 @@ By default, this RubyGems will install gem as:
end
def install_executables(bin_dir)
- say "Installing gem executable"
+ say "Installing gem executable" if @verbose
@bin_file_names = []
@@ -203,7 +213,7 @@ TEXT
end
def install_lib(lib_dir)
- say "Installing RubyGems"
+ say "Installing RubyGems" if @verbose
Dir.chdir 'lib' do
lib_files = Dir[File.join('**', '*rb')]
@@ -226,23 +236,23 @@ TEXT
if File.writable? gem_doc_dir and
(not File.exist? rubygems_doc_dir or
File.writable? rubygems_doc_dir) then
- say "Removing old RubyGems RDoc and ri"
+ say "Removing old RubyGems RDoc and ri" if @verbose
Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
rm_rf dir
end
if options[:ri] then
ri_dir = File.join rubygems_doc_dir, 'ri'
- say "Installing #{rubygems_name} ri into #{ri_dir}"
+ say "Installing #{rubygems_name} ri into #{ri_dir}" if @verbose
run_rdoc '--ri', '--op', ri_dir
end
if options[:rdoc] then
rdoc_dir = File.join rubygems_doc_dir, 'rdoc'
- say "Installing #{rubygems_name} rdoc into #{rdoc_dir}"
+ say "Installing #{rubygems_name} rdoc into #{rdoc_dir}" if @verbose
run_rdoc '--op', rdoc_dir
end
- else
+ elsif @verbose then
say "Skipping RDoc generation, #{gem_doc_dir} not writable"
say "Set the GEM_HOME environment variable if you want RDoc generated"
end
@@ -327,7 +337,7 @@ abort "#{deprecation_message}"
system_cache_file = File.join(install_destdir,
Gem::SourceInfoCache.system_cache_file)
- say "Removing old source_cache files"
+ say "Removing old source_cache files" if Gem.configuration.really_verbose
rm_f user_cache_file if File.writable? File.dirname(user_cache_file)
rm_f system_cache_file if File.writable? File.dirname(system_cache_file)
end
diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb
index 24314d8bf1..c9680104c7 100644
--- a/lib/rubygems/defaults.rb
+++ b/lib/rubygems/defaults.rb
@@ -20,13 +20,9 @@ module Gem
if defined? RUBY_FRAMEWORK_VERSION then
File.join File.dirname(ConfigMap[:sitedir]), 'Gems',
ConfigMap[:ruby_version]
- elsif RUBY_VERSION >= '1.9.2' then
+ elsif ConfigMap[:rubylibprefix] then
File.join(ConfigMap[:rubylibprefix], 'gems',
ConfigMap[:ruby_version])
- # only Ruby 1.9.1 has a peculiar feature
- elsif RUBY_VERSION > '1.9' and
- File.join(ConfigMap[:libdir], ConfigMap[:ruby_install_name], 'gems',
- ConfigMap[:ruby_version])
else
File.join(ConfigMap[:libdir], ruby_engine, 'gems',
ConfigMap[:ruby_version])
diff --git a/lib/rubygems/format.rb b/lib/rubygems/format.rb
index b2e7897339..80aae56215 100644
--- a/lib/rubygems/format.rb
+++ b/lib/rubygems/format.rb
@@ -29,7 +29,7 @@ class Gem::Format
end
##
- # Reads the named gem file and returns a Format object, representing
+ # Reads the named gem file and returns a Format object, representing
# the data from the gem file
#
# file_path:: [String] Path to the gem file
diff --git a/lib/rubygems/indexer.rb b/lib/rubygems/indexer.rb
index 5ebde1b31c..aff8d8de17 100644
--- a/lib/rubygems/indexer.rb
+++ b/lib/rubygems/indexer.rb
@@ -141,7 +141,7 @@ class Gem::Indexer
"Complete"
Gem.time 'Generated YAML quick index gemspecs' do
- index.each do |original_name, spec|
+ index.released_gems.each do |original_name, spec|
spec_file_name = "#{original_name}.gemspec.rz"
yaml_name = File.join @quick_dir, spec_file_name
@@ -221,7 +221,7 @@ class Gem::Indexer
files = []
Gem.time 'Generated Marshal quick index gemspecs' do
- (index.gems.merge(index.prerelease_gems)).each do |original_name, spec|
+ index.gems.each do |original_name, spec|
spec_file_name = "#{original_name}.gemspec.rz"
marshal_name = File.join @quick_marshal_dir, spec_file_name
@@ -275,7 +275,7 @@ class Gem::Indexer
# Builds indicies for RubyGems 1.2 and newer. Handles full, latest, prerelease
def build_modern_indicies(index)
- build_modern_index(index.sort, @specs_index, 'specs')
+ build_modern_index(index.released_specs.sort, @specs_index, 'specs')
build_modern_index(index.latest_specs.sort,
@latest_specs_index,
'latest specs')
@@ -534,7 +534,7 @@ class Gem::Indexer
FileUtils.rm_rf @directory
end
- ##
+ ##
# Zlib::GzipWriter wrapper that gzips +filename+ on disk.
def gzip(filename)
@@ -654,8 +654,8 @@ class Gem::Indexer
files = build_marshal_gemspecs index
Gem.time 'Updated indexes' do
- update_specs_index index, @dest_specs_index, @specs_index
- update_specs_index index, @dest_latest_specs_index, @latest_specs_index
+ update_specs_index index.released_gems, @dest_specs_index, @specs_index
+ update_specs_index index.released_gems, @dest_latest_specs_index, @latest_specs_index
update_specs_index(index.prerelease_gems, @dest_prerelease_specs_index,
@prerelease_specs_index)
end
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index e9910876f3..d6075dd0a2 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -325,7 +325,7 @@ class Gem::Installer
@spec.executables.each do |filename|
filename.untaint
- bin_path = File.expand_path File.join(@gem_dir, @spec.bindir, filename)
+ bin_path = File.expand_path("#{@spec.bindir}/#{filename}", @gem_dir)
mode = File.stat(bin_path).mode | 0111
File.chmod mode, bin_path
diff --git a/lib/rubygems/package_task.rb b/lib/rubygems/package_task.rb
index d7f83276f8..e80b1eceaf 100644
--- a/lib/rubygems/package_task.rb
+++ b/lib/rubygems/package_task.rb
@@ -41,7 +41,7 @@ require 'rake/packagetask'
#
# require 'rubygems'
# require 'rubygems/package_task'
-#
+#
# spec = Gem::Specification.new do |s|
# s.platform = Gem::Platform::RUBY
# s.summary = "Ruby based make-like utility."
@@ -56,7 +56,7 @@ require 'rake/packagetask'
# and dependencies are specified in standard Ruby syntax.
# EOF
# end
-#
+#
# Gem::PackageTask.new(spec) do |pkg|
# pkg.need_zip = true
# pkg.need_tar = true
diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb
index bfa8fca0ff..f5410cf4f7 100644
--- a/lib/rubygems/platform.rb
+++ b/lib/rubygems/platform.rb
@@ -103,7 +103,7 @@ class Gem::Platform
def to_s
to_a.compact.join '-'
end
-
+
def empty?
to_s.empty?
end
diff --git a/lib/rubygems/security.rb b/lib/rubygems/security.rb
index abf3cf4a6a..5cd3fb756f 100644
--- a/lib/rubygems/security.rb
+++ b/lib/rubygems/security.rb
@@ -218,7 +218,7 @@ require 'rubygems/gem_openssl'
#
# # signing key (still kept in an undisclosed location!)
# s.signing_key = '/mnt/floppy/alf-private_key.pem'
-#
+#
# # certificate chain (includes the issuer certificate now too)
# s.cert_chain = ['/home/alf/doc/seattlerb-public_cert.pem',
# '/home/alf/doc/alf_at_seattle-public_cert.pem']
@@ -274,7 +274,7 @@ require 'rubygems/gem_openssl'
# # convert a PEM format X509 certificate into DER format:
# # (note: Windows .cer files are X509 certificates in DER format)
# $ openssl x509 -in input.pem -outform der -out output.der
-#
+#
# # print out the certificate in a human-readable format:
# $ openssl x509 -in input.pem -noout -text
#
@@ -282,7 +282,7 @@ require 'rubygems/gem_openssl'
#
# # convert a PEM format RSA key into DER format:
# $ openssl rsa -in input_key.pem -outform der -out output_key.der
-#
+#
# # print out the key in a human readable format:
# $ openssl rsa -in input_key.pem -noout -text
#
diff --git a/lib/rubygems/source_index.rb b/lib/rubygems/source_index.rb
index c616aefcc0..8caf7b2e35 100644
--- a/lib/rubygems/source_index.rb
+++ b/lib/rubygems/source_index.rb
@@ -30,7 +30,7 @@ class Gem::SourceIndex
include Gem::UserInteraction
- attr_reader :gems, :prerelease_gems # :nodoc:
+ attr_reader :gems # :nodoc:
##
# Directories to use to refresh this SourceIndex when calling refresh!
@@ -85,7 +85,7 @@ class Gem::SourceIndex
def load_specification(file_name)
return nil unless file_name and File.exist? file_name
- spec_code = if RUBY_VERSION < '1.9' then
+ spec_code = if !defined?(Encoding) then
File.read file_name
else
File.read file_name, :encoding => 'UTF-8'
@@ -122,16 +122,22 @@ class Gem::SourceIndex
# #prerelease_gems
def initialize(specifications={})
- @gems, @prerelease_gems = [{}, {}]
+ @gems = {}
specifications.each{ |full_name, spec| add_spec spec }
@spec_dirs = nil
end
- ##
- # Both regular and prerelease gems
-
+ # TODO: remove method
def all_gems
- @gems.merge @prerelease_gems
+ @gems
+ end
+
+ def prerelease_gems
+ @gems.reject{ |name, gem| !gem.version.prerelease? }
+ end
+
+ def released_gems
+ @gems.reject{ |name, gem| gem.version.prerelease? }
end
##
@@ -153,8 +159,8 @@ class Gem::SourceIndex
end
##
- # Returns an Array specifications for the latest versions of each gem in
- # this index.
+ # Returns an Array specifications for the latest released versions
+ # of each gem in this index.
def latest_specs
result = Hash.new { |h,k| h[k] = [] }
@@ -165,6 +171,7 @@ class Gem::SourceIndex
curr_ver = spec.version
prev_ver = latest.key?(name) ? latest[name].version : nil
+ next if curr_ver.prerelease?
next unless prev_ver.nil? or curr_ver >= prev_ver or
latest[name].platform != Gem::Platform::RUBY
@@ -192,7 +199,14 @@ class Gem::SourceIndex
# An array including only the prerelease gemspecs
def prerelease_specs
- @prerelease_gems.values
+ prerelease_gems.values
+ end
+
+ ##
+ # An array including only the released gemspecs
+
+ def released_specs
+ released_gems.values
end
##
@@ -201,11 +215,7 @@ class Gem::SourceIndex
def add_spec(gem_spec, name = gem_spec.full_name)
# No idea why, but the Indexer wants to insert them using original_name
# instead of full_name. So we make it an optional arg.
- if gem_spec.version.prerelease?
- @prerelease_gems[name] = gem_spec
- else
- @gems[name] = gem_spec
- end
+ @gems[name] = gem_spec
end
##
@@ -221,11 +231,7 @@ class Gem::SourceIndex
# Remove a gem specification named +full_name+.
def remove_spec(full_name)
- if @gems.key? full_name then
- @gems.delete full_name
- else
- @prerelease_gems.delete full_name
- end
+ @gems.delete full_name
end
##
@@ -408,7 +414,7 @@ class Gem::SourceIndex
end
def ==(other) # :nodoc:
- self.class === other and @gems == other.gems
+ self.class === other and @gems == other.gems
end
def dump
diff --git a/lib/rubygems/source_info_cache.rb b/lib/rubygems/source_info_cache.rb
index fdb30ad8d3..4289cdb52a 100644
--- a/lib/rubygems/source_info_cache.rb
+++ b/lib/rubygems/source_info_cache.rb
@@ -286,7 +286,7 @@ class Gem::SourceInfoCache
next unless Gem.sources.include? source_uri
# TODO - Remove this gunk after 2008/11
unless pattern.kind_of?(Gem::Dependency)
- pattern = Gem::Dependency.new(pattern, Gem::Requirement.default)
+ pattern = Gem::Dependency.new(pattern, Gem::Requirement.default)
end
sic_entry.source_index.search pattern, platform_only
end.flatten.compact
@@ -306,7 +306,7 @@ class Gem::SourceInfoCache
# TODO - Remove this gunk after 2008/11
unless pattern.kind_of?(Gem::Dependency)
- pattern = Gem::Dependency.new(pattern, Gem::Requirement.default)
+ pattern = Gem::Dependency.new(pattern, Gem::Requirement.default)
end
sic_entry.source_index.search(pattern, only_platform).each do |spec|
diff --git a/lib/rubygems/spec_fetcher.rb b/lib/rubygems/spec_fetcher.rb
index f46c355413..a5f33183dd 100644
--- a/lib/rubygems/spec_fetcher.rb
+++ b/lib/rubygems/spec_fetcher.rb
@@ -22,7 +22,7 @@ class Gem::SpecFetcher
attr_reader :latest_specs # :nodoc:
##
- # Cache of all spces
+ # Cache of all released specs
attr_reader :specs # :nodoc:
@@ -61,8 +61,9 @@ class Gem::SpecFetcher
##
# Fetch specs matching +dependency+. If +all+ is true, all matching
- # versions are returned. If +matching_platform+ is false, all platforms are
- # returned. If +prerelease+ is true, prerelease versions are included.
+ # (released) versions are returned. If +matching_platform+ is
+ # false, all platforms are returned. If +prerelease+ is true,
+ # prerelease versions are included.
def fetch(dependency, all = false, matching_platform = true, prerelease = false)
specs_and_sources = find_matching dependency, all, matching_platform, prerelease
@@ -112,9 +113,9 @@ class Gem::SpecFetcher
end
##
- # Find spec names that match +dependency+. If +all+ is true, all matching
- # versions are returned. If +matching_platform+ is false, gems for all
- # platforms are returned.
+ # Find spec names that match +dependency+. If +all+ is true, all
+ # matching released versions are returned. If +matching_platform+
+ # is false, gems for all platforms are returned.
def find_matching(dependency, all = false, matching_platform = true, prerelease = false)
found = {}
@@ -161,7 +162,7 @@ class Gem::SpecFetcher
##
# Returns a list of gems available for each source in Gem::sources. If
- # +all+ is true, all versions are returned instead of only latest
+ # +all+ is true, all released versions are returned instead of only latest
# versions. If +prerelease+ is true, include prerelease versions.
def list(all = false, prerelease = false)
@@ -183,7 +184,7 @@ class Gem::SpecFetcher
cache = { :latest => @latest_specs,
:prerelease => @prerelease_specs,
:all => @specs }[type]
-
+
Gem.sources.each do |source_uri|
source_uri = URI.parse source_uri
@@ -194,6 +195,12 @@ class Gem::SpecFetcher
list[source_uri] = cache[source_uri]
end
+ if type == :all
+ list.values.map do |gems|
+ gems.reject! { |g| g[1].prerelease? }
+ end
+ end
+
list
end
diff --git a/lib/rubygems/test_utilities.rb b/lib/rubygems/test_utilities.rb
index 8b23d3236e..751c13441b 100644
--- a/lib/rubygems/test_utilities.rb
+++ b/lib/rubygems/test_utilities.rb
@@ -11,9 +11,9 @@ require 'rubygems/remote_fetcher'
# @fetcher = Gem::FakeFetcher.new
# @fetcher.data['http://gems.example.com/yaml'] = source_index.to_yaml
# Gem::RemoteFetcher.fetcher = @fetcher
-#
+#
# # invoke RubyGems code
-#
+#
# paths = @fetcher.paths
# assert_equal 'http://gems.example.com/yaml', paths.shift
# assert paths.empty?, paths.join(', ')
@@ -102,30 +102,17 @@ end
#--
# This class was added to flush out problems in Rubinius' IO implementation.
-class TempIO
-
- @@count = 0
-
+class TempIO < Tempfile
def initialize(string = '')
- @tempfile = Tempfile.new "TempIO-#{@@count += 1}"
- @tempfile.binmode
- @tempfile.write string
- @tempfile.rewind
- end
-
- def method_missing(meth, *args, &block)
- @tempfile.send(meth, *args, &block)
- end
-
- def respond_to?(meth)
- @tempfile.respond_to? meth
+ super "TempIO"
+ binmode
+ write string
+ rewind
end
def string
- @tempfile.flush
-
- Gem.read_binary @tempfile.path
+ flush
+ Gem.read_binary path
end
-
end
diff --git a/lib/rubygems/validator.rb b/lib/rubygems/validator.rb
index 9bccc605b5..c8384f1586 100644
--- a/lib/rubygems/validator.rb
+++ b/lib/rubygems/validator.rb
@@ -15,7 +15,7 @@ begin
Gem.activate('test-unit')
rescue Gem::LoadError
# Ignore - use the test-unit library that's part of the standard library
-end
+end
##
# Validator performs various gem file and gem database validation
@@ -167,6 +167,7 @@ class Gem::Validator
errors
end
+=begin
if RUBY_VERSION < '1.9' then
class TestRunner
def initialize(suite, ui)
@@ -194,6 +195,7 @@ class Gem::Validator
autoload :TestRunner, 'test/unit/ui/testrunnerutilities'
end
+=end
##
# Runs unit tests for a given gem specification
@@ -214,6 +216,7 @@ class Gem::Validator
test_files.each do |f| require f end
+=begin
if RUBY_VERSION < '1.9' then
suite = Test::Unit::TestSuite.new("#{gem_spec.name}-#{gem_spec.version}")
@@ -228,6 +231,9 @@ class Gem::Validator
result = MiniTest::Unit.new
result.run
end
+=end
+ result = MiniTest::Unit.new
+ result.run
result
ensure
diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb
index 7c49a34a73..f959429846 100644
--- a/lib/rubygems/version.rb
+++ b/lib/rubygems/version.rb
@@ -166,7 +166,7 @@ class Gem::Version
def prerelease?
parts.any? { |part| part.alpha? }
end
-
+
##
# The release for this version (e.g. 1.2.0.a -> 1.2.0)
# Non-prerelease versions return themselves
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index fe0e005554..1c88a61fd7 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -64,7 +64,6 @@ module SecureRandom
flags = File::RDONLY
flags |= File::NONBLOCK if defined? File::NONBLOCK
flags |= File::NOCTTY if defined? File::NOCTTY
- flags |= File::NOFOLLOW if defined? File::NOFOLLOW
begin
File.open("/dev/urandom", flags) {|f|
unless f.stat.chardev?
diff --git a/lib/set.rb b/lib/set.rb
index f21ff14a70..0835f8a4ca 100644
--- a/lib/set.rb
+++ b/lib/set.rb
@@ -70,12 +70,23 @@ class Set
enum.nil? and return
if block
- enum.each { |o| add(block[o]) }
+ do_with_enum(enum) { |o| add(block[o]) }
else
merge(enum)
end
end
+ def do_with_enum(enum, &block)
+ if enum.respond_to?(:each_entry)
+ enum.each_entry(&block)
+ elsif enum.respond_to?(:each)
+ enum.each(&block)
+ else
+ raise ArgumentError, "value must be enumerable"
+ end
+ end
+ private :do_with_enum
+
# Copy internal hash.
def initialize_copy(orig)
@hash = orig.instance_eval{@hash}.dup
@@ -123,7 +134,7 @@ class Set
@hash.replace(enum.instance_eval { @hash })
else
clear
- enum.each { |o| add(o) }
+ merge(enum)
end
self
@@ -279,7 +290,7 @@ class Set
if enum.instance_of?(self.class)
@hash.update(enum.instance_variable_get(:@hash))
else
- enum.each { |o| add(o) }
+ do_with_enum(enum) { |o| add(o) }
end
self
@@ -288,7 +299,7 @@ class Set
# Deletes every element that appears in the given enumerable object
# and returns self.
def subtract(enum)
- enum.each { |o| delete(o) }
+ do_with_enum(enum) { |o| delete(o) }
self
end
@@ -311,7 +322,7 @@ class Set
# given enumerable object.
def &(enum)
n = self.class.new
- enum.each { |o| n.add(o) if include?(o) }
+ do_with_enum(enum) { |o| n.add(o) if include?(o) }
n
end
alias intersection & ##
@@ -509,7 +520,7 @@ class SortedSet < Set
end
def add(o)
- o.respond_to?(:<=>) or raise ArgumentError, "value must repond to <=>"
+ o.respond_to?(:<=>) or raise ArgumentError, "value must respond to <=>"
super
end
alias << add
@@ -637,14 +648,16 @@ end
# end
#
# def replace(enum)
+# enum.respond_to?(:each) or raise ArgumentError, "value must be enumerable"
# clear
-# enum.each { |o| add(o) }
+# enum.each_entry { |o| add(o) }
#
# self
# end
#
# def merge(enum)
-# enum.each { |o| add(o) }
+# enum.respond_to?(:each) or raise ArgumentError, "value must be enumerable"
+# enum.each_entry { |o| add(o) }
#
# self
# end
@@ -711,10 +724,10 @@ class TC_Set < Test::Unit::TestCase
Set.new([1,2])
Set.new('a'..'c')
}
- assert_raises(NoMethodError) {
+ assert_raises(ArgumentError) {
Set.new(false)
}
- assert_raises(NoMethodError) {
+ assert_raises(ArgumentError) {
Set.new(1)
}
assert_raises(ArgumentError) {
diff --git a/lib/shell/command-processor.rb b/lib/shell/command-processor.rb
index e224d91368..62fb0cafe6 100644
--- a/lib/shell/command-processor.rb
+++ b/lib/shell/command-processor.rb
@@ -520,7 +520,7 @@ class Shell
id = id.intern if id.kind_of?(String)
name = id.id2name
if Shell.method_defined?(id)
- Shell.notify "warn: override definnition of Shell##{name}."
+ Shell.notify "warn: override definition of Shell##{name}."
Shell.notify "warn: alias Shell##{name} to Shell##{name}_org.\n"
Shell.module_eval "alias #{name}_org #{name}"
end
@@ -536,7 +536,7 @@ class Shell
end], __FILE__, __LINE__)
if Shell::Filter.method_defined?(id)
- Shell.notify "warn: override definnition of Shell::Filter##{name}."
+ Shell.notify "warn: override definition of Shell::Filter##{name}."
Shell.notify "warn: alias Shell##{name} to Shell::Filter##{name}_org."
Filter.module_eval "alias #{name}_org #{name}"
end
diff --git a/lib/tempfile.rb b/lib/tempfile.rb
index b327acb62b..e1bccf0a90 100755
--- a/lib/tempfile.rb
+++ b/lib/tempfile.rb
@@ -128,7 +128,7 @@ class Tempfile < DelegateClass(File)
# number of tries, then it will raise an exception.
def initialize(basename, *rest)
@data = []
- @clean_proc = self.class.callback(@data)
+ @clean_proc = Remover.new(@data)
ObjectSpace.define_finalizer(self, @clean_proc)
create(basename, *rest) do |tmpname, n, opts|
@@ -230,7 +230,7 @@ class Tempfile < DelegateClass(File)
if File.exist?(@tmpname)
File.unlink(@tmpname)
end
- # remove tmpname from callback
+ # remove tmpname from remover
@data[0] = @data[2] = nil
@data = @tmpname = nil
rescue Errno::EACCES
@@ -257,27 +257,33 @@ class Tempfile < DelegateClass(File)
end
alias length size
- class << self
- def callback(data) # :nodoc:
- pid = $$
- Proc.new {
- if pid == $$
- path, tmpfile = *data
+ # :stopdoc:
+ class Remover
+ def initialize(data)
+ @pid = $$
+ @data = data
+ end
- STDERR.print "removing ", path, "..." if $DEBUG
+ def call(*args)
+ if @pid == $$
+ path, tmpfile = *@data
- tmpfile.close if tmpfile
+ STDERR.print "removing ", path, "..." if $DEBUG
- # keep this order for thread safeness
- if path
- File.unlink(path) if File.exist?(path)
- end
+ tmpfile.close if tmpfile
- STDERR.print "done\n" if $DEBUG
- end
- }
+ # keep this order for thread safeness
+ if path
+ File.unlink(path) if File.exist?(path)
+ end
+
+ STDERR.print "done\n" if $DEBUG
+ end
end
+ end
+ # :startdoc:
+ class << self
# Creates a new Tempfile.
#
# If no block is given, this is a synonym for Tempfile.new.
diff --git a/lib/thread.rb b/lib/thread.rb
index 34c2a506d2..4f296bb8b3 100644
--- a/lib/thread.rb
+++ b/lib/thread.rb
@@ -70,6 +70,7 @@ class ConditionVariable
end
mutex.sleep timeout
end
+ self
end
#
@@ -82,6 +83,7 @@ class ConditionVariable
rescue ThreadError
retry
end
+ self
end
#
@@ -96,10 +98,11 @@ class ConditionVariable
end
for t in waiters0
begin
- t.run
+ t.run
rescue ThreadError
end
end
+ self
end
end
diff --git a/lib/time.rb b/lib/time.rb
index 2e6ed324e3..1c43371d4e 100644
--- a/lib/time.rb
+++ b/lib/time.rb
@@ -252,6 +252,10 @@ class Time
#
# A failure for Time.parse should be checked, though.
#
+ # time library should be required to use this method as follows.
+ #
+ # require 'time'
+ #
def parse(date, now=self.now)
comp = !block_given?
d = Date._parse(date, comp)
@@ -293,6 +297,10 @@ class Time
#
# See #rfc2822 for more information on this format.
#
+ # time library should be required to use this method as follows.
+ #
+ # require 'time'
+ #
def rfc2822(date)
if /\A\s*
(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*,\s*)?
@@ -342,6 +350,10 @@ class Time
#
# See #httpdate for more information on this format.
#
+ # time library should be required to use this method as follows.
+ #
+ # require 'time'
+ #
def httpdate(date)
if /\A\s*
(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\x20
@@ -389,6 +401,10 @@ class Time
#
# See #xmlschema for more information on this format.
#
+ # time library should be required to use this method as follows.
+ #
+ # require 'time'
+ #
def xmlschema(date)
if /\A\s*
(-?\d+)-(\d\d)-(\d\d)
@@ -431,10 +447,14 @@ class Time
#
# If +self+ is a UTC time, -0000 is used as zone.
#
+ # time library should be required to use this method as follows.
+ #
+ # require 'time'
+ #
def rfc2822
- sprintf('%s, %02d %s %04d %02d:%02d:%02d ',
+ sprintf('%s, %02d %s %0*d %02d:%02d:%02d ',
RFC2822_DAY_NAME[wday],
- day, RFC2822_MONTH_NAME[mon-1], year,
+ day, RFC2822_MONTH_NAME[mon-1], year < 0 ? 5 : 4, year,
hour, min, sec) +
if utc?
'-0000'
@@ -462,11 +482,15 @@ class Time
#
# Note that the result is always UTC (GMT).
#
+ # time library should be required to use this method as follows.
+ #
+ # require 'time'
+ #
def httpdate
t = dup.utc
- sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT',
+ sprintf('%s, %02d %s %0*d %02d:%02d:%02d GMT',
RFC2822_DAY_NAME[t.wday],
- t.day, RFC2822_MONTH_NAME[t.mon-1], t.year,
+ t.day, RFC2822_MONTH_NAME[t.mon-1], t.year < 0 ? 5 : 4, t.year,
t.hour, t.min, t.sec)
end
@@ -484,9 +508,13 @@ class Time
# +fractional_seconds+ specifies a number of digits of fractional seconds.
# Its default value is 0.
#
+ # time library should be required to use this method as follows.
+ #
+ # require 'time'
+ #
def xmlschema(fraction_digits=0)
- sprintf('%04d-%02d-%02dT%02d:%02d:%02d',
- year, mon, day, hour, min, sec) +
+ sprintf('%0*d-%02d-%02dT%02d:%02d:%02d',
+ year < 0 ? 5 : 4, year, mon, day, hour, min, sec) +
if fraction_digits == 0
''
else
diff --git a/lib/un.rb b/lib/un.rb
index 0ce88a5c37..24c6024c71 100644
--- a/lib/un.rb
+++ b/lib/un.rb
@@ -21,6 +21,7 @@
# ruby -run -e touch -- [OPTION] FILE
# ruby -run -e wait_writable -- [OPTION] FILE
# ruby -run -e mkmf -- [OPTION] EXTNAME [OPTION]
+# ruby -run -e httpd -- [OPTION] DocumentRoot
# ruby -run -e help [COMMAND]
require "fileutils"
@@ -43,7 +44,7 @@ def setup(options = "", *long_options)
end
long_options.each do |s|
opt_name = s[/\A(?:--)?([^\s=]+)/, 1].intern
- o.on(s.sub(/\A(?!--)/, '--')) do |val|
+ o.on(s.gsub(/([a-z])([A-Z])/){$1+"-"+$2.downcase}.sub(/\A(?!--)/, '--')) do |val|
opt_hash[opt_name] = val
end
end
@@ -283,6 +284,43 @@ def mkmf
end
##
+# Run WEBrick HTTP server.
+#
+# ruby -run -e httpd -- [OPTION] DocumentRoot
+#
+# --bind-address=ADDR address to bind
+# --port=NUM listening port number
+# --max-clients=MAX max number of simultaneous clients
+# --temp-dir=DIR temporary directory
+# --do-not-reverse-lookup disable reverse lookup
+# --request-timeout=SECOND request timeout in seconds
+# --http-version=VERSION HTTP version
+# -v verbose
+#
+
+def httpd
+ setup("", "BindAddress=ADDR", "Port=PORT", "MaxClients=NUM", "TempDir=DIR",
+ "DoNotReverseLookup", "RequestTimeout=SECOND", "HTTPVersion=VERSION") do
+ |argv, options|
+ require 'webrick'
+ opt = options[:RequestTimeout] and options[:RequestTimeout] = opt.to_i
+ opt = options[:Port] and (options[:Port] = Integer(opt)) rescue nil
+ unless argv.empty?
+ options[:DocumentRoot] = argv.shift
+ end
+ s = WEBrick::HTTPServer.new(options)
+ shut = proc {s.shutdown}
+ Signal.trap("TERM", shut)
+ Signal.trap("QUIT", shut)
+ if STDIN.tty?
+ Signal.trap("HUP", shut)
+ Signal.trap("INT", shut)
+ end
+ s.start
+ end
+end
+
+##
# Display help message.
#
# ruby -run -e help [COMMAND]
diff --git a/lib/uri/common.rb b/lib/uri/common.rb
index 9f849c03a4..8958c79047 100644
--- a/lib/uri/common.rb
+++ b/lib/uri/common.rb
@@ -397,8 +397,8 @@ module URI
ret = {}
# for URI::split
- ret[:ABS_URI] = Regexp.new('^' + pattern[:X_ABS_URI] + '$', Regexp::EXTENDED)
- ret[:REL_URI] = Regexp.new('^' + pattern[:X_REL_URI] + '$', Regexp::EXTENDED)
+ ret[:ABS_URI] = Regexp.new('\A\s*' + pattern[:X_ABS_URI] + '\s*\z', Regexp::EXTENDED)
+ ret[:REL_URI] = Regexp.new('\A\s*' + pattern[:X_REL_URI] + '\s*\z', Regexp::EXTENDED)
# for URI::extract
ret[:URI_REF] = Regexp.new(pattern[:URI_REF])
diff --git a/lib/uri/generic.rb b/lib/uri/generic.rb
index fd01f89797..14ca97301b 100644
--- a/lib/uri/generic.rb
+++ b/lib/uri/generic.rb
@@ -992,6 +992,9 @@ module URI
if path && path == ''
set_path('/')
end
+ if scheme && scheme != scheme.downcase
+ set_scheme(self.scheme.downcase)
+ end
if host && host != host.downcase
set_host(self.host.downcase)
end
@@ -1066,6 +1069,7 @@ module URI
end
def eql?(oth)
+ self.class == oth.class &&
parser == oth.parser &&
self.component_ary.eql?(oth.component_ary)
end
diff --git a/lib/webrick/accesslog.rb b/lib/webrick/accesslog.rb
index f97769545e..0bed8097d5 100644
--- a/lib/webrick/accesslog.rb
+++ b/lib/webrick/accesslog.rb
@@ -53,15 +53,23 @@ module WEBrick
when ?e, ?i, ?n, ?o
raise AccessLogError,
"parameter is required for \"#{spec}\"" unless param
- params[spec][param] || "-"
+ (param = params[spec][param]) ? escape(param) : "-"
when ?t
params[spec].strftime(param || CLF_TIME_FORMAT)
when ?%
"%"
else
- params[spec]
+ escape(params[spec].to_s)
end
}
end
+
+ def escape(data)
+ if data.tainted?
+ data.gsub(/[[:cntrl:]\\]+/) {$&.dump[1...-1]}.untaint
+ else
+ data
+ end
+ end
end
end
diff --git a/lib/webrick/config.rb b/lib/webrick/config.rb
index 946312e915..0fbb67f487 100644
--- a/lib/webrick/config.rb
+++ b/lib/webrick/config.rb
@@ -22,7 +22,7 @@ module WEBrick
General = {
:ServerName => Utils::getservername,
:BindAddress => nil, # "0.0.0.0" or "::" or nil
- :Port => nil, # users MUST specifiy this!!
+ :Port => nil, # users MUST specify this!!
:MaxClients => 100, # maximum number of the concurrent connections
:ServerType => nil, # default: WEBrick::SimpleServer
:Logger => nil, # default: WEBrick::Log.new
diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb
index ff9b6d7849..d6cd7d9776 100644
--- a/lib/webrick/httprequest.rb
+++ b/lib/webrick/httprequest.rb
@@ -266,11 +266,7 @@ module WEBrick
@raw_header << line
end
end
- begin
- @header = HTTPUtils::parse_header(@raw_header.join)
- rescue => ex
- raise HTTPStatus::BadRequest, ex.message
- end
+ @header = HTTPUtils::parse_header(@raw_header.join)
end
def parse_uri(str, scheme="http")
diff --git a/lib/webrick/https.rb b/lib/webrick/https.rb
index 81b65ce803..dd9d178618 100644
--- a/lib/webrick/https.rb
+++ b/lib/webrick/https.rb
@@ -33,7 +33,7 @@ module WEBrick
alias orig_parse_uri parse_uri
def parse_uri(str, scheme="https")
- if @server_cert
+ if server_cert
return orig_parse_uri(str, scheme)
end
return orig_parse_uri(str)
@@ -43,7 +43,7 @@ module WEBrick
def meta_vars
meta = orig_meta_vars
- if @server_cert
+ if server_cert
meta["HTTPS"] = "on"
meta["SSL_SERVER_CERT"] = @server_cert.to_pem
meta["SSL_CLIENT_CERT"] = @client_cert ? @client_cert.to_pem : ""
diff --git a/lib/webrick/httpservlet/cgihandler.rb b/lib/webrick/httpservlet/cgihandler.rb
index ab36b906f1..7ba2d50860 100644
--- a/lib/webrick/httpservlet/cgihandler.rb
+++ b/lib/webrick/httpservlet/cgihandler.rb
@@ -17,9 +17,7 @@ module WEBrick
module HTTPServlet
class CGIHandler < AbstractServlet
- Ruby = File::join(RbConfig::CONFIG['bindir'],
- RbConfig::CONFIG['ruby_install_name'])
- Ruby << RbConfig::CONFIG['EXEEXT']
+ Ruby = RbConfig.ruby
CGIRunner = "\"#{Ruby}\" \"#{WEBrick::Config::LIBDIR}/httpservlet/cgi_runner.rb\""
def initialize(server, name)
diff --git a/lib/webrick/httpservlet/filehandler.rb b/lib/webrick/httpservlet/filehandler.rb
index 1cac0cabe3..32c19651e7 100644
--- a/lib/webrick/httpservlet/filehandler.rb
+++ b/lib/webrick/httpservlet/filehandler.rb
@@ -87,7 +87,7 @@ module WEBrick
content = io.read(last-first+1)
body << "--" << boundary << CRLF
body << "Content-Type: #{mtype}" << CRLF
- body << "Content-Range: #{first}-#{last}/#{filesize}" << CRLF
+ body << "Content-Range: bytes #{first}-#{last}/#{filesize}" << CRLF
body << CRLF
body << content
body << CRLF
@@ -107,7 +107,7 @@ module WEBrick
content = io.read(last-first+1)
end
res['content-type'] = mtype
- res['content-range'] = "#{first}-#{last}/#{filesize}"
+ res['content-range'] = "bytes #{first}-#{last}/#{filesize}"
res['content-length'] = last - first + 1
res.body = content
else
@@ -412,7 +412,7 @@ module WEBrick
else
dname = name
end
- s = " <A HREF=\"#{HTTPUtils::escape(name)}\">#{dname}</A>"
+ s = " <A HREF=\"#{HTTPUtils::escape(name)}\">#{HTMLUtils::escape(dname)}</A>"
s << " " * (30 - dname.bytesize)
s << (time ? time.strftime("%Y/%m/%d %H:%M ") : " " * 22)
s << (size >= 0 ? size.to_s : "-") << "\n"
diff --git a/lib/webrick/httpstatus.rb b/lib/webrick/httpstatus.rb
index d022ddb446..a49be32be9 100644
--- a/lib/webrick/httpstatus.rb
+++ b/lib/webrick/httpstatus.rb
@@ -12,7 +12,18 @@ module WEBrick
module HTTPStatus
- class Status < StandardError; end
+ class Status < StandardError
+ def initialize(*args)
+ args[0] = AccessLog.escape(args[0]) unless args.empty?
+ super(*args)
+ end
+ class << self
+ attr_reader :code, :reason_phrase
+ end
+ def code() self::class::code end
+ def reason_phrase() self::class::reason_phrase end
+ alias to_i code
+ end
class Info < Status; end
class Success < Status; end
class Redirect < Status; end
@@ -68,6 +79,7 @@ module WEBrick
CodeToError = {}
StatusMessage.each{|code, message|
+ message.freeze
var_name = message.gsub(/[ \-]/,'_').upcase
err_name = message.gsub(/[ \-]/,'')
@@ -79,18 +91,12 @@ module WEBrick
when 500...600; parent = ServerError
end
- eval %-
- RC_#{var_name} = #{code}
- class #{err_name} < #{parent}
- def self.code() RC_#{var_name} end
- def self.reason_phrase() StatusMessage[code] end
- def code() self::class::code end
- def reason_phrase() self::class::reason_phrase end
- alias to_i code
- end
- -
-
- CodeToError[code] = const_get(err_name)
+ const_set("RC_#{var_name}", code)
+ err_class = Class.new(parent)
+ err_class.instance_variable_set(:@code, code)
+ err_class.instance_variable_set(:@reason_phrase, message)
+ const_set(err_name, err_class)
+ CodeToError[code] = err_class
}
def reason_phrase(code)
diff --git a/lib/webrick/httputils.rb b/lib/webrick/httputils.rb
index 6f6f05a199..f029dacb56 100644
--- a/lib/webrick/httputils.rb
+++ b/lib/webrick/httputils.rb
@@ -129,11 +129,11 @@ module WEBrick
when /^\s+(.*?)\s*\z/om
value = $1
unless field
- raise "bad header '#{line.inspect}'."
+ raise HTTPStatus::BadRequest, "bad header '#{line}'."
end
header[field][-1] << " " << value
else
- raise "bad header '#{line.inspect}'."
+ raise HTTPStatus::BadRequest, "bad header '#{line}'."
end
}
header.each{|key, values|
diff --git a/lib/webrick/ssl.rb b/lib/webrick/ssl.rb
index 896206b483..ff73ad1b8b 100644
--- a/lib/webrick/ssl.rb
+++ b/lib/webrick/ssl.rb
@@ -83,6 +83,7 @@ module WEBrick
@ssl_context ||= nil
end
+ undef listen
def listen(address, port)
listeners = Utils::create_listeners(address, port, @logger)
if @config[:SSLEnable]
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb
index e8c0c89f2c..71f911a738 100644
--- a/lib/yaml/rubytypes.rb
+++ b/lib/yaml/rubytypes.rb
@@ -72,7 +72,7 @@ class Struct
#
st = YAML::object_maker( struct_type, {} )
st.members.each do |m|
- st.send( "#{m}=", val[m] )
+ st.send( "#{m}=", val[m.to_s] )
end
props.each do |k,v|
st.instance_variable_set(k, v)
@@ -89,7 +89,7 @@ class Struct
#
out.map( taguri, to_yaml_style ) do |map|
self.members.each do |m|
- map.add( m, self[m] )
+ map.add( m.to_s, self[m.to_s] )
end
self.to_yaml_properties.each do |m|
map.add( m, instance_variable_get( m ) )
diff --git a/marshal.c b/marshal.c
index 270d223e04..0796af6a65 100644
--- a/marshal.c
+++ b/marshal.c
@@ -166,6 +166,7 @@ mark_dump_arg(void *ptr)
return;
rb_mark_set(p->data);
rb_mark_hash(p->compat_tbl);
+ rb_gc_mark(p->str);
}
static void
@@ -423,10 +424,11 @@ w_symbol(ID id, struct dump_arg *arg)
rb_raise(rb_eTypeError, "can't dump anonymous ID %ld", id);
}
encidx = rb_enc_get_index(sym);
- if (encidx == rb_usascii_encindex()) {
+ if (encidx == rb_usascii_encindex() ||
+ rb_enc_str_coderange(sym) == ENC_CODERANGE_7BIT) {
encidx = -1;
}
- else if (rb_enc_str_coderange(sym) != ENC_CODERANGE_7BIT) {
+ else {
w_byte(TYPE_IVAR, arg);
}
w_byte(TYPE_SYMBOL, arg);
@@ -649,7 +651,7 @@ w_object(VALUE obj, struct dump_arg *arg, int limit)
check_dump_arg(arg, s_mdump);
w_class(TYPE_USRMARSHAL, obj, arg, FALSE);
w_object(v, arg, limit);
- if (hasiv) w_ivar(obj, 0, &c_arg);
+ if (hasiv) w_ivar(obj, ivtbl, &c_arg);
return;
}
if (rb_respond_to(obj, s_dump)) {
@@ -926,7 +928,7 @@ marshal_dump(int argc, VALUE *argv)
arg->compat_allocator_tbl = DATA_PTR(rb_compat_allocator_tbl);
arg->compat_tbl = st_init_numtable();
arg->encodings = 0;
- arg->str = rb_str_tmp_new(0);
+ arg->str = rb_str_buf_new(0);
if (!NIL_P(port)) {
if (!rb_respond_to(port, s_write)) {
type_error:
@@ -950,7 +952,6 @@ marshal_dump(int argc, VALUE *argv)
rb_io_write(arg->dest, arg->str);
rb_str_resize(arg->str, 0);
}
- RBASIC(arg->str)->klass = rb_cString;
clear_dump_arg(arg);
RB_GC_GUARD(wrapper);
@@ -1131,7 +1132,6 @@ id2encidx(ID id, VALUE val, struct load_arg *arg)
{
if (id == rb_id_encoding()) {
int idx = rb_enc_find_index(StringValueCStr(val));
- r_entry(val, arg);
return idx;
}
else if (id == rb_intern("E")) {
@@ -1259,7 +1259,7 @@ r_leave(VALUE v, struct load_arg *arg)
}
static void
-r_ivar(VALUE obj, struct load_arg *arg)
+r_ivar(VALUE obj, int *has_encoding, struct load_arg *arg)
{
long len;
@@ -1271,6 +1271,7 @@ r_ivar(VALUE obj, struct load_arg *arg)
int idx = id2encidx(id, val, arg);
if (idx >= 0) {
rb_enc_associate_index(obj, idx);
+ if (has_encoding) *has_encoding = TRUE;
}
else {
rb_ivar_set(obj, id, val);
@@ -1324,37 +1325,6 @@ obj_alloc_by_path(VALUE path, struct load_arg *arg)
return rb_obj_alloc(klass);
}
-#define div0(x) ruby_div0(x)
-
-static int
-has_encoding(struct load_arg *arg)
-{
- int res = FALSE;
- long offset = arg->offset;
- r_long(arg);
- switch (r_byte(arg)) {
- case TYPE_SYMBOL:
- switch (r_byte(arg)) {
- case 6:
- if (r_byte(arg) == 'E') res = TRUE;
- break;
- case 13:
- if (r_byte(arg) == 'e') res = TRUE;
- break;
- }
- break;
- case TYPE_SYMLINK:
- {
- ID id = r_symlink(arg);
- if (id == rb_intern("E") || id == rb_id_encoding())
- res = TRUE;
- }
- break;
- }
- arg->offset = offset;
- return res;
-}
-
static VALUE
r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
{
@@ -1381,7 +1351,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
int ivar = TRUE;
v = r_object0(arg, &ivar, extmod);
- if (ivar) r_ivar(v, arg);
+ if (ivar) r_ivar(v, NULL, arg);
}
break;
@@ -1451,13 +1421,13 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
const char *ptr = RSTRING_PTR(str);
if (strcmp(ptr, "nan") == 0) {
- d = div0(0.0);
+ d = NAN;
}
else if (strcmp(ptr, "inf") == 0) {
- d = div0(+1.0);
+ d = INFINITY;
}
else if (strcmp(ptr, "-inf") == 0) {
- d = div0(-1.0);
+ d = -INFINITY;
}
else {
char *e;
@@ -1525,17 +1495,33 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
{
volatile VALUE str = r_bytes(arg);
int options = r_byte(arg);
+ int has_encoding = FALSE;
- if (!ivp || !has_encoding(arg)) {
- VALUE pat;
- VALUE dst;
- static const char rsrc[] =
- "(?<!\\\\)((?:\\\\\\\\)*)\\\\([ghijklmopquyEFHIJKLNOPQRSTUVXY])";
- pat = rb_reg_new(rsrc, sizeof(rsrc)-1, 0);
- dst = rb_usascii_str_new_cstr("\\1\\2");
- rb_funcall(str, rb_intern("gsub!"), 2, pat, dst);
+ v = r_entry(rb_reg_alloc(), arg);
+ if (ivp) {
+ r_ivar(str, &has_encoding, arg);
+ *ivp = FALSE;
+ }
+ if (!has_encoding) {
+ /* 1.8 compatibility; remove escapes undefined in 1.8 */
+ char *ptr = RSTRING_PTR(str), *dst = ptr, *src = ptr;
+ long len = RSTRING_LEN(str);
+ long bs = 0;
+ for (; len-- > 0; *dst++ = *src++) {
+ switch (*src) {
+ case '\\': bs++; break;
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'o': case 'p': case 'q': case 'u': case 'y':
+ case 'E': case 'F': case 'H': case 'I': case 'J': case 'K':
+ case 'L': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'X': case 'Y':
+ if (bs & 1) --dst;
+ default: bs = 0; break;
+ }
+ }
+ rb_str_set_len(str, dst - ptr);
}
- v = r_entry(rb_reg_new_str(str, options), arg);
+ v = rb_reg_init_str(v, str, options);
v = r_leave(v, arg);
}
break;
@@ -1620,7 +1606,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
}
data = r_string(arg);
if (ivp) {
- r_ivar(data, arg);
+ r_ivar(data, NULL, arg);
*ivp = FALSE;
}
v = rb_funcall(klass, s_load, 1, data);
@@ -1662,7 +1648,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
rb_raise(rb_eArgError, "dump format error");
}
v = r_entry0(v, idx, arg);
- r_ivar(v, arg);
+ r_ivar(v, NULL, arg);
v = r_leave(v, arg);
}
break;
diff --git a/math.c b/math.c
index 89bdac19bf..03bce133fc 100644
--- a/math.c
+++ b/math.c
@@ -25,10 +25,13 @@ extern VALUE rb_to_float(VALUE val);
static void
domain_check(double x, double y, const char *msg)
{
- if (!isnan(y)) return;
- else if (isnan(x)) return;
+ if (errno) {
+ if (isinf(y)) return;
+ }
else {
- if (!errno) {
+ if (!isnan(y)) return;
+ else if (isnan(x)) return;
+ else {
#if defined(EDOM)
errno = EDOM;
#else
@@ -65,6 +68,17 @@ infinity_check(VALUE arg, double res, const char *msg)
* Computes the arc tangent given <i>y</i> and <i>x</i>. Returns
* -PI..PI.
*
+ * Math.atan2(-0.0, -1.0) #=> -3.141592653589793
+ * Math.atan2(-1.0, -1.0) #=> -2.356194490192345
+ * Math.atan2(-1.0, 0.0) #=> -1.5707963267948966
+ * Math.atan2(-1.0, 1.0) #=> -0.7853981633974483
+ * Math.atan2(-0.0, 1.0) #=> -0.0
+ * Math.atan2(0.0, 1.0) #=> 0.0
+ * Math.atan2(1.0, 1.0) #=> 0.7853981633974483
+ * Math.atan2(1.0, 0.0) #=> 1.5707963267948966
+ * Math.atan2(1.0, -1.0) #=> 2.356194490192345
+ * Math.atan2(0.0, -1.0) #=> 3.141592653589793
+ *
*/
static VALUE
@@ -598,7 +612,7 @@ math_erfc(VALUE obj, VALUE x)
* Calculates the gamma function of x.
*
* Note that gamma(n) is same as fact(n-1) for integer n > 0.
- * However gamma(n) returns float and possibly has error in calculation.
+ * However gamma(n) returns float and can be an approximation.
*
* def fact(n) (1..n).inject(1) {|r,i| r*i } end
* 1.upto(26) {|i| p [i, Math.gamma(i), fact(i-1)] }
@@ -664,14 +678,13 @@ math_gamma(VALUE obj, VALUE x)
};
double d0, d;
double intpart, fracpart;
- int n;
Need_Float(x);
d0 = RFLOAT_VALUE(x);
fracpart = modf(d0, &intpart);
if (fracpart == 0.0 &&
- 0 < intpart &&
- (n = (int)intpart - 1) < numberof(fact_table)) {
- return DBL2NUM(fact_table[n]);
+ 0 < intpart &&
+ intpart - 1 < (double)numberof(fact_table)) {
+ return DBL2NUM(fact_table[(int)intpart - 1]);
}
errno = 0;
d = tgamma(d0);
@@ -695,7 +708,7 @@ static VALUE
math_lgamma(VALUE obj, VALUE x)
{
double d0, d;
- int sign;
+ int sign=1;
VALUE v;
Need_Float(x);
errno = 0;
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 70acd7266b..cbf944c2ab 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -121,13 +121,15 @@
(match-string 6)))))
(defun ruby-here-doc-beg-match ()
- (let ((contents (regexp-quote (concat (match-string 2) (match-string 3)))))
+ (let ((contents (concat
+ (regexp-quote (concat (match-string 2) (match-string 3)))
+ (if (string= (match-string 3) "_") "\\B" "\\b"))))
(concat "<<"
(let ((match (match-string 1)))
(if (and match (> (length match) 0))
(concat "\\(?:-\\([\"']?\\)\\|\\([\"']\\)" (match-string 1) "\\)"
- contents "\\b\\(\\1\\|\\2\\)")
- (concat "-?\\([\"']\\|\\)" contents "\\b\\1"))))))
+ contents "\\(\\1\\|\\2\\)")
+ (concat "-?\\([\"']\\|\\)" contents "\\1"))))))
(defconst ruby-delimiter
(concat "[?$/%(){}#\"'`.:]\\|<<\\|\\[\\|\\]\\|\\<\\("
diff --git a/missing/alloca.c b/missing/alloca.c
index 620eef12e5..d23917f3f7 100644
--- a/missing/alloca.c
+++ b/missing/alloca.c
@@ -54,7 +54,7 @@ typedef char *pointer; /* generic pointer type */
#define NULL 0 /* null pointer constant */
-#ifdef RUBY_LIB
+#ifdef RUBY_LIB_PREFIX
#define xmalloc ruby_xmalloc
#define xfree ruby_xfree
#endif
diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c
index 5718362fed..4e19651679 100644
--- a/missing/vsnprintf.c
+++ b/missing/vsnprintf.c
@@ -769,7 +769,7 @@ reswitch: switch (ch) {
if (flags & QUADINT) {
uqval = va_arg(ap, quad_t);
if ((quad_t)uqval < 0) {
- uqval = -uqval;
+ uqval = -(quad_t)uqval;
sign = '-';
}
} else
diff --git a/node.c b/node.c
new file mode 100644
index 0000000000..e7d3c4cd34
--- /dev/null
+++ b/node.c
@@ -0,0 +1,921 @@
+/**********************************************************************
+
+ node.c - ruby node tree
+
+ $Author: mame $
+ created at: 09/12/06 21:23:44 JST
+
+ Copyright (C) 2009 Yusuke Endoh
+
+**********************************************************************/
+
+#include "ruby/ruby.h"
+#include "vm_core.h"
+
+#define A(str) rb_str_cat2(buf, (str))
+#define AR(str) rb_str_concat(buf, (str))
+
+#define A_INDENT add_indent(buf, indent)
+#define A_ID(id) add_id(buf, id)
+#define A_INT(val) rb_str_catf(buf, "%d", (val));
+#define A_LONG(val) rb_str_catf(buf, "%ld", (val));
+#define A_LIT(lit) AR(rb_inspect(lit))
+#define A_NODE_HEADER(node) \
+ rb_str_catf(buf, "@ %s (line: %d)", ruby_node_name(nd_type(node)), nd_line(node))
+#define A_FIELD_HEADER(name) \
+ rb_str_catf(buf, "+- %s:", name)
+
+#define D_NULL_NODE A_INDENT; A("(null node)"); A("\n");
+#define D_NODE_HEADER(node) A_INDENT; A_NODE_HEADER(node); A("\n");
+
+#define COMPOUND_FIELD(name, name2, block) \
+ do { \
+ A_INDENT; A_FIELD_HEADER(comment ? name2 : name); A("\n"); \
+ rb_str_cat2(indent, next_indent); \
+ block; \
+ rb_str_resize(indent, RSTRING_LEN(indent) - 4); \
+ } while (0)
+
+#define SIMPLE_FIELD(name, name2, block) \
+ do { \
+ A_INDENT; A_FIELD_HEADER(comment ? name2 : name); A(" "); block; A("\n"); \
+ } while (0)
+
+#define F_CUSTOM1(name, ann, block) SIMPLE_FIELD(#name, #name " (" ann ")", block)
+#define F_ID(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_ID(node->name))
+#define F_GENTRY(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_ID((node->name)->id))
+#define F_INT(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_INT(node->name))
+#define F_LONG(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_LONG(node->name))
+#define F_LIT(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_LIT(node->name))
+#define F_MSG(name, ann, desc) SIMPLE_FIELD(#name, #name " (" ann ")", A(desc))
+
+#define F_CUSTOM2(name, ann, block) \
+ COMPOUND_FIELD(#name, #name " (" ann ")", block)
+
+#define F_NODE(name, ann) \
+ COMPOUND_FIELD(#name, #name " (" ann ")", dump_node(buf, indent, comment, node->name))
+
+#define ANN(ann) \
+ if (comment) { \
+ A_INDENT; A("| # "); A(ann); A("\n"); \
+ }
+
+#define LAST_NODE (next_indent = " ")
+
+static void
+add_indent(VALUE buf, VALUE indent)
+{
+ AR(indent);
+}
+
+static void
+add_id(VALUE buf, ID id)
+{
+ if (id == 0) {
+ A("(null)");
+ }
+ else {
+ VALUE str = rb_id2str(id);
+ if (str) {
+ A(":"); AR(rb_id2str(id));
+ }
+ else {
+ A("(internal variable)");
+ }
+ }
+}
+
+static void
+dump_node(VALUE buf, VALUE indent, int comment, NODE *node)
+{
+ const char *next_indent = "| ";
+
+ if (!node) {
+ D_NULL_NODE;
+ return;
+ }
+
+ D_NODE_HEADER(node);
+
+ switch (nd_type(node)) {
+ case NODE_BLOCK:
+ ANN("statement sequence");
+ ANN("format: [nd_head]; [nd_next]");
+ ANN("example: foo; bar");
+ F_NODE(nd_head, "current statement");
+ LAST_NODE;
+ F_NODE(nd_next, "next block");
+ break;
+
+ case NODE_IF:
+ ANN("if statement");
+ ANN("format: if [nd_cond] then [nd_body] else [nd_else] end");
+ ANN("example: if x == 1 then foo else bar end");
+ F_NODE(nd_cond, "condition expr");
+ F_NODE(nd_body, "then clause");
+ LAST_NODE;
+ F_NODE(nd_else, "else clause");
+ break;
+
+ case NODE_CASE:
+ ANN("case statement");
+ ANN("format: case [nd_head]; [nd_body]; end");
+ ANN("example: case x; when 1; foo; when 2; bar; else baz; end");
+ F_NODE(nd_head, "case expr");
+ LAST_NODE;
+ F_NODE(nd_body, "when clauses");
+ break;
+
+ case NODE_WHEN:
+ ANN("if statement");
+ ANN("format: when [nd_head]; [nd_body]; (when or else) [nd_next]");
+ ANN("example: case x; when 1; foo; when 2; bar; else baz; end");
+ F_NODE(nd_head, "when value");
+ F_NODE(nd_body, "when clause");
+ LAST_NODE;
+ F_NODE(nd_next, "next when clause");
+ break;
+
+ case NODE_OPT_N:
+ ANN("wrapper for -n option");
+ ANN("format: ruby -ne '[nd_body]' (nd_cond is `gets')");
+ ANN("example: ruby -ne 'p $_'");
+ goto loop;
+ case NODE_WHILE:
+ ANN("while statement");
+ ANN("format: while [nd_cond]; [nd_body]; end");
+ ANN("example: while x == 1; foo; end");
+ goto loop;
+ case NODE_UNTIL:
+ ANN("until statement");
+ ANN("format: until [nd_cond]; [nd_body]; end");
+ ANN("example: until x == 1; foo; end");
+ loop:
+ F_CUSTOM1(nd_state, "begin-end-while?", {
+ A_INT((int)node->nd_state);
+ A((node->nd_state == 1) ? " (while-end)" : " (begin-end-while)");
+ });
+ F_NODE(nd_cond, "condition");
+ LAST_NODE;
+ F_NODE(nd_body, "body");
+ break;
+
+ case NODE_ITER:
+ ANN("method call with block");
+ ANN("format: [nd_iter] { [nd_body] }");
+ ANN("example: 3.times { foo }");
+ goto iter;
+ case NODE_FOR:
+ ANN("for statement");
+ ANN("format: for * in [nd_iter] do [nd_body] end");
+ ANN("example: for i in 1..3 do foo end");
+ iter:
+ F_NODE(nd_iter, "iteration receiver");
+ LAST_NODE;
+ F_NODE(nd_body, "body");
+ break;
+
+ case NODE_BREAK:
+ ANN("for statement");
+ ANN("format: break [nd_stts]");
+ ANN("example: break 1");
+ goto jump;
+ case NODE_NEXT:
+ ANN("next statement");
+ ANN("format: next [nd_stts]");
+ ANN("example: next 1");
+ goto jump;
+ case NODE_RETURN:
+ ANN("return statement");
+ ANN("format: return [nd_stts]");
+ ANN("example: return 1");
+ jump:
+ LAST_NODE;
+ F_NODE(nd_stts, "value");
+ break;
+
+ case NODE_REDO:
+ ANN("redo statement");
+ ANN("format: redo");
+ ANN("example: redo");
+ break;
+
+ case NODE_RETRY:
+ ANN("retry statement");
+ ANN("format: retry");
+ ANN("example: retry");
+ break;
+
+ case NODE_BEGIN:
+ ANN("begin statement");
+ ANN("format: begin; [nd_body]; end");
+ ANN("example: begin; 1; end");
+ LAST_NODE;
+ F_NODE(nd_body, "body");
+ break;
+
+ case NODE_RESCUE:
+ ANN("rescue clause");
+ ANN("format: begin; [nd_body]; (rescue) [nd_resq]; else [nd_else]; end");
+ ANN("example: begin; foo; rescue; bar; else; baz; end");
+ F_NODE(nd_head, "body");
+ F_NODE(nd_resq, "rescue clause list");
+ LAST_NODE;
+ F_NODE(nd_else, "rescue else clause");
+ break;
+
+ case NODE_RESBODY:
+ ANN("rescue clause (cont'd)");
+ ANN("format: rescue [nd_args]; [nd_body]; (rescue) [nd_head]");
+ ANN("example: begin; foo; rescue; bar; else; baz; end");
+ F_NODE(nd_args, "rescue exceptions");
+ F_NODE(nd_body, "rescue clause");
+ LAST_NODE;
+ F_NODE(nd_head, "next rescue clause");
+ break;
+
+ case NODE_ENSURE:
+ ANN("ensure clause");
+ ANN("format: begin; [nd_head]; ensure; [nd_ensr]; end");
+ ANN("example: begin; foo; ensure; bar; end");
+ F_NODE(nd_head, "body");
+ LAST_NODE;
+ F_NODE(nd_ensr, "ensure clause");
+ break;
+
+ case NODE_AND:
+ ANN("&& operator");
+ ANN("format: [nd_1st] && [nd_2nd]");
+ ANN("example: foo && bar");
+ goto andor;
+ case NODE_OR:
+ ANN("|| operator");
+ ANN("format: [nd_1st] || [nd_2nd]");
+ ANN("example: foo && bar");
+ andor:
+ F_NODE(nd_1st, "left expr");
+ LAST_NODE;
+ F_NODE(nd_2nd, "right expr");
+ break;
+
+ case NODE_MASGN:
+ ANN("multiple assignment");
+ ANN("format: [nd_head], [nd_args] = [nd_value]");
+ ANN("example: a, b = foo");
+ F_NODE(nd_value, "rhsn");
+ F_NODE(nd_head, "lhsn");
+ if ((VALUE)node->nd_args != (VALUE)-1) {
+ LAST_NODE;
+ F_NODE(nd_args, "splatn");
+ }
+ else {
+ F_MSG(nd_args, "splatn", "-1 (rest argument without name)");
+ }
+ break;
+
+ case NODE_LASGN:
+ ANN("local variable assignment");
+ ANN("format: [nd_vid](lvar) = [nd_value]");
+ ANN("example: x = foo");
+ goto asgn;
+ case NODE_DASGN:
+ ANN("dynamic variable assignment (out of current scope)");
+ ANN("format: [nd_vid](dvar) = [nd_value]");
+ ANN("example: x = nil; 1.times { x = foo }");
+ goto asgn;
+ case NODE_DASGN_CURR:
+ ANN("dynamic variable assignment (in current scope)");
+ ANN("format: [nd_vid](current dvar) = [nd_value]");
+ ANN("example: 1.times { x = foo }");
+ goto asgn;
+ case NODE_IASGN:
+ ANN("instance variable assignment");
+ ANN("format: [nd_vid](ivar) = [nd_value]");
+ ANN("example: @x = foo");
+ goto asgn;
+ case NODE_CVASGN:
+ ANN("class variable assignment");
+ ANN("format: [nd_vid](cvar) = [nd_value]");
+ ANN("example: @@x = foo");
+ asgn:
+ F_ID(nd_vid, "variable");
+ LAST_NODE;
+ F_NODE(nd_value, "rvalue");
+ break;
+
+ case NODE_GASGN:
+ ANN("global variable assignment");
+ ANN("format: [nd_entry](gvar) = [nd_value]");
+ ANN("example: $x = foo");
+ F_GENTRY(nd_entry, "global variable");
+ LAST_NODE;
+ F_NODE(nd_value, "rvalue");
+ break;
+
+ case NODE_CDECL:
+ ANN("constant declaration");
+ ANN("format: [nd_else]::[nd_vid](constant) = [nd_value]");
+ ANN("example: X = foo");
+ if (node->nd_vid) {
+ F_ID(nd_vid, "variable");
+ F_MSG(nd_else, "extension", "not used");
+ }
+ else {
+ F_MSG(nd_vid, "variable", "0 (see extension field)");
+ F_NODE(nd_else, "extension");
+ }
+ LAST_NODE;
+ F_NODE(nd_value, "rvalue");
+ break;
+
+ case NODE_OP_ASGN1:
+ ANN("array assignment with operator");
+ ANN("format: [nd_value] [ [nd_args->nd_body] ] [nd_vid]= [nd_args->nd_head]");
+ ANN("example: ary[1] += foo");
+ F_NODE(nd_recv, "receiver");
+ F_ID(nd_vid, "operator");
+ F_NODE(nd_args->nd_body, "index");
+ LAST_NODE;
+ F_NODE(nd_args->nd_head, "rvalue");
+ break;
+
+ case NODE_OP_ASGN2:
+ ANN("attr assignment with operator");
+ ANN("format: [nd_value].[attr] [nd_next->nd_mid]= [nd_value]");
+ ANN(" where [attr] reader: [nd_next->nd_vid]");
+ ANN(" [attr] writer: [nd_next->nd_aid]");
+ ANN("example: struct.field += foo");
+ F_NODE(nd_recv, "receiver");
+ F_ID(nd_next->nd_vid, "reader");
+ F_ID(nd_next->nd_aid, "writer");
+ F_CUSTOM1(nd_next->nd_mid, "operator", {
+ switch (node->nd_next->nd_mid) {
+ case 0: A("0 (||)"); break;
+ case 1: A("1 (&&)"); break;
+ default: A_ID(node->nd_next->nd_mid);
+ }
+ });
+ LAST_NODE;
+ F_NODE(nd_value, "rvalue");
+ break;
+
+ case NODE_OP_ASGN_AND:
+ ANN("assignment with && operator");
+ ANN("format: [nd_head] &&= [nd_value]");
+ ANN("example: foo &&= bar");
+ goto asgn_andor;
+ case NODE_OP_ASGN_OR:
+ ANN("assignment with || operator");
+ ANN("format: [nd_head] ||= [nd_value]");
+ ANN("example: foo ||= bar");
+ asgn_andor:
+ F_NODE(nd_head, "variable");
+ LAST_NODE;
+ F_NODE(nd_value, "rvalue");
+ break;
+
+ case NODE_CALL:
+ ANN("method invocation");
+ ANN("format: [nd_recv].[nd_mid]([nd_args])");
+ ANN("example: obj.foo(1)");
+ F_ID(nd_mid, "method id");
+ F_NODE(nd_recv, "receiver");
+ LAST_NODE;
+ F_NODE(nd_args, "arguments");
+ break;
+
+ case NODE_FCALL:
+ ANN("function call");
+ ANN("format: [nd_mid]([nd_args])");
+ ANN("example: foo(1)");
+ F_ID(nd_mid, "method id");
+ LAST_NODE;
+ F_NODE(nd_args, "arguments");
+ break;
+
+ case NODE_VCALL:
+ ANN("function call with no argument");
+ ANN("format: [nd_mid]");
+ ANN("example: foo");
+ F_ID(nd_mid, "method id");
+ break;
+
+ case NODE_SUPER:
+ ANN("super invocation");
+ ANN("format: super [nd_args]");
+ ANN("example: super 1");
+ LAST_NODE;
+ F_NODE(nd_args, "arguments");
+ break;
+
+ case NODE_ZSUPER:
+ ANN("super invocation with no argument");
+ ANN("format: super");
+ ANN("example: super");
+ break;
+
+ case NODE_ARRAY:
+ ANN("array constructor");
+ ANN("format: [ [nd_head], [nd_next].. ] (length: [nd_alen])");
+ ANN("example: [1, 2, 3]");
+ goto ary;
+ case NODE_VALUES:
+ ANN("return arguments");
+ ANN("format: [ [nd_head], [nd_next].. ] (length: [nd_alen])");
+ ANN("example: return 1, 2, 3");
+ ary:
+ F_LONG(nd_alen, "length");
+ F_NODE(nd_head, "element");
+ LAST_NODE;
+ F_NODE(nd_next, "next element");
+ break;
+
+ case NODE_ZARRAY:
+ ANN("empty array constructor");
+ ANN("format: []");
+ ANN("example: []");
+ break;
+
+ case NODE_HASH:
+ ANN("hash constructor");
+ ANN("format: { [nd_head] }");
+ ANN("example: { 1 => 2, 3 => 4 }");
+ LAST_NODE;
+ F_NODE(nd_head, "contents");
+ break;
+
+ case NODE_YIELD:
+ ANN("yield invocation");
+ ANN("format: yield [nd_head]");
+ ANN("example: yield 1");
+ LAST_NODE;
+ F_NODE(nd_head, "arguments");
+ break;
+
+ case NODE_LVAR:
+ ANN("local variable reference");
+ ANN("format: [nd_vid](lvar)");
+ ANN("example: x");
+ goto var;
+ case NODE_DVAR:
+ ANN("dynamic variable reference");
+ ANN("format: [nd_vid](dvar)");
+ ANN("example: 1.times { x = 1; x }");
+ goto var;
+ case NODE_IVAR:
+ ANN("instance variable reference");
+ ANN("format: [nd_vid](ivar)");
+ ANN("example: @x");
+ goto var;
+ case NODE_CONST:
+ ANN("constant reference");
+ ANN("format: [nd_vid](constant)");
+ ANN("example: X");
+ goto var;
+ case NODE_CVAR:
+ ANN("class variable reference");
+ ANN("format: [nd_vid](cvar)");
+ ANN("example: @@x");
+ var:
+ F_ID(nd_vid, "local variable");
+ break;
+
+ case NODE_GVAR:
+ ANN("global variable reference");
+ ANN("format: [nd_entry](gvar)");
+ ANN("example: $x");
+ F_GENTRY(nd_entry, "global variable");
+ break;
+
+ case NODE_NTH_REF:
+ ANN("nth special variable reference");
+ ANN("format: $[nd_nth]");
+ ANN("example: $1, $2, ..");
+ F_CUSTOM1(nd_nth, "variable", { A("$"); A_LONG(node->nd_nth); });
+ break;
+
+ case NODE_BACK_REF:
+ ANN("back special variable reference");
+ ANN("format: $[nd_nth]");
+ ANN("example: $&, $`, $', $+");
+ F_CUSTOM1(nd_nth, "variable", {
+ char name[3];
+ name[0] = '$';
+ name[1] = node->nd_nth;
+ name[2] = '\0';
+ A(name);
+ });
+ break;
+
+ case NODE_MATCH:
+ ANN("match expression (against $_ implicitly)");
+ ANN("format: [nd_lit] (in condition)");
+ ANN("example: if /foo/; foo; end");
+ F_LIT(nd_lit, "regexp");
+ break;
+
+ case NODE_MATCH2:
+ ANN("match expression (regexp first)");
+ ANN("format: [nd_recv] =~ [nd_value]");
+ ANN("example: /foo/ =~ 'foo'");
+ F_NODE(nd_recv, "regexp (receiver)");
+ LAST_NODE;
+ F_NODE(nd_value, "string (argument)");
+ break;
+
+ case NODE_MATCH3:
+ ANN("match expression (regexp second)");
+ ANN("format: [nd_recv] =~ [nd_value]");
+ ANN("example: 'foo' =~ /foo/");
+ F_NODE(nd_recv, "string (receiver)");
+ LAST_NODE;
+ F_NODE(nd_value, "regexp (argument)");
+ break;
+
+ case NODE_LIT:
+ ANN("literal");
+ ANN("format: [nd_lit]");
+ ANN("example: 1, /foo/");
+ goto lit;
+ case NODE_STR:
+ ANN("string literal");
+ ANN("format: [nd_lit]");
+ ANN("example: 'foo'");
+ goto lit;
+ case NODE_XSTR:
+ ANN("xstring literal");
+ ANN("format: [nd_lit]");
+ ANN("example: `foo`");
+ lit:
+ F_LIT(nd_lit, "literal");
+ break;
+
+ case NODE_DSTR:
+ ANN("string literal with interpolation");
+ ANN("format: [nd_lit]");
+ ANN("example: \"foo#{ bar }baz\"");
+ goto dlit;
+ case NODE_DXSTR:
+ ANN("xstring literal with interpolation");
+ ANN("format: [nd_lit]");
+ ANN("example: `foo#{ bar }baz`");
+ goto dlit;
+ case NODE_DREGX:
+ ANN("regexp literal with interpolation");
+ ANN("format: [nd_lit]");
+ ANN("example: /foo#{ bar }baz/");
+ goto dlit;
+ case NODE_DREGX_ONCE:
+ ANN("regexp literal with interpolation and once flag");
+ ANN("format: [nd_lit]");
+ ANN("example: /foo#{ bar }baz/o");
+ goto dlit;
+ case NODE_DSYM:
+ ANN("symbol literal with interpolation");
+ ANN("format: [nd_lit]");
+ ANN("example: :\"foo#{ bar }baz\"");
+ dlit:
+ F_LIT(nd_lit, "literal");
+ F_NODE(nd_next->nd_head, "preceding string");
+ LAST_NODE;
+ F_NODE(nd_next->nd_next, "interpolation");
+ break;
+
+ case NODE_EVSTR:
+ ANN("interpolation expression");
+ ANN("format: \"..#{ [nd_lit] }..\"");
+ ANN("example: \"foo#{ bar }baz\"");
+ LAST_NODE;
+ F_NODE(nd_body, "body");
+ break;
+
+ case NODE_ARGSCAT:
+ ANN("splat argument following arguments");
+ ANN("format: ..(*[nd_head], [nd_body..])");
+ ANN("example: foo(*ary, post_arg1, post_arg2)");
+ F_NODE(nd_head, "preceding array");
+ LAST_NODE;
+ F_NODE(nd_body, "following array");
+ break;
+
+ case NODE_ARGSPUSH:
+ ANN("splat argument following one argument");
+ ANN("format: ..(*[nd_head], [nd_body])");
+ ANN("example: foo(*ary, post_arg)");
+ F_NODE(nd_head, "preceding array");
+ LAST_NODE;
+ F_NODE(nd_body, "following element");
+ break;
+
+ case NODE_SPLAT:
+ ANN("splat argument");
+ ANN("format: *[nd_head]");
+ ANN("example: foo(*ary)");
+ LAST_NODE;
+ F_NODE(nd_head, "splat'ed array");
+ break;
+
+ case NODE_BLOCK_PASS:
+ ANN("arguments with block argument");
+ ANN("format: ..([nd_head], &[nd_body])");
+ ANN("example: foo(x, &blk)");
+ F_NODE(nd_head, "other arguments");
+ LAST_NODE;
+ F_NODE(nd_body, "block argument");
+ break;
+
+ case NODE_DEFN:
+ ANN("method definition");
+ ANN("format: def [nd_mid] [nd_defn]; end");
+ ANN("example; def foo; bar; end");
+ F_ID(nd_mid, "method name");
+ LAST_NODE;
+ F_NODE(nd_defn, "method definition");
+ break;
+
+ case NODE_DEFS:
+ ANN("singleton method definition");
+ ANN("format: def [nd_recv].[nd_mid] [nd_defn]; end");
+ ANN("example; def obj.foo; bar; end");
+ F_NODE(nd_recv, "receiver");
+ F_ID(nd_mid, "method name");
+ LAST_NODE;
+ F_NODE(nd_defn, "method definition");
+ break;
+
+ case NODE_ALIAS:
+ ANN("method alias statement");
+ ANN("format: alias [u1.node] [u2.node]");
+ ANN("example: alias bar foo");
+ F_NODE(u1.node, "new name");
+ LAST_NODE;
+ F_NODE(u2.node, "old name");
+ break;
+
+ case NODE_VALIAS:
+ ANN("global variable alias statement");
+ ANN("format: alias [u1.id](gvar) [u2.id](gvar)");
+ ANN("example: alias $y $x");
+ F_ID(u1.id, "new name");
+ F_ID(u2.id, "old name");
+ break;
+
+ case NODE_UNDEF:
+ ANN("method alias statement");
+ ANN("format: undef [u2.node]");
+ ANN("example: undef foo");
+ LAST_NODE;
+ F_NODE(u2.node, "old name");
+ break;
+
+ case NODE_CLASS:
+ ANN("class definition");
+ ANN("format: class [nd_cpath] < [nd_super]; [nd_body]; end");
+ ANN("example: class C2 < C; ..; end");
+ F_NODE(nd_cpath, "class path");
+ F_NODE(nd_super, "superclass");
+ LAST_NODE;
+ F_NODE(nd_body, "class definition");
+ break;
+
+ case NODE_MODULE:
+ ANN("module definition");
+ ANN("format: module [nd_cpath]; [nd_body]; end");
+ ANN("example: module M; ..; end");
+ F_NODE(nd_cpath, "module path");
+ LAST_NODE;
+ F_NODE(nd_body, "module definition");
+ break;
+
+ case NODE_SCLASS:
+ ANN("singleton class definition");
+ ANN("format: class << [nd_recv]; [nd_body]; end");
+ ANN("example: class << obj; ..; end");
+ F_NODE(nd_recv, "receiver");
+ LAST_NODE;
+ F_NODE(nd_body, "singleton class definition");
+ break;
+
+ case NODE_COLON2:
+ ANN("scoped constant reference");
+ ANN("format: [nd_head]::[nd_mid]");
+ ANN("example: M::C");
+ F_ID(nd_mid, "constant name");
+ LAST_NODE;
+ F_NODE(nd_head, "receiver");
+ break;
+
+ case NODE_COLON3:
+ ANN("top-level constant reference");
+ ANN("format: ::[nd_mid]");
+ ANN("example: ::Object");
+ F_ID(nd_mid, "constant name");
+ break;
+
+ case NODE_DOT2:
+ ANN("range constructor (incl.)");
+ ANN("format: [nd_beg]..[nd_end]");
+ ANN("example: 1..5");
+ goto dot;
+ case NODE_DOT3:
+ ANN("range constructor (excl.)");
+ ANN("format: [nd_beg]...[nd_end]");
+ ANN("example: 1...5");
+ goto dot;
+ case NODE_FLIP2:
+ ANN("flip-flop condition (incl.)");
+ ANN("format: [nd_beg]..[nd_end]");
+ ANN("example: if (x==1)..(x==5); foo; end");
+ goto dot;
+ case NODE_FLIP3:
+ ANN("flip-flop condition (excl.)");
+ ANN("format: [nd_beg]...[nd_end]");
+ ANN("example: if (x==1)...(x==5); foo; end");
+ dot:
+ F_NODE(nd_beg, "begin");
+ LAST_NODE;
+ F_NODE(nd_end, "end");
+ break;
+
+ case NODE_SELF:
+ ANN("self");
+ ANN("format: self");
+ ANN("example: self");
+ break;
+
+ case NODE_NIL:
+ ANN("nil");
+ ANN("format: nil");
+ ANN("example: nil");
+ break;
+
+ case NODE_TRUE:
+ ANN("true");
+ ANN("format: true");
+ ANN("example: true");
+ break;
+
+ case NODE_FALSE:
+ ANN("false");
+ ANN("format: false");
+ ANN("example: false");
+ break;
+
+ case NODE_ERRINFO:
+ ANN("virtual reference to $!");
+ ANN("format: rescue => id");
+ ANN("example: rescue => id");
+ break;
+
+ case NODE_DEFINED:
+ ANN("defined? expression");
+ ANN("format: defined?([nd_head])");
+ ANN("example: defined?(foo)");
+ F_NODE(nd_head, "expr");
+ break;
+
+ case NODE_POSTEXE:
+ ANN("post-execution");
+ ANN("format: END { [nd_body] }");
+ ANN("example: END { foo }");
+ LAST_NODE;
+ F_NODE(nd_body, "END clause");
+ break;
+
+ case NODE_ATTRASGN:
+ ANN("attr assignment");
+ ANN("format: [nd_recv].[nd_mid] = [nd_args]");
+ ANN("example: struct.field = foo");
+ if (node->nd_recv == (NODE *) 1) {
+ F_MSG(nd_recv, "receiver", "1 (self)");
+ }
+ else {
+ F_NODE(nd_recv, "receiver");
+ }
+ F_ID(nd_mid, "method name");
+ LAST_NODE;
+ F_NODE(nd_args, "arguments");
+ break;
+
+ case NODE_PRELUDE:
+ ANN("pre-execution");
+ ANN("format: BEGIN { [nd_head] }; [nd_body]");
+ ANN("example: bar; BEGIN { foo }");
+ F_NODE(nd_head, "prelude");
+ LAST_NODE;
+ F_NODE(nd_body, "body");
+ break;
+
+ case NODE_LAMBDA:
+ ANN("lambda expression");
+ ANN("format: -> [nd_body]");
+ ANN("example: -> { foo }");
+ LAST_NODE;
+ F_NODE(nd_body, "lambda clause");
+ break;
+
+ case NODE_OPT_ARG:
+ ANN("optional arguments");
+ ANN("format: def method_name([nd_body=some], [nd_next..])");
+ ANN("example: def foo(a, b=1, c); end");
+ F_NODE(nd_body, "body");
+ LAST_NODE;
+ F_NODE(nd_next, "next");
+ break;
+
+ case NODE_POSTARG:
+ ANN("post arguments");
+ ANN("format: *[nd_1st], [nd_2nd..] = ..");
+ ANN("example: a, *rest, z = foo");
+ if ((VALUE)node->nd_1st != (VALUE)-1) {
+ F_NODE(nd_1st, "rest argument");
+ }
+ else {
+ F_MSG(nd_1st, "rest argument", "-1 (rest argument without name)");
+ }
+ LAST_NODE;
+ F_NODE(nd_2nd, "post arguments");
+ break;
+
+ case NODE_ARGS_AUX:
+ ANN("method parameters (cont'd)");
+ F_CUSTOM1(nd_rest, "rest argument", {
+ if (node->nd_rest == 1) A("nil (with last comma)");
+ else A_ID(node->nd_rest);
+ });
+ F_CUSTOM1(nd_body, "block argument", { A_ID((ID)node->nd_body); });
+ LAST_NODE;
+ F_CUSTOM2(nd_next, "aux info 2", {
+ node = node->nd_next;
+ next_indent = "| ";
+ if (!node) {
+ D_NULL_NODE;
+ }
+ else {
+ D_NODE_HEADER(node);
+ ANN("method parameters (cont'd)");
+ F_ID(nd_pid, "first post argument");
+ F_LONG(nd_plen, "post argument length");
+ LAST_NODE;
+ F_CUSTOM2(nd_next, "aux info 3", {
+ node = node->nd_next;
+ next_indent = "| ";
+ if (!node) {
+ D_NULL_NODE;
+ }
+ else {
+ D_NODE_HEADER(node);
+ ANN("method parameters (cont'd)");
+ F_NODE(nd_1st, "init arguments (m)");
+ LAST_NODE;
+ F_NODE(nd_2nd, "init arguments (p)");
+ }
+ });
+ }
+ });
+ break;
+
+ case NODE_ARGS:
+ ANN("method parameters");
+ ANN("format: def method_name(.., [nd_opt=some], *[nd_rest], [nd_pid], .., &[nd_body])");
+ ANN("example: def foo(a, b, opt1=1, opt2=2, *rest, y, z, &blk); end");
+ F_LONG(nd_frml, "argc");
+ F_NODE(nd_next, "aux info 1");
+ LAST_NODE;
+ F_NODE(nd_opt, "optional arguments");
+ break;
+
+ case NODE_SCOPE:
+ ANN("new scope");
+ ANN("format: [nd_tbl]: local table, [nd_args]: arguments, [nd_body]: body");
+ F_CUSTOM1(nd_tbl, "local table", {
+ ID *tbl = node->nd_tbl;
+ int i;
+ int size = tbl ? (int)*tbl++ : 0;
+ if (size == 0) A("(empty)");
+ for (i = 0; i < size; i++) {
+ A_ID(tbl[i]); if (i < size - 1) A(",");
+ }
+ });
+ F_NODE(nd_args, "arguments");
+ LAST_NODE;
+ F_NODE(nd_body, "body");
+ break;
+
+ default:
+ rb_bug("dump_node: unknown node: %s", ruby_node_name(nd_type(node)));
+ }
+}
+
+VALUE
+rb_parser_dump_tree(NODE *node, int comment)
+{
+ VALUE buf = rb_str_new_cstr(
+ "###########################################################\n"
+ "## Do NOT use this node dump for any purpose other than ##\n"
+ "## debug and research. Compatibility is not guaranteed. ##\n"
+ "###########################################################\n\n"
+ );
+ dump_node(buf, rb_str_new_cstr("# "), comment, node);
+ return buf;
+}
diff --git a/node.h b/node.h
index c0fb774bc6..4eb3ded7a2 100644
--- a/node.h
+++ b/node.h
@@ -262,6 +262,7 @@ typedef struct RNode {
/* 0..4:T_TYPES, 5:FL_MARK, 6:reserved, 7:NODE_FL_NEWLINE */
#define NODE_FL_NEWLINE (((VALUE)1)<<7)
+#define NODE_FL_CREF_PUSHED_BY_EVAL NODE_FL_NEWLINE
#define NODE_TYPESHIFT 8
#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
diff --git a/numeric.c b/numeric.c
index c602b83c07..fa77225c43 100644
--- a/numeric.c
+++ b/numeric.c
@@ -63,6 +63,20 @@
#define DBL_EPSILON 2.2204460492503131e-16
#endif
+#ifdef HAVE_INFINITY
+#elif BYTE_ORDER == LITTLE_ENDIAN
+const unsigned char rb_infinity[] = "\x00\x00\x80\x7f";
+#else
+const unsigned char rb_infinity[] = "\x7f\x80\x00\x00";
+#endif
+
+#ifdef HAVE_NAN
+#elif BYTE_ORDER == LITTLE_ENDIAN
+const unsigned char rb_nan[] = "\x00\x00\xc0\x7f";
+#else
+const unsigned char rb_nan[] = "\x7f\xc0\x00\x00";
+#endif
+
extern double round(double);
#ifndef HAVE_ROUND
@@ -544,7 +558,7 @@ flo_to_s(VALUE flt)
if (isinf(value))
return rb_usascii_str_new2(value < 0 ? "-Infinity" : "Infinity");
- else if(isnan(value))
+ else if (isnan(value))
return rb_usascii_str_new2("NaN");
# define FLOFMT(buf, size, fmt, prec, val) snprintf(buf, size, fmt, prec, val), \
@@ -615,7 +629,7 @@ flo_plus(VALUE x, VALUE y)
/*
* call-seq:
- * float + other -> float
+ * float - other -> float
*
* Returns a new float which is the difference of <code>float</code>
* and <code>other</code>.
@@ -896,7 +910,7 @@ flo_eq(VALUE x, VALUE y)
switch (TYPE(y)) {
case T_FIXNUM:
- b = FIX2LONG(y);
+ b = (double)FIX2LONG(y);
break;
case T_BIGNUM:
b = rb_big2dbl(y);
@@ -934,7 +948,7 @@ flo_hash(VALUE num)
/* normalize -0.0 to 0.0 */
if (d == 0.0) d = 0.0;
hash = rb_memhash(&d, sizeof(d));
- return INT2FIX(hash);
+ return LONG2FIX(hash);
}
VALUE
@@ -1348,10 +1362,28 @@ flo_ceil(VALUE num)
*
* Rounds <i>flt</i> to a given precision in decimal digits (default 0 digits).
* Precision may be negative. Returns a floating point number when ndigits
- * is more than one.
+ * is more than zero.
*
+ * 1.4.round #=> 1
* 1.5.round #=> 2
+ * 1.6.round #=> 2
* (-1.5).round #=> -2
+ *
+ * 1.234567.round(2) #=> 1.23
+ * 1.234567.round(3) #=> 1.235
+ * 1.234567.round(4) #=> 1.2346
+ * 1.234567.round(5) #=> 1.23457
+ *
+ * 34567.89.round(-5) #=> 0
+ * 34567.89.round(-4) #=> 30000
+ * 34567.89.round(-3) #=> 35000
+ * 34567.89.round(-2) #=> 34600
+ * 34567.89.round(-1) #=> 34570
+ * 34567.89.round(0) #=> 34568
+ * 34567.89.round(1) #=> 34567.9
+ * 34567.89.round(2) #=> 34567.89
+ * 34567.89.round(3) #=> 34567.89
+ *
*/
static VALUE
@@ -1462,7 +1494,7 @@ num_ceil(VALUE num)
*
* Rounds <i>num</i> to a given precision in decimal digits (default 0 digits).
* Precision may be negative. Returns a floating point number when ndigits
- * is more than one. <code>Numeric</code> implements this by converting itself
+ * is more than zero. <code>Numeric</code> implements this by converting itself
* to a <code>Float</code> and invoking <code>Float#round</code>.
*/
@@ -1953,7 +1985,7 @@ int_chr(int argc, VALUE *argv, VALUE num)
{
char c;
int n;
- long i = NUM2LONG(num);
+ SIGNED_VALUE i = NUM2LONG(num);
rb_encoding *enc;
VALUE str;
@@ -1984,8 +2016,8 @@ int_chr(int argc, VALUE *argv, VALUE num)
enc = rb_to_encoding(argv[0]);
if (!enc) enc = rb_ascii8bit_encoding();
decode:
-#if SIZEOF_INT < SIZEOF_LONG
- if (i > INT_MAX) goto out_of_range;
+#if SIZEOF_INT < SIZEOF_VALUE
+ if (i > UINT_MAX) goto out_of_range;
#endif
if (i < 0 || (n = rb_enc_codelen((int)i, enc)) <= 0) goto out_of_range;
str = rb_enc_str_new(0, n, enc);
@@ -2459,8 +2491,6 @@ int_pow(long x, unsigned long y)
return LONG2NUM(z);
}
-#define infinite_value() ruby_div0(1.0)
-
/*
* call-seq:
* fix ** numeric -> numeric_result
@@ -2488,7 +2518,7 @@ fix_pow(VALUE x, VALUE y)
if (b == 1) return x;
if (a == 0) {
if (b > 0) return INT2FIX(0);
- return DBL2NUM(infinite_value());
+ return DBL2NUM(INFINITY);
}
if (a == 1) return INT2FIX(1);
if (a == -1) {
@@ -2516,7 +2546,7 @@ fix_pow(VALUE x, VALUE y)
case T_FLOAT:
if (RFLOAT_VALUE(y) == 0.0) return DBL2NUM(1.0);
if (a == 0) {
- return DBL2NUM(RFLOAT_VALUE(y) < 0 ? infinite_value() : 0.0);
+ return DBL2NUM(RFLOAT_VALUE(y) < 0 ? INFINITY : 0.0);
}
if (a == 1) return DBL2NUM(1.0);
{
@@ -3301,6 +3331,8 @@ InitVM_Numeric(void)
rb_define_const(rb_cFloat, "MIN", DBL2NUM(DBL_MIN));
rb_define_const(rb_cFloat, "MAX", DBL2NUM(DBL_MAX));
rb_define_const(rb_cFloat, "EPSILON", DBL2NUM(DBL_EPSILON));
+ rb_define_const(rb_cFloat, "INFINITY", DBL2NUM(INFINITY));
+ rb_define_const(rb_cFloat, "NAN", DBL2NUM(NAN));
rb_define_method(rb_cFloat, "to_s", flo_to_s, 0);
rb_define_method(rb_cFloat, "coerce", flo_coerce, 1);
diff --git a/object.c b/object.c
index 10315598d5..b67102a640 100644
--- a/object.c
+++ b/object.c
@@ -22,7 +22,8 @@
#include <math.h>
#include <float.h>
-static ID id_eq, id_eql, id_match, id_inspect, id_init_copy;
+static ID id_eq, id_eql, id_match, id_inspect;
+static ID id_init_copy, id_init_clone, id_init_dup;
/*
* call-seq:
@@ -195,7 +196,6 @@ init_copy(VALUE dest, VALUE obj)
}
break;
}
- rb_funcall(dest, id_init_copy, 1, obj);
}
/*
@@ -234,6 +234,7 @@ rb_obj_clone(VALUE obj)
RBASIC(clone)->klass = rb_singleton_class_clone(obj);
RBASIC(clone)->flags = (RBASIC(obj)->flags | FL_TEST(clone, FL_TAINT) | FL_TEST(clone, FL_UNTRUSTED)) & ~(FL_FREEZE|FL_FINALIZE);
init_copy(clone, obj);
+ rb_funcall(clone, id_init_clone, 1, obj);
RBASIC(clone)->flags |= RBASIC(obj)->flags & FL_FREEZE;
return clone;
@@ -267,6 +268,7 @@ rb_obj_dup(VALUE obj)
}
dup = rb_obj_alloc(rb_obj_class(obj));
init_copy(dup, obj);
+ rb_funcall(dup, id_init_dup, 1, obj);
return dup;
}
@@ -283,6 +285,14 @@ rb_obj_init_copy(VALUE obj, VALUE orig)
return obj;
}
+/* :nodoc: */
+VALUE
+rb_obj_init_dup_clone(VALUE obj, VALUE orig)
+{
+ rb_funcall(obj, id_init_copy, 1, orig);
+ return obj;
+}
+
/*
* call-seq:
* obj.to_s => string
@@ -624,6 +634,14 @@ rb_obj_tap(VALUE obj)
* end
*/
+/*
+ * Document-method: initialize
+ *
+ * call-seq:
+ * BasicObject.new( *args )
+ *
+ * Returns a new BasicObject. Arguments are ignored.
+ */
/*
* Not documented
@@ -1120,7 +1138,7 @@ rb_obj_not_match(VALUE obj1, VALUE obj2)
static VALUE
rb_obj_cmp(VALUE obj1, VALUE obj2)
{
- if (obj1 == obj2 || rb_obj_equal(obj1, obj2))
+ if (obj1 == obj2 || rb_equal(obj1, obj2))
return INT2FIX(0);
return Qnil;
}
@@ -1416,7 +1434,7 @@ rb_class_initialize(int argc, VALUE *argv, VALUE klass)
{
VALUE super;
- if (RCLASS_SUPER(klass) != 0) {
+ if (RCLASS_SUPER(klass) != 0 || klass == rb_cBasicObject) {
rb_raise(rb_eTypeError, "already initialized class");
}
if (argc == 0) {
@@ -2539,6 +2557,8 @@ Init_Object(void)
id_match = rb_intern("=~");
id_inspect = rb_intern("inspect");
id_init_copy = rb_intern("initialize_copy");
+ id_init_clone = rb_intern("initialize_clone");
+ id_init_dup = rb_intern("initialize_dup");
for (i=0; conv_method_names[i].method; i++) {
conv_method_names[i].id = rb_intern(conv_method_names[i].method);
@@ -2552,7 +2572,7 @@ InitVM_Object(void)
InitVM_class_hierarchy();
- rb_define_private_method(rb_cBasicObject, "initialize", rb_obj_dummy, 0);
+ rb_define_private_method(rb_cBasicObject, "initialize", rb_obj_dummy, -1);
rb_define_alloc_func(rb_cBasicObject, rb_class_allocate_instance);
rb_define_method(rb_cBasicObject, "==", rb_obj_equal, 1);
rb_define_method(rb_cBasicObject, "equal?", rb_obj_equal, 1);
@@ -2584,6 +2604,8 @@ InitVM_Object(void)
rb_define_method(rb_mKernel, "clone", rb_obj_clone, 0);
rb_define_method(rb_mKernel, "dup", rb_obj_dup, 0);
rb_define_method(rb_mKernel, "initialize_copy", rb_obj_init_copy, 1);
+ rb_define_method(rb_mKernel, "initialize_dup", rb_obj_init_dup_clone, 1);
+ rb_define_method(rb_mKernel, "initialize_clone", rb_obj_init_dup_clone, 1);
rb_define_method(rb_mKernel, "taint", rb_obj_taint, 0);
rb_define_method(rb_mKernel, "tainted?", rb_obj_tainted, 0);
diff --git a/parse.y b/parse.y
index 98f90c7ea7..ed0e0c162d 100644
--- a/parse.y
+++ b/parse.y
@@ -456,10 +456,10 @@ static int local_id_gen(struct parser_params*, ID);
static ID internal_id_gen(struct parser_params*);
#define internal_id() internal_id_gen(parser)
-static void dyna_push_gen(struct parser_params*);
+static const struct vtable *dyna_push_gen(struct parser_params *);
#define dyna_push() dyna_push_gen(parser)
-static void dyna_pop_gen(struct parser_params*);
-#define dyna_pop() dyna_pop_gen(parser)
+static void dyna_pop_gen(struct parser_params*, const struct vtable *);
+#define dyna_pop(node) dyna_pop_gen(parser, node)
static int dyna_in_block_gen(struct parser_params*);
#define dyna_in_block() dyna_in_block_gen(parser)
#define dyna_var(id) local_var(id)
@@ -622,6 +622,7 @@ static void token_info_pop(struct parser_params*, const char *token);
NODE *node;
ID id;
int num;
+ const struct vtable *vars;
}
/*%%%*/
@@ -688,6 +689,7 @@ static void token_info_pop(struct parser_params*, const char *token);
%type <node> string_contents xstring_contents string_content
%type <node> words qwords word_list qword_list word
%type <node> literal numeric dsym cpath
+%type <node> top_compstmt top_stmts top_stmt
%type <node> bodystmt compstmt stmts stmt expr arg primary command command_call method_call
%type <node> expr_value arg_value primary_value
%type <node> if_tail opt_else case_body cases opt_rescue exc_list exc_var opt_ensure
@@ -790,7 +792,7 @@ program : {
local_push(0);
%*/
}
- compstmt
+ top_compstmt
{
/*%%%*/
if ($2 && !$<num>1) {
@@ -813,6 +815,73 @@ program : {
}
;
+top_compstmt : top_stmts opt_terms
+ {
+ /*%%%*/
+ void_stmts($1);
+ fixup_nodes(&deferred_nodes);
+ /*%
+ %*/
+ $$ = $1;
+ }
+ ;
+
+top_stmts : none
+ {
+ /*%%%*/
+ $$ = NEW_BEGIN(0);
+ /*%
+ $$ = dispatch2(stmts_add, dispatch0(stmts_new),
+ dispatch0(void_stmt));
+ %*/
+ }
+ | top_stmt
+ {
+ /*%%%*/
+ $$ = newline_node($1);
+ /*%
+ $$ = dispatch2(stmts_add, dispatch0(stmts_new), $1);
+ %*/
+ }
+ | top_stmts terms top_stmt
+ {
+ /*%%%*/
+ $$ = block_append($1, newline_node($3));
+ /*%
+ $$ = dispatch2(stmts_add, $1, $3);
+ %*/
+ }
+ | error top_stmt
+ {
+ $$ = remove_begin($2);
+ }
+ ;
+
+top_stmt : stmt
+ | keyword_BEGIN
+ {
+ if (in_def || in_single) {
+ yyerror("BEGIN in method");
+ }
+ /*%%%*/
+ /* local_push(0); */
+ /*%
+ %*/
+ }
+ '{' top_compstmt '}'
+ {
+ /*%%%*/
+ ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
+ $4);
+ /* NEW_PREEXE($4)); */
+ /* local_pop(); */
+ $$ = NEW_BEGIN(0);
+ /*%
+ $$ = dispatch1(BEGIN, $4);
+ %*/
+ }
+ ;
+
bodystmt : compstmt
opt_rescue
opt_else
@@ -986,25 +1055,6 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem
$$ = dispatch2(rescue_mod, $3, $1);
%*/
}
- | keyword_BEGIN
- {
- if (in_def || in_single) {
- yyerror("BEGIN in method");
- }
- /* local_push(0); */
- }
- '{' compstmt '}'
- {
- /*%%%*/
- ruby_eval_tree_begin = block_append(ruby_eval_tree_begin,
- $4);
- /* NEW_PREEXE($4)); */
- $$ = NEW_BEGIN(0);
- /*%
- $$ = dispatch1(BEGIN, $4);
- %*/
- /* local_pop(); */
- }
| keyword_END '{' compstmt '}'
{
if (in_def || in_single) {
@@ -1257,7 +1307,7 @@ block_command : block_call
cmd_brace_block : tLBRACE_ARG
{
- dyna_push();
+ $<vars>1 = dyna_push();
/*%%%*/
$<num>$ = ruby_sourceline;
/*%
@@ -1273,7 +1323,7 @@ cmd_brace_block : tLBRACE_ARG
/*%
$$ = dispatch2(brace_block, escape_Qundef($3), $4);
%*/
- dyna_pop();
+ dyna_pop($<vars>1);
}
;
@@ -2904,7 +2954,7 @@ primary : literal
NODE *body = remove_begin($5);
reduce_nodes(&body);
$$ = NEW_DEFN($2, $4, body, NOEX_PRIVATE);
- fixpos($$, $4);
+ nd_set_line($$, $<num>1);
/*%
$$ = dispatch3(def, $2, $4, $5);
%*/
@@ -2926,7 +2976,7 @@ primary : literal
NODE *body = remove_begin($8);
reduce_nodes(&body);
$$ = NEW_DEFS($2, $5, $7, body);
- fixpos($$, $2);
+ nd_set_line($$, $<num>1);
/*%
$$ = dispatch5(defs, $2, $3, $5, $7, $8);
%*/
@@ -3036,6 +3086,10 @@ k_module : keyword_module
k_def : keyword_def
{
token_info_push("def");
+ /*%%%*/
+ $<num>$ = ruby_sourceline;
+ /*%
+ %*/
}
;
@@ -3413,21 +3467,23 @@ bvar : tIDENTIFIER
;
lambda : {
- dyna_push();
+ $<vars>$ = dyna_push();
+ }
+ {
$<num>$ = lpar_beg;
lpar_beg = ++paren_nest;
}
f_larglist
lambda_body
{
- lpar_beg = $<num>1;
+ lpar_beg = $<num>2;
/*%%%*/
- $$ = $2;
- $$->nd_body = NEW_SCOPE($2->nd_head, $3);
+ $$ = $3;
+ $$->nd_body = NEW_SCOPE($3->nd_head, $4);
/*%
- $$ = dispatch2(lambda, $2, $3);
+ $$ = dispatch2(lambda, $3, $4);
%*/
- dyna_pop();
+ dyna_pop($<vars>1);
}
;
@@ -3461,7 +3517,7 @@ lambda_body : tLAMBEG compstmt '}'
do_block : keyword_do_block
{
- dyna_push();
+ $<vars>1 = dyna_push();
/*%%%*/
$<num>$ = ruby_sourceline;
/*% %*/
@@ -3476,7 +3532,7 @@ do_block : keyword_do_block
/*%
$$ = dispatch2(do_block, escape_Qundef($3), $4);
%*/
- dyna_pop();
+ dyna_pop($<vars>1);
}
;
@@ -3607,7 +3663,7 @@ method_call : operation paren_args
brace_block : '{'
{
- dyna_push();
+ $<vars>1 = dyna_push();
/*%%%*/
$<num>$ = ruby_sourceline;
/*%
@@ -3622,11 +3678,11 @@ brace_block : '{'
/*%
$$ = dispatch2(brace_block, escape_Qundef($3), $4);
%*/
- dyna_pop();
+ dyna_pop($<vars>1);
}
| keyword_do
{
- dyna_push();
+ $<vars>1 = dyna_push();
/*%%%*/
$<num>$ = ruby_sourceline;
/*%
@@ -3641,7 +3697,7 @@ brace_block : '{'
/*%
$$ = dispatch2(do_block, escape_Qundef($3), $4);
%*/
- dyna_pop();
+ dyna_pop($<vars>1);
}
;
@@ -6905,6 +6961,7 @@ parser_yylex(struct parser_params *parser)
c = nextc();
}
if (c == '0') {
+#define no_digits() do {yyerror("numeric literal without digits"); return 0;} while (0)
int start = toklen();
c = nextc();
if (c == 'x' || c == 'X') {
@@ -6925,7 +6982,7 @@ parser_yylex(struct parser_params *parser)
pushback(c);
tokfix();
if (toklen() == start) {
- yyerror("numeric literal without digits");
+ no_digits();
}
else if (nondigit) goto trailing_uc;
set_yylval_literal(rb_cstr_to_inum(tok(), 16, FALSE));
@@ -6949,7 +7006,7 @@ parser_yylex(struct parser_params *parser)
pushback(c);
tokfix();
if (toklen() == start) {
- yyerror("numeric literal without digits");
+ no_digits();
}
else if (nondigit) goto trailing_uc;
set_yylval_literal(rb_cstr_to_inum(tok(), 2, FALSE));
@@ -6973,7 +7030,7 @@ parser_yylex(struct parser_params *parser)
pushback(c);
tokfix();
if (toklen() == start) {
- yyerror("numeric literal without digits");
+ no_digits();
}
else if (nondigit) goto trailing_uc;
set_yylval_literal(rb_cstr_to_inum(tok(), 10, FALSE));
@@ -6987,7 +7044,7 @@ parser_yylex(struct parser_params *parser)
/* prefixed octal */
c = nextc();
if (c == -1 || c == '_' || !ISDIGIT(c)) {
- yyerror("numeric literal without digits");
+ no_digits();
}
}
if (c >= '0' && c <= '7') {
@@ -8878,15 +8935,16 @@ local_id_gen(struct parser_params *parser, ID id)
}
}
-static void
+static const struct vtable *
dyna_push_gen(struct parser_params *parser)
{
lvtbl->args = vtable_alloc(lvtbl->args);
lvtbl->vars = vtable_alloc(lvtbl->vars);
+ return lvtbl->args;
}
static void
-dyna_pop_gen(struct parser_params *parser)
+dyna_pop_1(struct parser_params *parser)
{
struct vtable *tmp;
@@ -8898,6 +8956,20 @@ dyna_pop_gen(struct parser_params *parser)
vtable_free(tmp);
}
+static void
+dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
+{
+ while (lvtbl->args != lvargs) {
+ dyna_pop_1(parser);
+ if (!lvtbl->args) {
+ struct local_vars *local = lvtbl->prev;
+ xfree(lvtbl);
+ lvtbl = local;
+ }
+ }
+ dyna_pop_1(parser);
+}
+
static int
dyna_in_block_gen(struct parser_params *parser)
{
diff --git a/prelude.rb b/prelude.rb
index a9e9e3c23e..679e831ca4 100644
--- a/prelude.rb
+++ b/prelude.rb
@@ -32,7 +32,7 @@ module Kernel
if /\A\((.*)\)/ =~ file # eval, etc.
raise LoadError, "require_relative is called in #{$1}"
end
- absolute_feature = File.expand_path(File.join(File.dirname(file), relative_feature))
+ absolute_feature = File.join(File.dirname(File.realpath(file)), relative_feature)
require absolute_feature
end
end
diff --git a/proc.c b/proc.c
index c52eb30e01..f966f1cf11 100644
--- a/proc.c
+++ b/proc.c
@@ -889,6 +889,7 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope)
struct METHOD *data;
rb_method_entry_t *me, meb;
rb_method_definition_t *def = 0;
+ rb_method_flag_t flag = NOEX_UNDEF;
again:
me = rb_method_entry(klass, id);
@@ -916,8 +917,11 @@ mnew(VALUE klass, VALUE obj, ID id, VALUE mclass, int scope)
rb_print_undef(klass, id, 0);
}
def = me->def;
- if (scope && (me->flag & NOEX_MASK) != NOEX_PUBLIC) {
- rb_print_undef(rclass, def->original_id, (int)(me->flag & NOEX_MASK));
+ if (flag == NOEX_UNDEF) {
+ flag = me->flag;
+ if (scope && (flag & NOEX_MASK) != NOEX_PUBLIC) {
+ rb_print_undef(rclass, def->original_id, (int)(flag & NOEX_MASK));
+ }
}
if (def && def->type == VM_METHOD_TYPE_ZSUPER) {
klass = RCLASS_SUPER(me->klass);
@@ -1165,17 +1169,16 @@ rb_obj_public_method(VALUE obj, VALUE vid)
* def do_e() print "!\n"; end
* def do_v() print "Dave"; end
* Dispatcher = {
- * ?a => instance_method(:do_a),
- * ?d => instance_method(:do_d),
- * ?e => instance_method(:do_e),
- * ?v => instance_method(:do_v)
+ * "a" => instance_method(:do_a),
+ * "d" => instance_method(:do_d),
+ * "e" => instance_method(:do_e),
+ * "v" => instance_method(:do_v)
* }
* def interpret(string)
- * string.each_byte {|b| Dispatcher[b].bind(self).call }
+ * string.each_char {|b| Dispatcher[b].bind(self).call }
* end
* end
*
- *
* interpreter = Interpreter.new
* interpreter.interpret('dave')
*
diff --git a/process.c b/process.c
index 19c6e0a6ba..4aa8752115 100644
--- a/process.c
+++ b/process.c
@@ -1857,6 +1857,8 @@ save_redirect_fd(int fd, VALUE save, char *errmsg, size_t errmsg_buflen)
VALUE newary;
int save_fd = redirect_dup(fd);
if (save_fd == -1) {
+ if (errno == EBADF)
+ return 0;
ERRMSG("dup");
return -1;
}
@@ -2608,6 +2610,8 @@ rb_fork(int *status, int (*chfunc)(void*), void *charg, VALUE fds)
*
* The thread calling fork is the only thread in the created child process.
* fork doesn't copy other threads.
+ *
+ * If fork is not usable, Process.respond_to?(:fork) returns false.
*/
static VALUE
diff --git a/random.c b/random.c
index e096d67c3b..78693f0f09 100644
--- a/random.c
+++ b/random.c
@@ -473,9 +473,6 @@ fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT])
#ifdef O_NOCTTY
|O_NOCTTY
#endif
-#ifdef O_NOFOLLOW
- |O_NOFOLLOW
-#endif
)) >= 0) {
if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {
(void)read(fd, seed, DEFAULT_SEED_LEN);
diff --git a/re.c b/re.c
index f7bd5f4323..19154e1e5d 100644
--- a/re.c
+++ b/re.c
@@ -111,7 +111,7 @@ rb_memsearch_ss(const unsigned char *xs, long m, const unsigned char *ys, long n
if (m > SIZEOF_VALUE)
rb_bug("!!too long pattern string!!");
- /* Prepare hash value */
+ /* Prepare hash value */
for (hx = *x++, hy = *y++; x < xe; ++x, ++y) {
hx <<= CHAR_BIT;
hy <<= CHAR_BIT;
@@ -354,7 +354,7 @@ rb_reg_expr_str(VALUE str, const char *s, long len)
}
else if (c == -1) {
int l = mbclen(p, pend, enc);
- rb_str_buf_cat(str, p, l);
+ rb_str_buf_cat(str, p, l);
p += l;
continue;
}
@@ -524,9 +524,9 @@ rb_reg_to_s(VALUE re)
rb_enc_get(re),
OnigDefaultSyntax);
if (r == 0) {
- ++ptr;
- len -= 2;
- err = (onig_compile(rp, ptr, ptr + len, NULL, NULL, 0) != 0);
+ ++ptr;
+ len -= 2;
+ err = (onig_compile(rp, ptr, ptr + len, NULL, NULL, 0) != 0);
}
onig_free(rp);
}
@@ -1653,33 +1653,33 @@ match_aref(int argc, VALUE *argv, VALUE match)
rb_scan_args(argc, argv, "11", &idx, &rest);
if (NIL_P(rest)) {
- if (FIXNUM_P(idx)) {
- if (FIX2INT(idx) >= 0) {
- return rb_reg_nth_match(FIX2INT(idx), match);
- }
- }
- else {
- const char *p;
- int num;
-
- switch (TYPE(idx)) {
- case T_SYMBOL:
- p = rb_id2name(SYM2ID(idx));
- goto name_to_backref;
- break;
- case T_STRING:
- p = StringValuePtr(idx);
-
- name_to_backref:
- num = name_to_backref_number(RMATCH_REGS(match),
- RMATCH(match)->regexp, p, p + strlen(p));
- return rb_reg_nth_match(num, match);
- break;
-
- default:
- break;
- }
- }
+ if (FIXNUM_P(idx)) {
+ if (FIX2INT(idx) >= 0) {
+ return rb_reg_nth_match(FIX2INT(idx), match);
+ }
+ }
+ else {
+ const char *p;
+ int num;
+
+ switch (TYPE(idx)) {
+ case T_SYMBOL:
+ p = rb_id2name(SYM2ID(idx));
+ goto name_to_backref;
+ break;
+ case T_STRING:
+ p = StringValuePtr(idx);
+
+ name_to_backref:
+ num = name_to_backref_number(RMATCH_REGS(match),
+ RMATCH(match)->regexp, p, p + strlen(p));
+ return rb_reg_nth_match(num, match);
+ break;
+
+ default:
+ break;
+ }
+ }
}
return rb_ary_aref(argc, argv, match_to_a(match));
@@ -2413,9 +2413,20 @@ rb_reg_s_alloc(VALUE klass)
}
VALUE
+rb_reg_alloc(void)
+{
+ return rb_reg_s_alloc(rb_cRegexp);
+}
+
+VALUE
rb_reg_new_str(VALUE s, int options)
{
- VALUE re = rb_reg_s_alloc(rb_cRegexp);
+ return rb_reg_init_str(rb_reg_alloc(), s, options);
+}
+
+VALUE
+rb_reg_init_str(VALUE re, VALUE s, int options)
+{
onig_errmsg_buffer err = "";
if (rb_reg_initialize_str(re, s, options, err, NULL, 0) != 0) {
@@ -2434,7 +2445,7 @@ rb_reg_new_ary(VALUE ary, int opt)
VALUE
rb_enc_reg_new(const char *s, long len, rb_encoding *enc, int options)
{
- VALUE re = rb_reg_s_alloc(rb_cRegexp);
+ VALUE re = rb_reg_alloc();
onig_errmsg_buffer err = "";
if (rb_reg_initialize(re, s, len, enc, options, err, NULL, 0) != 0) {
@@ -2453,7 +2464,7 @@ rb_reg_new(const char *s, long len, int options)
VALUE
rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
{
- VALUE re = rb_reg_s_alloc(rb_cRegexp);
+ VALUE re = rb_reg_alloc();
onig_errmsg_buffer err = "";
if (!str) str = rb_str_new(0,0);
diff --git a/regcomp.c b/regcomp.c
index caf7d69a1e..e1ac7ee85c 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4792,7 +4792,7 @@ optimize_node_left(Node* node, NodeOptInfo* opt, OptEnv* env)
copy_node_opt_info(opt, &nopt);
if (nopt.exb.len > 0) {
if (nopt.exb.reach_end) {
- for (i = 2; i < qn->lower &&
+ for (i = 2; i <= qn->lower &&
! is_full_opt_exact_info(&opt->exb); i++) {
concat_opt_exact_info(&opt->exb, &nopt.exb, env->enc);
}
@@ -5046,7 +5046,7 @@ static void print_enc_string(FILE* fp, OnigEncoding enc,
fputc((int )code, fp);
}
- p += enclen(enc, p);
+ p += enclen(enc, p, end);
}
}
else {
@@ -5357,7 +5357,7 @@ onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end,
int r, init_size;
Node* root;
- ScanEnv scan_env;
+ ScanEnv scan_env = {0};
#ifdef USE_SUBEXP_CALL
UnsetAddrList uslist;
#endif
@@ -5885,7 +5885,7 @@ p_len_string(FILE* f, LengthType len, int mb_len, UChar* s)
}
extern void
-onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp,
+onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar* bpend, UChar** nextp,
OnigEncoding enc)
{
int i, n, arg_type;
@@ -5984,7 +5984,7 @@ onig_print_compiled_byte_code(FILE* f, UChar* bp, UChar** nextp,
break;
case OP_EXACT1_IC:
- len = enclen(enc, bp);
+ len = enclen(enc, bp, bpend);
p_string(f, len, bp);
bp += len;
break;
@@ -6146,7 +6146,7 @@ print_compiled_byte_code_list(FILE* f, regex_t* reg)
else
fputs(" ", f);
}
- onig_print_compiled_byte_code(f, bp, &bp, reg->enc);
+ onig_print_compiled_byte_code(f, bp, end, &bp, reg->enc);
}
fprintf(f, "\n");
diff --git a/regerror.c b/regerror.c
index a9d0eb647d..3c8b7371c2 100644
--- a/regerror.c
+++ b/regerror.c
@@ -205,17 +205,17 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
while (p < end) {
code = ONIGENC_MBC_TO_CODE(enc, p, end);
if (code >= 0x80) {
- if (code > 0xffff && len + 10 <= buf_size) {
- sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24));
- sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16));
- sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8));
- sprint_byte((char*)(&(buf[len+8])), (unsigned int)code);
- len += 10;
- }
- else if (len + 6 <= buf_size) {
- sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8));
- sprint_byte((char*)(&(buf[len+4])), (unsigned int)code);
- len += 6;
+ if (code > 0xffff && len + 10 <= buf_size) {
+ sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 24));
+ sprint_byte((char*)(&(buf[len+4])), (unsigned int)(code >> 16));
+ sprint_byte((char*)(&(buf[len+6])), (unsigned int)(code >> 8));
+ sprint_byte((char*)(&(buf[len+8])), (unsigned int)code);
+ len += 10;
+ }
+ else if (len + 6 <= buf_size) {
+ sprint_byte_with_x((char*)(&(buf[len])), (unsigned int)(code >> 8));
+ sprint_byte((char*)(&(buf[len+4])), (unsigned int)code);
+ len += 6;
}
else {
break;
diff --git a/regexec.c b/regexec.c
index cfe28836ba..b2f9c9fd26 100644
--- a/regexec.c
+++ b/regexec.c
@@ -879,7 +879,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
}\
k++;\
}\
- break;\
+ break;\
}\
}\
}\
@@ -920,7 +920,7 @@ stack_double(OnigStackType** arg_stk_base, OnigStackType** arg_stk_end,
}\
k++;\
}\
- break;\
+ break;\
}\
}\
else {\
@@ -1878,7 +1878,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
if (scv) goto fail;
STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem);
- n = enclen(encode, s);
+ n = enclen(encode, s, end);
DATA_ENSURE(n);
if (ONIGENC_IS_MBC_NEWLINE(encode, s, end)) goto fail;
sprev = s;
@@ -1896,7 +1896,7 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
if (scv) goto fail;
STACK_PUSH_ALT_WITH_STATE_CHECK(p, s, sprev, mem);
- n = enclen(encode, s);
+ n = enclen(encode, s, end);
if (n > 1) {
DATA_ENSURE(n);
sprev = s;
diff --git a/regint.h b/regint.h
index 67673fbd8f..1410632d70 100644
--- a/regint.h
+++ b/regint.h
@@ -788,7 +788,7 @@ typedef struct {
extern OnigOpInfoType OnigOpInfo[];
-extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar** nextp, OnigEncoding enc));
+/* extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar* bpend, UChar** nextp, OnigEncoding enc)); */
#ifdef ONIG_DEBUG_STATISTICS
extern void onig_statistics_init P_((void));
diff --git a/regparse.c b/regparse.c
index 9f46b15cd4..67da551d38 100644
--- a/regparse.c
+++ b/regparse.c
@@ -956,6 +956,7 @@ scan_env_clear(ScanEnv* env)
env->curr_max_regnum = 0;
env->has_recursion = 0;
#endif
+ env->warnings_flag = 0;
}
static int
diff --git a/ruby.c b/ruby.c
index 35572f8087..e72cd15057 100644
--- a/ruby.c
+++ b/ruby.c
@@ -69,6 +69,8 @@ enum dump_flag_bits {
dump_usage,
dump_yydebug,
dump_syntax,
+ dump_parsetree,
+ dump_parsetree_with_comment,
dump_insns,
dump_flag_count
};
@@ -643,9 +645,11 @@ dump_option(const char *str, int len, void *arg)
SET_WHEN_DUMP(usage);
SET_WHEN_DUMP(yydebug);
SET_WHEN_DUMP(syntax);
+ SET_WHEN_DUMP(parsetree);
+ SET_WHEN_DUMP(parsetree_with_comment);
SET_WHEN_DUMP(insns);
rb_warn("don't know how to dump `%.*s',", len, str);
- rb_warn("but only [version, copyright, usage, yydebug, syntax, insns].");
+ rb_warn("but only [version, copyright, usage, yydebug, syntax, parsetree, parsetree_with_comment, insns].");
}
#define RUBY_VM_OBJECT(vm, name) \
@@ -1213,6 +1217,7 @@ rb_f_chomp(argc, argv)
}
void rb_stdio_set_default_encoding(void);
+VALUE rb_parser_dump_tree(NODE *node, int comment);
static VALUE
process_options(rb_vm_t *vm, int argc, char **argv, struct cmdline_options *opt)
@@ -1304,7 +1309,6 @@ process_options(rb_vm_t *vm, int argc, char **argv, struct cmdline_options *opt)
ruby_init_loadpath_safe(opt->safe_level);
rb_enc_find_index("encdb");
lenc = rb_locale_encoding();
- (void)rb_filesystem_encoding();
rb_enc_associate(rb_progname, lenc);
parser = rb_parser_new();
if (opt->dump & DUMP_BIT(yydebug)) {
@@ -1436,6 +1440,12 @@ process_options(rb_vm_t *vm, int argc, char **argv, struct cmdline_options *opt)
rb_define_global_function("chomp", rb_f_chomp, -1);
}
+ if (opt->dump & DUMP_BIT(parsetree) || opt->dump & DUMP_BIT(parsetree_with_comment)) {
+ rb_io_write(rb_stdout, rb_parser_dump_tree(tree, opt->dump & DUMP_BIT(parsetree_with_comment)));
+ rb_io_flush(rb_stdout);
+ return Qtrue;
+ }
+
PREPARE_PARSE_MAIN({
iseq = rb_iseq_new_main(tree, opt->script_name);
});
diff --git a/sample/coverage.rb b/sample/coverage.rb
index 3f45e9fc98..5e15f99716 100644
--- a/sample/coverage.rb
+++ b/sample/coverage.rb
@@ -8,6 +8,7 @@ accum = !accum || accum == "" || !(%w(f n 0).include?(accum[0]))
pwd = Dir.pwd
at_exit do
+ exit_exc = $!
Dir.chdir(pwd) do
Coverage.result.each do |sfile, covs|
cfile = sfile + ext
@@ -57,4 +58,5 @@ at_exit do
end
end
end
+ raise exit_exc if exit_exc
end
diff --git a/sample/occur2.rb b/sample/occur2.rb
index 53885c0ba7..ca87d0ddef 100644
--- a/sample/occur2.rb
+++ b/sample/occur2.rb
@@ -1,13 +1,10 @@
# word occurrence listing
# usege: ruby occur2.rb file..
freq = {}
-while gets()
- for word in split(/\W+/)
- begin
- freq[word] += 1
- rescue NameError
- freq[word] = 1
- end
+ARGF.each_line do |line|
+ for word in line.split(/\W+/)
+ freq[word] ||= 0
+ freq[word] += 1
end
end
diff --git a/sample/test.rb b/sample/test.rb
index f3ac9c4a49..fc7a7f5db7 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -1941,7 +1941,7 @@ rescue Exception
false
end
-for script in Dir["#{dir}{lib,sample,ext,test}/**/*.rb"]
+for script in Dir["#{dir}{lib,sample,ext,test}/**/*.rb"].sort
unless valid_syntax? IO::read(script), script
STDERR.puts script
$bad = true
diff --git a/signal.c b/signal.c
index 2eca1bd936..7d902485c3 100644
--- a/signal.c
+++ b/signal.c
@@ -35,7 +35,7 @@ typedef int rb_atomic_t;
# define ATOMIC_DEC(var) (--(var))
#endif
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__HAIKU__)
#undef SIGBUS
#endif
@@ -420,8 +420,12 @@ static struct {
#define sighandler_t sh_t
#endif
+#if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK) && defined(SA_SIGINFO) && !defined(__NetBSD__)
+#define USE_SIGALTSTACK
+#endif
+
typedef RETSIGTYPE (*sighandler_t)(int);
-#if defined SA_SIGINFO && !defined __SYMBIAN32__
+#ifdef USE_SIGALTSTACK
typedef void ruby_sigaction_t(int, siginfo_t*, void*);
#define SIGINFO_ARG , siginfo_t *info, void *ctx
#else
@@ -430,9 +434,6 @@ typedef RETSIGTYPE ruby_sigaction_t(int);
#endif
#ifdef POSIX_SIGNAL
-#if defined(SIGSEGV) && defined(HAVE_SIGALTSTACK)
-#define USE_SIGALTSTACK
-#endif
#ifdef USE_SIGALTSTACK
#ifdef SIGSTKSZ
@@ -488,7 +489,7 @@ ruby_sigaction(int signum, ruby_sigaction_t *handler, int altstack, struct sigac
#endif
if (sigaction(signum, &sigact, old) < 0) {
if (errno != 0 && errno != EINVAL) {
- rb_bug("sigaction error.\n");
+ rb_bug_errno("sigaction", errno);
}
}
}
diff --git a/sprintf.c b/sprintf.c
index b5cad94fd7..bec0569b5c 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -483,7 +483,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
for (t = p; t < end && *t != '%'; t++) ;
PUSH(p, t - p);
if (coderange != ENC_CODERANGE_BROKEN && scanned < blen) {
- scanned = rb_str_coderange_scan_restartable(buf+scanned, buf+blen, enc, &coderange);
+ scanned += rb_str_coderange_scan_restartable(buf+scanned, buf+blen, enc, &coderange);
ENC_CODERANGE_SET(result, coderange);
}
if (t >= end) {
@@ -672,7 +672,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
rb_str_set_len(result, blen);
if (coderange != ENC_CODERANGE_BROKEN && scanned < blen) {
int cr = coderange;
- scanned = rb_str_coderange_scan_restartable(buf+scanned, buf+blen, enc, &cr);
+ scanned += rb_str_coderange_scan_restartable(buf+scanned, buf+blen, enc, &cr);
ENC_CODERANGE_SET(result,
(cr == ENC_CODERANGE_UNKNOWN ?
ENC_CODERANGE_BROKEN : (coderange = cr)));
diff --git a/st.c b/st.c
index 112e60df02..9749395ec0 100644
--- a/st.c
+++ b/st.c
@@ -794,10 +794,10 @@ st_foreach(st_table *table, int (*func)(ANYARGS), st_data_t arg)
if ((ptr = table->head) != 0) {
do {
+ i = ptr->hash % table->num_bins;
retval = (*func)(ptr->key, ptr->record, arg);
switch (retval) {
case ST_CHECK: /* check if hash is modified during iteration */
- i = ptr->hash % table->num_bins;
for (tmp = table->bins[i]; tmp != ptr; tmp = tmp->next) {
if (!tmp) {
/* call func with error notice */
diff --git a/strftime.c b/strftime.c
index addfe6b862..db6591b77d 100644
--- a/strftime.c
+++ b/strftime.c
@@ -496,7 +496,13 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
continue;
case 'Y': /* year with century */
- FMTV('0', 1, "d", vtm->year);
+ if (FIXNUM_P(vtm->year)) {
+ long y = FIX2LONG(vtm->year);
+ FMT('0', 0 <= y ? 4 : 5, "ld", y);
+ }
+ else {
+ FMTV('0', 4, "d", vtm->year);
+ }
continue;
#ifdef MAILHEADER_EXT
@@ -515,7 +521,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct vtm *vtm,
* live without, but it would be a great help to those of
* us that muck around with various message processors.
*/
- case 'z': /* time zone offset east of GMT e.g. -0600 */
+ case 'z': /* time zone offset east of GMT e.g. -0600 */
if (precision < 4) precision = 4;
NEEDS(precision + 1);
if (gmt) {
@@ -943,7 +949,7 @@ iso8601wknum(const struct tm *timeptr)
* and that
* timeptr->tm_wday MOD 7 == timeptr->tm_wday
* from which it follows that. . .
- */
+ */
jan1day = timeptr->tm_wday - (timeptr->tm_yday % 7);
if (jan1day < 0)
jan1day += 7;
@@ -1158,7 +1164,7 @@ static char *array[] =
"(%%h) should be same as (%%b) %h",
"(%%j) day of the year (001..366) %j",
"(%%k) hour, 24-hour clock, blank pad ( 0..23) %k",
- "(%%l) hour, 12-hour clock, blank pad ( 0..12) %l",
+ "(%%l) hour, 12-hour clock, blank pad ( 1..12) %l",
"(%%m) month (01..12) %m",
"(%%p) locale's AM or PM based on 12-hour clock %p",
"(%%r) time, 12-hour (same as %%I:%%M:%%S %%p) %r",
diff --git a/string.c b/string.c
index 35d3c0d540..bc90bfe8c1 100644
--- a/string.c
+++ b/string.c
@@ -1030,7 +1030,10 @@ rb_enc_strlen_cr(const char *p, const char *e, rb_encoding *enc, int *cr)
}
else {
*cr = ENC_CODERANGE_BROKEN;
- p++;
+ if (p + rb_enc_mbminlen(enc) <= e)
+ p += rb_enc_mbminlen(enc);
+ else
+ p = e;
}
}
if (!*cr) *cr = ENC_CODERANGE_7BIT;
@@ -1101,6 +1104,12 @@ str_strlen(VALUE str, rb_encoding *enc)
return n;
}
+long
+rb_str_strlen(VALUE str)
+{
+ return str_strlen(str, STR_ENC_GET(str));
+}
+
/*
* call-seq:
* str.length => integer
@@ -1362,12 +1371,7 @@ rb_string_value(volatile VALUE *ptr)
{
VALUE s = *ptr;
if (TYPE(s) != T_STRING) {
- if (SYMBOL_P(s)) {
- s = rb_sym_to_s(s);
- }
- else {
- s = rb_str_to_str(s);
- }
+ s = rb_str_to_str(s);
*ptr = s;
}
return s;
@@ -1490,7 +1494,7 @@ rb_str_offset(VALUE str, long pos)
static char *
str_utf8_nth(const char *p, const char *e, long nth)
{
- if ((int)SIZEOF_VALUE * 2 < nth) {
+ if ((int)SIZEOF_VALUE < e - p && (int)SIZEOF_VALUE * 2 < nth) {
const VALUE *s, *t;
const VALUE lowbits = sizeof(VALUE) - 1;
s = (const VALUE*)(~lowbits & ((VALUE)p + lowbits));
@@ -1519,7 +1523,6 @@ static long
str_utf8_offset(const char *p, const char *e, long nth)
{
const char *pp = str_utf8_nth(p, e, nth);
- if (!pp) return e - p;
return pp - p;
}
#endif
@@ -1684,6 +1687,7 @@ rb_str_unlocktmp(VALUE str)
void
rb_str_set_len(VALUE str, long len)
{
+ rb_str_modify(str);
STR_SET_LEN(str, len);
RSTRING_PTR(str)[len] = '\0';
}
@@ -1999,19 +2003,40 @@ rb_str_append(VALUE str, VALUE str2)
VALUE
rb_str_concat(VALUE str1, VALUE str2)
{
- if (FIXNUM_P(str2) || TYPE(str2) == T_BIGNUM) {
+ SIGNED_VALUE lc;
+
+ if (FIXNUM_P(str2)) {
+ lc = FIX2LONG(str2);
+ if (lc < 0)
+ rb_raise(rb_eRangeError, "negative argument");
+ }
+ else if (TYPE(str2) == T_BIGNUM) {
+ if (!RBIGNUM_SIGN(str2))
+ rb_raise(rb_eRangeError, "negative argument");
+ lc = rb_big2ulong(str2);
+ }
+ else {
+ return rb_str_append(str1, str2);
+ }
+#if SIZEOF_INT < SIZEOF_VALUE
+ if ((VALUE)lc > UINT_MAX) {
+ rb_raise(rb_eRangeError, "%"PRIuVALUE" out of char range", lc);
+ }
+#endif
+ {
rb_encoding *enc = STR_ENC_GET(str1);
- unsigned int c = NUM2UINT(str2);
long pos = RSTRING_LEN(str1);
- int len = rb_enc_codelen(c, enc);
int cr = ENC_CODERANGE(str1);
+ int c, len;
+ if ((len = rb_enc_codelen(c = (int)lc, enc)) <= 0) {
+ rb_raise(rb_eRangeError, "%u invalid char", c);
+ }
rb_str_resize(str1, pos+len);
rb_enc_mbcput(c, RSTRING_PTR(str1)+pos, enc);
ENC_CODERANGE_SET(str1, cr);
return str1;
}
- return rb_str_append(str1, str2);
}
st_index_t
@@ -3749,6 +3774,7 @@ rb_str_gsub(int argc, VALUE *argv, VALUE str)
VALUE
rb_str_replace(VALUE str, VALUE str2)
{
+ str_modifiable(str);
if (str == str2) return str;
StringValue(str2);
@@ -3925,7 +3951,7 @@ rb_str_reverse_bang(VALUE str)
while (s < e) {
c = *s;
*s++ = *e;
- *e-- = c;
+ *e-- = c;
}
}
else {
@@ -4071,7 +4097,7 @@ rb_str_inspect(VALUE str)
{
rb_encoding *enc = STR_ENC_GET(str);
const char *p, *pend, *prev;
-#define CHAR_ESC_LEN 12 /* sizeof(\x{ hex of 32bit unsigned int }) */
+#define CHAR_ESC_LEN 13 /* sizeof(\x{ hex of 32bit unsigned int } \0) */
char buf[CHAR_ESC_LEN + 1];
VALUE result = rb_str_buf_new(0);
rb_encoding *resenc = rb_default_internal_encoding();
@@ -4091,9 +4117,14 @@ rb_str_inspect(VALUE str)
n = rb_enc_precise_mbclen(p, pend, enc);
if (!MBCLEN_CHARFOUND_P(n)) {
if (p > prev) str_buf_cat(result, prev, p - prev);
- snprintf(buf, CHAR_ESC_LEN, "\\x%02X", *p & 0377);
- str_buf_cat(result, buf, strlen(buf));
- prev = ++p;
+ n = rb_enc_mbminlen(enc);
+ if (pend < p + n)
+ n = (int)(pend - p);
+ while (n--) {
+ snprintf(buf, CHAR_ESC_LEN, "\\x%02X", *p & 0377);
+ str_buf_cat(result, buf, strlen(buf));
+ prev = ++p;
+ }
continue;
}
n = MBCLEN_CHARFOUND_LEN(n);
@@ -6616,7 +6647,7 @@ rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag)
VALUE res;
char *p;
const char *f = " ";
- long n, llen, rlen;
+ long n, size, llen, rlen, llen2 = 0, rlen2 = 0;
volatile VALUE pad;
int singlebyte = 1, cr;
@@ -6640,44 +6671,49 @@ rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag)
llen = (jflag == 'l') ? 0 : ((jflag == 'r') ? n : n/2);
rlen = n - llen;
cr = ENC_CODERANGE(str);
- res = rb_str_new5(str, 0, RSTRING_LEN(str)+n*flen/fclen+2);
+ if (flen > 1) {
+ llen2 = str_offset(f, f + flen, llen % fclen, enc, singlebyte);
+ rlen2 = str_offset(f, f + flen, rlen % fclen, enc, singlebyte);
+ }
+ size = RSTRING_LEN(str);
+ if ((len = llen / fclen + rlen / fclen) >= LONG_MAX / flen ||
+ (len *= flen) >= LONG_MAX - llen2 - rlen2 ||
+ (len += llen2 + rlen2) >= LONG_MAX - size) {
+ rb_raise(rb_eArgError, "argument too big");
+ }
+ len += size;
+ res = rb_str_new5(str, 0, len);
p = RSTRING_PTR(res);
- while (llen) {
- if (flen <= 1) {
- *p++ = *f;
- llen--;
- }
- else if (llen > fclen) {
+ if (flen <= 1) {
+ memset(p, *f, llen);
+ p += llen;
+ }
+ else {
+ while (llen >= fclen) {
memcpy(p,f,flen);
p += flen;
llen -= fclen;
}
- else {
- char *fp = str_nth(f, f+flen, llen, enc, singlebyte);
- n = fp - f;
- memcpy(p,f,n);
- p+=n;
- break;
+ if (llen > 0) {
+ memcpy(p, f, llen2);
+ p += llen2;
}
}
- memcpy(p, RSTRING_PTR(str), RSTRING_LEN(str));
- p+=RSTRING_LEN(str);
- while (rlen) {
- if (flen <= 1) {
- *p++ = *f;
- rlen--;
- }
- else if (rlen > fclen) {
+ memcpy(p, RSTRING_PTR(str), size);
+ p += size;
+ if (flen <= 1) {
+ memset(p, *f, rlen);
+ p += rlen;
+ }
+ else {
+ while (rlen >= fclen) {
memcpy(p,f,flen);
p += flen;
rlen -= fclen;
}
- else {
- char *fp = str_nth(f, f+flen, rlen, enc, singlebyte);
- n = fp - f;
- memcpy(p,f,n);
- p+=n;
- break;
+ if (rlen > 0) {
+ memcpy(p, f, rlen2);
+ p += rlen2;
}
}
*p = '\0';
diff --git a/symbian/setup b/symbian/setup
index 06533cd66e..d39bf6e4e7 100644
--- a/symbian/setup
+++ b/symbian/setup
@@ -168,16 +168,12 @@ define config_h
@echo>>$(1) #define MANGLED_PATH 1
@echo>>$(1) #define DLEXT_MAXLEN 4
@echo>>$(1) #define DLEXT ".dll"
+@echo>>$(1) #define EXECUTABLE_EXTS ".exe",".com",".cmd",".bat"
@echo>>$(1) #define DLN_NEEDS_ALT_SEPARATOR 1
-@echo>>$(1) #define RUBY_LIB "C:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)"
+@echo>>$(1) #define RUBY_LIB_PREFIX "C:/Data/Ruby/lib"
@echo>>$(1) #define RUBY_SITE_LIB "E:/Data/Ruby/lib"
-@echo>>$(1) #define RUBY_SITE_LIB2 "E:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)"
@echo>>$(1) #define RUBY_VENDOR_LIB "C:/Data/Ruby/lib"
-@echo>>$(1) #define RUBY_VENDOR_LIB2 "C:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)"
@echo>>$(1) #define RUBY_PLATFORM "$(arch)"
-@echo>>$(1) #define RUBY_ARCHLIB "C:/Data/Ruby/$(MAJOR).$(MINOR).$(TEENY)/$(arch)"
-@echo>>$(1) #define RUBY_SITE_ARCHLIB "E:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)/$(arch)"
-@echo>>$(1) #define RUBY_VENDOR_ARCHLIB "C:/Data/Ruby/lib/$(MAJOR).$(MINOR).$(TEENY)/$(arch)"
endef
define pre_build_mk
diff --git a/template/known_errors.inc.tmpl b/template/known_errors.inc.tmpl
index c62114464f..deb54e44d7 100644
--- a/template/known_errors.inc.tmpl
+++ b/template/known_errors.inc.tmpl
@@ -7,8 +7,8 @@
% error_names = ARGF.read.split(/\s+/)
% error_names.each do |name|
#ifdef <%=name%>
- set_syserr(<%=name%>, "<%=name%>");
+ defined_error("<%=name%>", <%=name%>)
#else
- set_syserr(0, "<%=name%>");
+ undefined_error("<%=name%>")
#endif
% end
diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index 2490c8469c..a9dae35274 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -61,7 +61,6 @@ class TestBigDecimal < Test::Unit::TestCase
x = BigDecimal.new("0.1")
100.times do
x *= x
- break if x == false
end
end
end
@@ -71,7 +70,6 @@ class TestBigDecimal < Test::Unit::TestCase
x = BigDecimal.new("10")
100.times do
x *= x
- break if x == false
end
end
end
@@ -179,6 +177,7 @@ class TestBigDecimal < Test::Unit::TestCase
def test_zero_p
assert_equal(true, BigDecimal.new("0").zero?)
assert_equal(false, BigDecimal.new("1").zero?)
+ assert_equal(true, BigDecimal.new("0E200000000000000").zero?)
end
def test_nonzero_p
@@ -219,7 +218,20 @@ class TestBigDecimal < Test::Unit::TestCase
assert_operator(1, :<, inf)
end
- def test_cmp_corece
+ def test_cmp_nan
+ n1 = BigDecimal.new("1")
+ BigDecimal.mode(BigDecimal::EXCEPTION_NaN, false)
+ assert_equal(nil, BigDecimal.new("NaN") <=> n1)
+ assert_equal(false, BigDecimal.new("NaN") > n1)
+ end
+
+ def test_cmp_failing_coercion
+ n1 = BigDecimal.new("1")
+ assert_equal(nil, n1 <=> nil)
+ assert_raise(ArgumentError){n1 > nil}
+ end
+
+ def test_cmp_coerce
n1 = BigDecimal.new("1")
n2 = BigDecimal.new("2")
o1 = Object.new; def o1.coerce(x); [x, BigDecimal.new("1")]; end
diff --git a/test/cgi/test_cgi_cookie.rb b/test/cgi/test_cgi_cookie.rb
index c55b52ed03..c1c6a30e70 100644
--- a/test/cgi/test_cgi_cookie.rb
+++ b/test/cgi/test_cgi_cookie.rb
@@ -9,7 +9,7 @@ class CGICookieTest < Test::Unit::TestCase
def setup
ENV['REQUEST_METHOD'] = 'GET'
@str1="\xE3\x82\x86\xE3\x82\x93\xE3\x82\x86\xE3\x82\x93"
- @str1.force_encoding("UTF-8") if RUBY_VERSION>="1.9"
+ @str1.force_encoding("UTF-8") if defined?(::Encoding)
end
def teardown
@@ -34,7 +34,7 @@ class CGICookieTest < Test::Unit::TestCase
def test_cgi_cookie_new_complex
t = Time.gm(2030, 12, 31, 23, 59, 59)
value = ['val1', '&<>"', "\xA5\xE0\xA5\xB9\xA5\xAB"]
- value[2].force_encoding("EUC-JP") if RUBY_VERSION>="1.9"
+ value[2].force_encoding("EUC-JP") if defined?(::Encoding)
cookie = CGI::Cookie.new('name'=>'name1',
'value'=>value,
'path'=>'/cgi-bin/myapp/',
diff --git a/test/cgi/test_cgi_core.rb b/test/cgi/test_cgi_core.rb
index 3f75b04fd4..23b8891576 100644
--- a/test/cgi/test_cgi_core.rb
+++ b/test/cgi/test_cgi_core.rb
@@ -124,7 +124,7 @@ class CGICoreTest < Test::Unit::TestCase
$stdin = StringIO.new
$stdin << query_str
$stdin.rewind
- if RUBY_VERSION>="1.9.0"
+ if defined?(::Encoding)
hash={}
cgi = CGI.new(:accept_charset=>"UTF-8"){|key,val|hash[key]=val}
## cgi[]
@@ -251,7 +251,7 @@ class CGICoreTest < Test::Unit::TestCase
"Content-Length: 22\r\n" +
"\r\n" +
euc_str
- if RUBY_VERSION>="1.9"
+ if defined?(::Encoding)
actual.force_encoding("ASCII-8BIT")
expected.force_encoding("ASCII-8BIT")
end
diff --git a/test/cgi/test_cgi_multipart.rb b/test/cgi/test_cgi_multipart.rb
index 86bbc0d28c..c123aa80b5 100644
--- a/test/cgi/test_cgi_multipart.rb
+++ b/test/cgi/test_cgi_multipart.rb
@@ -32,7 +32,7 @@ class MultiPart
def initialize(boundary=nil)
@boundary = boundary || create_boundary()
@buf = ''
- @buf.force_encoding("ascii-8bit") if RUBY_VERSION>="1.9"
+ @buf.force_encoding(::Encoding::ASCII_8BIT) if defined?(::Encoding)
end
attr_reader :boundary
@@ -44,11 +44,8 @@ class MultiPart
buf << "Content-Disposition: form-data: name=\"#{name}\"#{s}\r\n"
buf << "Content-Type: #{content_type}\r\n" if content_type
buf << "\r\n"
- if RUBY_VERSION>="1.9"
- buf << value.dup.force_encoding("ASCII-8BIT")
- else
- buf << value
- end
+ value = value.dup.force_encoding(::Encoding::ASCII_8BIT) if defined?(::Encoding)
+ buf << value
buf << "\r\n"
return self
end
@@ -135,11 +132,8 @@ class CGIMultipartTest < Test::Unit::TestCase
ENV['CONTENT_LENGTH'] = input.length.to_s
ENV['REQUEST_METHOD'] = 'POST'
## set $stdin
- tmpfile = if RUBY_VERSION >="1.9"
- Tempfile.new('test_cgi_multipart', :binmode => true)
- else
- Tempfile.new('test_cgi_multipart')
- end
+ tmpfile = Tempfile.new('test_cgi_multipart')
+ tmpfile.binmode
tmpfile << input
tmpfile.rewind()
$stdin = tmpfile
@@ -179,11 +173,7 @@ class CGIMultipartTest < Test::Unit::TestCase
def _read(basename)
filename = File.join(File.dirname(__FILE__), 'testdata', basename)
- if RUBY_VERSION>="1.9"
- s = File.open(filename, 'r:ascii-8bit') {|f| f.read() }
- else
- s = File.open(filename, 'rb') {|f| f.read() }
- end
+ s = File.open(filename, 'rb') {|f| f.read() }
return s
end
@@ -199,7 +189,7 @@ class CGIMultipartTest < Test::Unit::TestCase
{:name=>'image1', :value=>_read('small.png'),
:filename=>'small.png', :content_type=>'image/png'}, # small image
]
- @data[1][:value].force_encoding("UTF-8") if RUBY_VERSION>="1.9"
+ @data[1][:value].force_encoding(::Encoding::UTF_8) if defined?(::Encoding)
@expected_class = StringIO
_test_multipart()
end
@@ -215,7 +205,7 @@ class CGIMultipartTest < Test::Unit::TestCase
{:name=>'image1', :value=>_read('large.png'),
:filename=>'large.png', :content_type=>'image/png'}, # large image
]
- @data[1][:value].force_encoding("UTF-8") if RUBY_VERSION>="1.9"
+ @data[1][:value].force_encoding(::Encoding::UTF_8) if defined?(::Encoding)
@expected_class = Tempfile
_test_multipart()
end
diff --git a/test/cgi/test_cgi_session.rb b/test/cgi/test_cgi_session.rb
index 50e0f4af4d..f3b8e60865 100644
--- a/test/cgi/test_cgi_session.rb
+++ b/test/cgi/test_cgi_session.rb
@@ -27,7 +27,7 @@ class CGISessionTest < Test::Unit::TestCase
}
value1="value1"
value2="\x8F\xBC\x8D]"
- value2.force_encoding("SJIS") if RUBY_VERSION>="1.9"
+ value2.force_encoding("SJIS") if defined?(::Encoding)
ENV.update(@environ)
cgi = CGI.new
session = CGI::Session.new(cgi,"tmpdir"=>@session_dir)
@@ -65,7 +65,7 @@ class CGISessionTest < Test::Unit::TestCase
}
value1="value1"
value2="\x8F\xBC\x8D]"
- value2.force_encoding("SJIS") if RUBY_VERSION>="1.9"
+ value2.force_encoding("SJIS") if defined?(::Encoding)
ENV.update(@environ)
cgi = CGI.new
session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"database_manager"=>CGI::Session::PStore)
@@ -102,7 +102,7 @@ class CGISessionTest < Test::Unit::TestCase
}
value1="value1"
value2="\x8F\xBC\x8D]"
- value2.force_encoding("SJIS") if RUBY_VERSION>="1.9"
+ value2.force_encoding("SJIS") if defined?(::Encoding)
ENV.update(@environ)
cgi = CGI.new
session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"session_id"=>"foo")
@@ -142,7 +142,7 @@ class CGISessionTest < Test::Unit::TestCase
}
value1="value1"
value2="\x8F\xBC\x8D]"
- value2.force_encoding("SJIS") if RUBY_VERSION>="1.9"
+ value2.force_encoding("SJIS") if defined?(::Encoding)
ENV.update(@environ)
cgi = CGI.new
session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"session_key"=>"bar")
diff --git a/test/cgi/test_cgi_util.rb b/test/cgi/test_cgi_util.rb
index 3a891d6171..479df68159 100644
--- a/test/cgi/test_cgi_util.rb
+++ b/test/cgi/test_cgi_util.rb
@@ -9,7 +9,7 @@ class CGIUtilTest < Test::Unit::TestCase
def setup
ENV['REQUEST_METHOD'] = 'GET'
@str1="&<>\" \xE3\x82\x86\xE3\x82\x93\xE3\x82\x86\xE3\x82\x93"
- @str1.force_encoding("UTF-8") if RUBY_VERSION>="1.9"
+ @str1.force_encoding("UTF-8") if defined?(::Encoding)
end
def teardown
@@ -21,12 +21,12 @@ class CGIUtilTest < Test::Unit::TestCase
def test_cgi_escape
assert_equal('%26%3C%3E%22+%E3%82%86%E3%82%93%E3%82%86%E3%82%93', CGI::escape(@str1))
- assert_equal('%26%3C%3E%22+%E3%82%86%E3%82%93%E3%82%86%E3%82%93'.ascii_only?, CGI::escape(@str1).ascii_only?) if RUBY_VERSION>="1.9"
+ assert_equal('%26%3C%3E%22+%E3%82%86%E3%82%93%E3%82%86%E3%82%93'.ascii_only?, CGI::escape(@str1).ascii_only?) if defined?(::Encoding)
end
def test_cgi_unescape
assert_equal(@str1, CGI::unescape('%26%3C%3E%22+%E3%82%86%E3%82%93%E3%82%86%E3%82%93'))
- assert_equal(@str1.encoding, CGI::unescape('%26%3C%3E%22+%E3%82%86%E3%82%93%E3%82%86%E3%82%93').encoding) if RUBY_VERSION>="1.9"
+ assert_equal(@str1.encoding, CGI::unescape('%26%3C%3E%22+%E3%82%86%E3%82%93%E3%82%86%E3%82%93').encoding) if defined?(::Encoding)
end
def test_cgi_pretty
diff --git a/test/csv/test_table.rb b/test/csv/test_table.rb
index e87f1b2545..b7c72b8fcb 100644
--- a/test/csv/test_table.rb
+++ b/test/csv/test_table.rb
@@ -321,6 +321,12 @@ class TestCSVTable < Test::Unit::TestCase
END_RESULT
end
+ def test_delete_with_blank_rows
+ data = "col1,col2\nra1,ra2\n\nrb1,rb2"
+ table = CSV.parse(data, :headers => true)
+ assert_equal(["ra2", nil, "rb2"], table.delete("col2"))
+ end
+
def test_delete_if
######################
### Mixed/Row Mode ###
diff --git a/test/date/test_date_parse.rb b/test/date/test_date_parse.rb
index c7a9a10ccc..e9e0ae83fc 100644
--- a/test/date/test_date_parse.rb
+++ b/test/date/test_date_parse.rb
@@ -640,9 +640,7 @@ class TestDateParse < Test::Unit::TestCase
end
def test_parse_utf8
- h = DateTime._parse(
-"Sun\xe3\x80\x80Aug 16 01:02:03 \xe6\x97\xa5\xe6\x9c\xac 2009".
- force_encoding('utf-8'))
+ h = DateTime._parse("Sun\u{3000}Aug 16 01:02:03 \u{65e5}\u{672c} 2009")
assert_equal(2009, h[:year])
assert_equal(8, h[:mon])
assert_equal(16, h[:mday])
@@ -650,8 +648,7 @@ class TestDateParse < Test::Unit::TestCase
assert_equal(1, h[:hour])
assert_equal(2, h[:min])
assert_equal(3, h[:sec])
- assert_equal("\xe6\x97\xa5\xe6\x9c\xac".
- force_encoding('utf-8'), h[:zone])
+ assert_equal("\u{65e5}\u{672c}", h[:zone])
end
def test_parse__ex
diff --git a/test/digest/test_digest.rb b/test/digest/test_digest.rb
index fa12086300..1d1efa15eb 100644
--- a/test/digest/test_digest.rb
+++ b/test/digest/test_digest.rb
@@ -18,14 +18,22 @@ module TestDigest
Data2 = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
def test_s_hexdigest
- self.class::DATA.each do |str, digest|
- assert_equal(digest, self.class::ALGO.hexdigest(str))
+ self.class::DATA.each do |str, hexdigest|
+ assert_equal(hexdigest, self.class::ALGO.hexdigest(str))
+ end
+ end
+
+ def test_s_base64digest
+ self.class::DATA.each do |str, hexdigest|
+ digest = [hexdigest].pack("H*")
+ assert_equal([digest].pack("m0"), self.class::ALGO.base64digest(str))
end
end
def test_s_digest
- self.class::DATA.each do |str, digest|
- assert_equal([digest].pack("H*"), self.class::ALGO.digest(str))
+ self.class::DATA.each do |str, hexdigest|
+ digest = [hexdigest].pack("H*")
+ assert_equal(digest, self.class::ALGO.digest(str))
end
end
diff --git a/test/digest/test_digest_extend.rb b/test/digest/test_digest_extend.rb
new file mode 100644
index 0000000000..9b8eda03fa
--- /dev/null
+++ b/test/digest/test_digest_extend.rb
@@ -0,0 +1,145 @@
+require 'test/unit'
+require 'digest'
+
+class TestDigestExtend < Test::Unit::TestCase
+ class MyDigest < Digest::Class
+ def initialize(*arg)
+ super
+ @buf = []
+ end
+
+ def initialize_copy(org)
+ @buf = org.buf.dup
+ end
+
+ def update(arg)
+ @buf << arg
+ self
+ end
+
+ alias << update
+
+ def finish
+ (@buf.join.length % 256).chr
+ end
+
+ def reset
+ @buf.clear
+ self
+ end
+
+ protected
+
+ def buf
+ @buf
+ end
+ end
+
+ def test_digest_s_hexencode
+ assert_equal('', Digest.hexencode(''))
+ assert_equal('0102', Digest.hexencode("\1\2"))
+ assert_equal(
+ (0..0xff).to_a.map { |c| sprintf("%02x", c ) }.join,
+ Digest.hexencode((0..0xff).to_a.map { |c| c.chr }.join)
+ )
+ end
+
+ def test_class_reset
+ a = Digest::SHA1.new
+ base = a.to_s
+ assert_equal(base, a.reset.to_s)
+ b = a.new
+ assert_equal(base, b.to_s)
+ b.update('1')
+ assert_not_equal(base, b.to_s)
+ assert_equal(base, b.reset.to_s)
+ end
+
+ def test_digest
+ assert_equal("\3", MyDigest.digest("foo"))
+ end
+
+ def test_hexdigest
+ assert_equal("03", MyDigest.hexdigest("foo"))
+ end
+
+ def test_context
+ digester = MyDigest.new
+ digester.update("foo")
+ assert_equal("\3", digester.digest)
+ digester.update("foobar")
+ assert_equal("\t", digester.digest)
+ digester.update("foo")
+ assert_equal("\f", digester.digest)
+ end
+
+ def test_new
+ a = Digest::SHA1.new
+ b = a.new
+ obj = a.to_s
+ assert_equal(obj, a.to_s)
+ assert_equal(obj, b.to_s)
+ a.update('1')
+ assert_not_equal(obj, a.to_s)
+ assert_equal(obj, b.to_s)
+ end
+
+ def test_digest_hexdigest
+ [:digest, :hexdigest].each do |m|
+ exp_1st = "\3"; exp_1st = Digest.hexencode(exp_1st) if m == :hexdigest
+ exp_2nd = "\6"; exp_2nd = Digest.hexencode(exp_2nd) if m == :hexdigest
+ digester = MyDigest.new
+ digester.update("foo")
+ obj = digester.send(m)
+ # digest w/o param does not reset the org digester.
+ assert_equal(exp_1st, obj)
+ digester.update("bar")
+ obj = digester.send(m)
+ assert_equal(exp_2nd, obj)
+ obj = digester.send(m, "baz")
+ # digest with param resets the org digester.
+ assert_equal(exp_1st, obj)
+ end
+ end
+
+ def test_digest_hexdigest_bang
+ [:digest!, :hexdigest!].each do |m|
+ exp_1st = "\3"; exp_1st = Digest.hexencode(exp_1st) if m == :hexdigest!
+ digester = MyDigest.new
+ digester.update("foo")
+ obj = digester.send(m) # digest! always resets the org digester.
+ assert_equal(exp_1st, obj)
+ digester.update("bar")
+ obj = digester.send(m)
+ assert_equal(exp_1st, obj)
+ end
+ end
+
+ def test_to_s
+ digester = MyDigest.new
+ digester.update("foo")
+ assert_equal("03", digester.to_s)
+ end
+
+ def test_length
+ digester = MyDigest.new
+ assert_equal(2, digester.length)
+ assert_equal(2, digester.size)
+ end
+
+ def test_digest_length # breaks MyDigest#digest_length
+ assert_equal(1, MyDigest.new.digest_length)
+ MyDigest.class_eval do
+ def digest_length
+ 2
+ end
+ end
+ assert_equal(2, MyDigest.new.digest_length)
+ end
+
+ def test_block_length
+ assert_raises(RuntimeError) do
+ MyDigest.new.block_length
+ end
+ end
+end
diff --git a/test/digest/test_digest_hmac.rb b/test/digest/test_digest_hmac.rb
index a0d5d2f244..3eb1567397 100644
--- a/test/digest/test_digest_hmac.rb
+++ b/test/digest/test_digest_hmac.rb
@@ -1,3 +1,2 @@
-require 'pathname'
-require Pathname.new(__FILE__).dirname.join('../inlinetest.rb')
+require_relative '../inlinetest.rb'
InlineTest.loadtest__END__part('digest/hmac.rb')
diff --git a/test/dl/test_base.rb b/test/dl/test_base.rb
index 7eddbf8226..e67f0795d5 100644
--- a/test/dl/test_base.rb
+++ b/test/dl/test_base.rb
@@ -74,7 +74,7 @@ module DL
end
def assert_zero(actual)
- assert(actual == 0)
+ assert_equal(0, actual)
end
def assert_negative(actual)
diff --git a/test/dl/test_callback.rb b/test/dl/test_callback.rb
index f3dd665feb..844e8f543a 100644
--- a/test/dl/test_callback.rb
+++ b/test/dl/test_callback.rb
@@ -1,30 +1,66 @@
require_relative 'test_base'
require_relative '../ruby/envutil'
+require 'dl/callback'
+require 'dl/func'
module DL
class TestCallback < TestBase
include DL
+ def test_remove_callback_failed
+ assert_equal(false, remove_callback(0, TYPE_VOIDP))
+ end
+
+ def test_remove_callback
+ addr = set_callback(TYPE_VOIDP, 1) do |str|
+ str
+ end
+ assert remove_callback(addr, TYPE_VOIDP), 'callback removed'
+ end
+
+ def test_callback_return_value
+ addr = set_callback(TYPE_VOIDP, 1) do |str|
+ str
+ end
+ func = CFunc.new(addr, TYPE_VOIDP, 'test')
+ f = Function.new(func, [TYPE_VOIDP])
+ ptr = CPtr['blah']
+ assert_equal ptr, f.call(ptr)
+ end
+
+ def test_callback_return_arbitrary
+ addr = set_callback(TYPE_VOIDP, 1) do |ptr|
+ CPtr['foo'].to_i
+ end
+ func = CFunc.new(addr, TYPE_VOIDP, 'test')
+ f = Function.new(func, [TYPE_VOIDP])
+
+ ptr = CPtr['foo']
+ assert_equal 'foo', f.call(ptr).to_s
+ end
+
def test_callback_with_string
called_with = nil
addr = set_callback(TYPE_VOID, 1) do |str|
called_with = dlunwrap(str)
end
func = CFunc.new(addr, TYPE_VOID, 'test')
+ f = Function.new(func, [TYPE_VOIDP])
- func.call([dlwrap('foo')])
+ f.call(dlwrap('foo'))
assert_equal 'foo', called_with
end
def test_call_callback
called = false
- addr = set_callback(TYPE_VOID, 0) do
+ addr = set_callback(TYPE_VOID, 1) do |foo|
called = true
end
func = CFunc.new(addr, TYPE_VOID, 'test')
- func.call([])
+ f = Function.new(func, [TYPE_VOIDP])
+ f.call(nil)
assert called, 'function should be called'
end
diff --git a/test/dl/test_closure.rb b/test/dl/test_closure.rb
new file mode 100644
index 0000000000..965d195df1
--- /dev/null
+++ b/test/dl/test_closure.rb
@@ -0,0 +1,130 @@
+require_relative 'test_base'
+require 'dl/func'
+require 'dl/closure'
+
+module DL
+ class TestClosure < Test::Unit::TestCase
+ class Returner < DL::Closure
+ attr_accessor :called
+ attr_accessor :called_with
+ def call *args
+ @called = true
+ @called_with = args
+ a = args.first
+ DL::CPtr === a ? a.to_i : a
+ end
+ end
+
+ if defined?(TYPE_LONG_LONG)
+ def test_long_long
+ type = TYPE_LONG_LONG
+ addr = Returner.new(type, [type]) do |num|
+ called = true
+ called_with = num
+ end
+ func = DL::Function.new(addr, [type])
+ assert_equal(9223372036854775807, func.call(9223372036854775807))
+ end
+ end
+
+ def test_with_abi
+ called = false
+ addr = DL::Closure::BlockCaller.new(
+ TYPE_INT,
+ [TYPE_INT],
+ DL::Function::DEFAULT
+ ) do |num|
+ called = true
+ num
+ end
+ func = DL::Function.new(addr, [TYPE_INT])
+ func.call(50)
+ assert called
+ end
+
+ def test_block_caller
+ called = false
+ called_with = nil
+ addr = DL::Closure::BlockCaller.new(TYPE_INT, [TYPE_INT]) do |num|
+ called = true
+ called_with = num
+ end
+ func = DL::Function.new(addr, [TYPE_INT])
+ func.call(50)
+ assert called, 'function was called'
+ assert_equal 50, called_with
+ end
+
+ def test_multival
+ adder = Class.new(DL::Closure) {
+ def call a, b
+ a + b
+ end
+ }.new(TYPE_INT, [TYPE_INT, TYPE_INT])
+
+ assert_equal [TYPE_INT, TYPE_INT], adder.args
+ func = DL::Function.new(adder, adder.args)
+ assert_equal 70, func.call(50, 20)
+ end
+
+ def test_call
+ closure = Class.new(DL::Closure) {
+ attr_accessor :called_with
+ def call num
+ @called_with = num
+ end
+ }.new(TYPE_INT, [TYPE_INT])
+
+ func = DL::Function.new(closure, [TYPE_INT])
+ func.call(50)
+
+ assert_equal 50, closure.called_with
+ end
+
+ def test_return_value
+ closure = Returner.new(TYPE_INT, [TYPE_INT])
+
+ func = DL::Function.new(closure, [TYPE_INT])
+ assert_equal 50, func.call(50)
+ end
+
+ def test_float
+ closure = Returner.new(TYPE_FLOAT, [TYPE_FLOAT])
+ func = DL::Function.new(closure, [TYPE_FLOAT])
+ assert_equal 2.0, func.call(2.0)
+ end
+
+ def test_char
+ closure = Returner.new(TYPE_CHAR, [TYPE_CHAR])
+ func = DL::Function.new(closure, [TYPE_CHAR])
+ assert_equal 60, func.call(60)
+ end
+
+ def test_long
+ closure = Returner.new(TYPE_LONG, [TYPE_LONG])
+ func = DL::Function.new(closure, [TYPE_LONG])
+ assert_equal 60, func.call(60)
+ end
+
+ def test_double
+ closure = Returner.new(TYPE_DOUBLE, [TYPE_DOUBLE])
+ func = DL::Function.new(closure, [TYPE_DOUBLE])
+ assert_equal 60, func.call(60)
+ end
+
+ def test_voidp
+ closure = Returner.new(TYPE_VOIDP, [TYPE_VOIDP])
+ func = DL::Function.new(closure, [TYPE_VOIDP])
+
+ voidp = CPtr['foo']
+ assert_equal voidp, func.call(voidp)
+ end
+
+ def test_void
+ closure = Returner.new(TYPE_VOID, [TYPE_VOID])
+ func = DL::Function.new(closure, [TYPE_VOID])
+ func.call()
+ assert closure.called
+ end
+ end
+end
diff --git a/test/dl/test_cptr.rb b/test/dl/test_cptr.rb
index 5bc98ef35b..953af286e1 100644
--- a/test/dl/test_cptr.rb
+++ b/test/dl/test_cptr.rb
@@ -3,8 +3,13 @@ require_relative '../ruby/envutil'
module DL
class TestCPtr < TestBase
+ def test_cptr_to_int
+ null = DL::NULL
+ assert_equal(null.to_i, null.to_int)
+ end
+
def test_malloc_free_func_int
- free = CFunc.new(@libc['free'], TYPE_VOID, 'free')
+ free = CFunc.new(DL::RUBY_FREE, TYPE_VOID, 'free')
ptr = CPtr.malloc(10, free.to_i)
assert_equal 10, ptr.size
@@ -12,7 +17,7 @@ module DL
end
def test_malloc_free_func
- free = CFunc.new(@libc['free'], TYPE_VOID, 'free')
+ free = CFunc.new(DL::RUBY_FREE, TYPE_VOID, 'free')
ptr = CPtr.malloc(10, free)
assert_equal 10, ptr.size
@@ -142,14 +147,14 @@ module DL
include DL
@libc = dlopen(LIBC_SO)
@libm = dlopen(LIBM_SO)
- free = CFunc.new(@libc['free'], TYPE_VOID, 'free')
+ free = CFunc.new(DL::RUBY_FREE, TYPE_VOID, 'free')
ptr = CPtr.malloc(4)
ptr.free = free
free.ptr
ptr.free.ptr
End
- free = CFunc.new(@libc['free'], TYPE_VOID, 'free')
+ free = CFunc.new(DL::RUBY_FREE, TYPE_VOID, 'free')
ptr = CPtr.malloc(4)
ptr.free = free
diff --git a/test/dl/test_dl2.rb b/test/dl/test_dl2.rb
index ac1414920f..7b47fc8024 100644
--- a/test/dl/test_dl2.rb
+++ b/test/dl/test_dl2.rb
@@ -88,14 +88,16 @@ class TestDL < TestBase
assert_in_delta(-0.1, x)
end
- def test_sin()
+ def test_sin
pi_2 = Math::PI/2
- cfunc = CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin')
- x = cfunc.call([pi_2].pack("d").unpack("l!*"))
+ cfunc = Function.new(CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin'),
+ [TYPE_DOUBLE])
+ x = cfunc.call(pi_2)
assert_equal(Math.sin(pi_2), x)
- cfunc = CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin')
- x = cfunc.call([-pi_2].pack("d").unpack("l!*"))
+ cfunc = Function.new(CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin'),
+ [TYPE_DOUBLE])
+ x = cfunc.call(-pi_2)
assert_equal(Math.sin(-pi_2), x)
end
diff --git a/test/dl/test_func.rb b/test/dl/test_func.rb
index 86ac6301a4..3900af3d5f 100644
--- a/test/dl/test_func.rb
+++ b/test/dl/test_func.rb
@@ -3,6 +3,36 @@ require 'dl/func'
module DL
class TestFunc < TestBase
+ def test_name
+ f = Function.new(CFunc.new(@libc['strcpy'], TYPE_VOIDP, 'strcpy'),
+ [TYPE_VOIDP, TYPE_VOIDP])
+ assert_equal 'strcpy', f.name
+ end
+
+ def test_to_i
+ cfunc = CFunc.new(@libc['strcpy'], TYPE_VOIDP, 'strcpy')
+ f = Function.new(cfunc, [TYPE_VOIDP, TYPE_VOIDP])
+ assert_equal cfunc.to_i, f.to_i
+ end
+
+ def test_random
+ f = Function.new(CFunc.new(@libc['srand'], TYPE_VOID, 'srand'),
+ [-TYPE_LONG])
+ assert_nil f.call(10)
+ end
+
+ def test_sinf
+ f = Function.new(CFunc.new(@libm['sinf'], TYPE_FLOAT, 'sinf'),
+ [TYPE_FLOAT])
+ assert_in_delta 1.0, f.call(90 * Math::PI / 180), 0.0001
+ end
+
+ def test_sin
+ f = Function.new(CFunc.new(@libm['sin'], TYPE_DOUBLE, 'sin'),
+ [TYPE_DOUBLE])
+ assert_in_delta 1.0, f.call(90 * Math::PI / 180), 0.0001
+ end
+
def test_strcpy()
f = Function.new(CFunc.new(@libc['strcpy'], TYPE_VOIDP, 'strcpy'),
[TYPE_VOIDP, TYPE_VOIDP])
@@ -35,8 +65,8 @@ module DL
[TYPE_VOIDP, TYPE_VOIDP])
buff1 = CPtr["12.34"]
buff2 = buff1 + 4
- r = f.call(buff1, buff2)
- assert_match(12.00..13.00, r)
+ r = f.call(buff1, - buff2)
+ assert_in_delta(12.34, r, 0.001)
end
def test_qsort1()
diff --git a/test/dl/test_handle.rb b/test/dl/test_handle.rb
index f2b1de3c20..7a7d5bd71c 100644
--- a/test/dl/test_handle.rb
+++ b/test/dl/test_handle.rb
@@ -1,4 +1,4 @@
-require 'test_base'
+require_relative 'test_base'
module DL
class TestHandle < TestBase
@@ -124,8 +124,35 @@ module DL
end
def test_NEXT
- handle = DL::Handle::NEXT
- assert handle['malloc']
+ begin
+ # Linux / Darwin
+ #
+ # There are two special pseudo-handles, RTLD_DEFAULT and RTLD_NEXT. The former will find
+ # the first occurrence of the desired symbol using the default library search order. The
+ # latter will find the next occurrence of a function in the search order after the current
+ # library. This allows one to provide a wrapper around a function in another shared
+ # library.
+ # --- Ubuntu Linux 8.04 dlsym(3)
+ handle = DL::Handle::NEXT
+ assert handle['malloc']
+ rescue
+ # BSD
+ #
+ # If dlsym() is called with the special handle RTLD_NEXT, then the search
+ # for the symbol is limited to the shared objects which were loaded after
+ # the one issuing the call to dlsym(). Thus, if the function is called
+ # from the main program, all the shared libraries are searched. If it is
+ # called from a shared library, all subsequent shared libraries are
+ # searched. RTLD_NEXT is useful for implementing wrappers around library
+ # functions. For example, a wrapper function getpid() could access the
+ # “real†getpid() with dlsym(RTLD_NEXT, "getpid"). (Actually, the dlfunc()
+ # interface, below, should be used, since getpid() is a function and not a
+ # data object.)
+ # --- FreeBSD 8.0 dlsym(3)
+ require 'objspace'
+ handle = DL::Handle::NEXT
+ assert handle['Init_objspace']
+ end
end
def test_DEFAULT
diff --git a/test/dl/test_method.rb b/test/dl/test_method.rb
new file mode 100644
index 0000000000..e1ed5ed88b
--- /dev/null
+++ b/test/dl/test_method.rb
@@ -0,0 +1,11 @@
+require_relative 'test_base'
+require 'dl/func'
+
+module DL
+ class TestMethod < TestBase
+ def test_method_call
+ f = Method.new(@libc['sinf'], [TYPE_FLOAT], TYPE_FLOAT)
+ assert_in_delta 1.0, f.call(90 * Math::PI / 180), 0.0001
+ end
+ end
+end
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index c89f51f47b..38e9b74155 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -2,15 +2,16 @@ require 'test/unit'
require 'drb/drb'
require 'drb/extservm'
require 'timeout'
+require 'shellwords'
require_relative '../ruby/envutil'
class DRbService
@@manager = DRb::ExtServManager.new
- @@ruby = EnvUtil.rubybin
+ @@ruby = Shellwords.escape(EnvUtil.rubybin)
@@ruby += " -d" if $DEBUG
def self.add_service_command(nm)
dir = File.dirname(File.expand_path(__FILE__))
- DRb::ExtServManager.command[nm] = "\"#{@@ruby}\" \"#{dir}/#{nm}\""
+ DRb::ExtServManager.command[nm] = "#{@@ruby} \"#{dir}/#{nm}\""
end
%w(ut_drb.rb ut_array.rb ut_port.rb ut_large.rb ut_safe1.rb ut_eval.rb).each do |nm|
diff --git a/test/drb/test_drb.rb b/test/drb/test_drb.rb
index 0548dc7aa0..293102333f 100644
--- a/test/drb/test_drb.rb
+++ b/test/drb/test_drb.rb
@@ -1,4 +1,4 @@
-require 'drbtest'
+require_relative 'drbtest'
class TestDRbCore < Test::Unit::TestCase
include DRbCore
diff --git a/test/drb/test_drbssl.rb b/test/drb/test_drbssl.rb
index cfb3bc36a4..8f6c4f2341 100644
--- a/test/drb/test_drbssl.rb
+++ b/test/drb/test_drbssl.rb
@@ -1,4 +1,4 @@
-require 'drbtest'
+require_relative 'drbtest'
begin
require 'drb/ssl'
diff --git a/test/drb/test_drbunix.rb b/test/drb/test_drbunix.rb
index e1a17edd3d..5b93f52d2c 100644
--- a/test/drb/test_drbunix.rb
+++ b/test/drb/test_drbunix.rb
@@ -1,4 +1,4 @@
-require 'drbtest'
+require_relative 'drbtest'
begin
require 'drb/unix'
diff --git a/test/erb/test_erb_m17n.rb b/test/erb/test_erb_m17n.rb
index 640b1e6c51..ff49228c26 100644
--- a/test/erb/test_erb_m17n.rb
+++ b/test/erb/test_erb_m17n.rb
@@ -23,35 +23,35 @@ class TestERB < Test::Unit::TestCase
def test_generate_magic_comment
erb = ERB.new("hello")
- assert_match /#coding:UTF-8/, erb.src
+ assert_match(/#coding:UTF-8/, erb.src)
erb = ERB.new("hello".force_encoding("EUC-JP"))
- assert_match /#coding:EUC-JP/, erb.src
+ assert_match(/#coding:EUC-JP/, erb.src)
erb = ERB.new("hello".force_encoding("ISO-8859-9"))
- assert_match /#coding:ISO-8859-9/, erb.src
+ assert_match(/#coding:ISO-8859-9/, erb.src)
end
def test_literal_encoding
erb = ERB.new("literal encoding is <%= 'hello'.encoding %>")
- assert_match /literal encoding is UTF-8/, erb.result
+ assert_match(/literal encoding is UTF-8/, erb.result)
erb = ERB.new("literal encoding is <%= 'ã“ã‚“ã«ã¡ã¯'.encoding %>".encode("EUC-JP"))
- assert_match /literal encoding is EUC-JP/, erb.result
+ assert_match(/literal encoding is EUC-JP/, erb.result)
erb = ERB.new("literal encoding is <%= '\xC4\xE3\xBA\xC3'.encoding %>".force_encoding("EUC-CN"))
- assert_match /literal encoding is GB2312/, erb.result
+ assert_match(/literal encoding is GB2312/, erb.result)
end
def test___ENCODING__
erb = ERB.new("__ENCODING__ is <%= __ENCODING__ %>")
- assert_match /__ENCODING__ is UTF-8/, erb.result
+ assert_match(/__ENCODING__ is UTF-8/, erb.result)
erb = ERB.new("__ENCODING__ is <%= __ENCODING__ %>".force_encoding("EUC-JP"))
- assert_match /__ENCODING__ is EUC-JP/, erb.result
+ assert_match(/__ENCODING__ is EUC-JP/, erb.result)
erb = ERB.new("__ENCODING__ is <%= __ENCODING__ %>".force_encoding("Big5"))
- assert_match /__ENCODING__ is Big5/, erb.result
+ assert_match(/__ENCODING__ is Big5/, erb.result)
end
def test_recognize_magic_comment
@@ -59,35 +59,35 @@ class TestERB < Test::Unit::TestCase
<%# -*- coding: EUC-KR -*- %>
안녕하세요
EOS
- assert_match /#coding:EUC-KR/, erb.src
+ assert_match(/#coding:EUC-KR/, erb.src)
assert_equal Encoding::EUC_KR, erb.result.encoding
erb = ERB.new(<<-EOS.encode("EUC-KR").force_encoding("ASCII-8BIT"))
<%#-*- coding: EUC-KR -*-%>
안녕하세요
EOS
- assert_match /#coding:EUC-KR/, erb.src
+ assert_match(/#coding:EUC-KR/, erb.src)
assert_equal Encoding::EUC_KR, erb.result.encoding
erb = ERB.new(<<-EOS.encode("EUC-KR").force_encoding("ASCII-8BIT"))
<%# vim: tabsize=8 encoding=EUC-KR shiftwidth=2 expandtab %>
안녕하세요
EOS
- assert_match /#coding:EUC-KR/, erb.src
+ assert_match(/#coding:EUC-KR/, erb.src)
assert_equal Encoding::EUC_KR, erb.result.encoding
erb = ERB.new(<<-EOS.encode("EUC-KR").force_encoding("ASCII-8BIT"))
<%#coding:EUC-KR %>
안녕하세요
EOS
- assert_match /#coding:EUC-KR/, erb.src
+ assert_match(/#coding:EUC-KR/, erb.src)
assert_equal Encoding::EUC_KR, erb.result.encoding
erb = ERB.new(<<-EOS.encode("EUC-KR").force_encoding("EUC-JP"))
<%#coding:EUC-KR %>
안녕하세요
EOS
- assert_match /#coding:EUC-KR/, erb.src
+ assert_match(/#coding:EUC-KR/, erb.src)
assert_equal Encoding::EUC_KR, erb.result.encoding
end
@@ -105,8 +105,8 @@ __ENCODING__ is <%= __ENCODING__ %>
result = obj.m_from_magic_comment
assert_equal Encoding::EUC_JP, result.encoding
- assert_match /literal encoding is EUC-JP/, result
- assert_match /__ENCODING__ is EUC-JP/, result
+ assert_match(/literal encoding is EUC-JP/, result)
+ assert_match(/__ENCODING__ is EUC-JP/, result)
erb = ERB.new(<<-EOS.encode("EUC-KR"))
literal encoding is <%= '안녕하세요'.encoding %>
@@ -115,8 +115,8 @@ EOS
erb.def_method(M, :m_from_eval_encoding)
result = obj.m_from_eval_encoding
assert_equal Encoding::EUC_KR, result.encoding
- assert_match /literal encoding is EUC-KR/, result
- assert_match /__ENCODING__ is EUC-KR/, result
+ assert_match(/literal encoding is EUC-KR/, result)
+ assert_match(/__ENCODING__ is EUC-KR/, result)
end
end
diff --git a/test/fileutils/test_dryrun.rb b/test/fileutils/test_dryrun.rb
index 2fdd65d2f6..e5ca25c9b4 100644
--- a/test/fileutils/test_dryrun.rb
+++ b/test/fileutils/test_dryrun.rb
@@ -15,7 +15,7 @@ class TestFileUtilsDryRun < Test::Unit::TestCase
"FileUtils::DryRun.#{m} not public"
end
FileUtils::METHODS.each do |m|
- assert_equal true, respond_to?(m, true)
+ assert_equal true, respond_to?(m, true),
"FileUtils::DryRun\##{m} is not defined"
assert_equal true, FileUtils::DryRun.private_method_defined?(m),
"FileUtils::DryRun\##{m} is not private"
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index 7138698274..048d255c60 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -452,7 +452,7 @@ class TestFileUtils
# [ruby-dev:39345]
touch 'tmp/[rmtmp]'
- rm_f 'tmp/[rmtmp]'
+ FileUtils.rm_f 'tmp/[rmtmp]'
assert_file_not_exist 'tmp/[rmtmp]'
end
@@ -726,7 +726,7 @@ class TestFileUtils
Dir.rmdir "tmp-first-line\ntmp-second-line"
end if lf_in_path_allowed?
- def test_mkdir_pathname
+ def test_mkdir_pathname
# pathname
assert_nothing_raised {
mkdir Pathname.new('tmp/tmpdirtmp')
diff --git a/test/matrix/test_matrix.rb b/test/matrix/test_matrix.rb
index 8e0848de01..526d7a3124 100644
--- a/test/matrix/test_matrix.rb
+++ b/test/matrix/test_matrix.rb
@@ -10,6 +10,15 @@ class TestMatrix < Test::Unit::TestCase
@n1 = Matrix[[2,3,4], [5,6,7]]
end
+ def test_matrix
+ assert_equal(1, @m1[0, 0])
+ assert_equal(2, @m1[0, 1])
+ assert_equal(3, @m1[0, 2])
+ assert_equal(4, @m1[1, 0])
+ assert_equal(5, @m1[1, 1])
+ assert_equal(6, @m1[1, 2])
+ end
+
def test_identity
assert_same @m1, @m1
assert_not_same @m1, @m2
@@ -144,4 +153,306 @@ class TestMatrix < Test::Unit::TestCase
assert_equal 3, m.transpose.rank
end
end
+
+ def test_inverse
+ assert_equal(Matrix[[-1, 1], [0, -1]], Matrix[[-1, -1], [0, -1]].inverse)
+ end
+
+ def test_determinant
+ assert_equal(45, Matrix[[7,6], [3,9]].determinant)
+ assert_equal(-18, Matrix[[2,0,1],[0,-2,2],[1,2,3]].determinant)
+ end
+
+ def test_new_matrix
+ assert_raise(TypeError) { Matrix[Object.new] }
+ o = Object.new
+ def o.to_ary; [1,2,3]; end
+ assert_equal(@m1, Matrix[o, [4,5,6]])
+ end
+
+ def test_rows
+ assert_equal(@m1, Matrix.rows([[1, 2, 3], [4, 5, 6]]))
+ end
+
+ def test_columns
+ assert_equal(@m1, Matrix.columns([[1, 4], [2, 5], [3, 6]]))
+ end
+
+ def test_diagonal
+ assert_equal(Matrix[[3,0,0],[0,2,0],[0,0,1]], Matrix.diagonal(3, 2, 1))
+ assert_equal(Matrix[[4,0,0,0],[0,3,0,0],[0,0,2,0],[0,0,0,1]], Matrix.diagonal(4, 3, 2, 1))
+ end
+
+ def test_scalar
+ assert_equal(Matrix[[2,0,0],[0,2,0],[0,0,2]], Matrix.scalar(3, 2))
+ assert_equal(Matrix[[2,0,0,0],[0,2,0,0],[0,0,2,0],[0,0,0,2]], Matrix.scalar(4, 2))
+ end
+
+ def test_identity2
+ assert_equal(Matrix[[1,0,0],[0,1,0],[0,0,1]], Matrix.identity(3))
+ assert_equal(Matrix[[1,0,0],[0,1,0],[0,0,1]], Matrix.unit(3))
+ assert_equal(Matrix[[1,0,0],[0,1,0],[0,0,1]], Matrix.I(3))
+ assert_equal(Matrix[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]], Matrix.identity(4))
+ end
+
+ def test_zero
+ assert_equal(Matrix[[0,0,0],[0,0,0],[0,0,0]], Matrix.zero(3))
+ assert_equal(Matrix[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]], Matrix.zero(4))
+ assert_equal(Matrix[[0]], Matrix.zero(1))
+ end
+
+ def test_row_vector
+ assert_equal(Matrix[[1,2,3,4]], Matrix.row_vector([1,2,3,4]))
+ end
+
+ def test_column_vector
+ assert_equal(Matrix[[1],[2],[3],[4]], Matrix.column_vector([1,2,3,4]))
+ end
+
+ def test_empty
+ m = Matrix.empty(2, 0)
+ assert_equal(Matrix[ [], [] ], m)
+ n = Matrix.empty(0, 3)
+ assert_equal(Matrix.columns([ [], [], [] ]), n)
+ assert_equal(Matrix[[0, 0, 0], [0, 0, 0]], m * n)
+ end
+
+ def test_row
+ assert_equal(Vector[1, 2, 3], @m1.row(0))
+ assert_equal(Vector[4, 5, 6], @m1.row(1))
+ a = []; @m1.row(0) {|x| a << x }
+ assert_equal([1, 2, 3], a)
+ end
+
+ def test_column
+ assert_equal(Vector[1, 4], @m1.column(0))
+ assert_equal(Vector[2, 5], @m1.column(1))
+ assert_equal(Vector[3, 6], @m1.column(2))
+ a = []; @m1.column(0) {|x| a << x }
+ assert_equal([1, 4], a)
+ end
+
+ def test_collect
+ assert_equal(Matrix[[1, 4, 9], [16, 25, 36]], @m1.collect {|x| x ** 2 })
+ end
+
+ def test_minor
+ assert_equal(Matrix[[1, 2], [4, 5]], @m1.minor(0..1, 0..1))
+ assert_equal(Matrix[[2], [5]], @m1.minor(0..1, 1..1))
+ assert_equal(Matrix[[4, 5]], @m1.minor(1..1, 0..1))
+ assert_equal(Matrix[[1, 2], [4, 5]], @m1.minor(0, 2, 0, 2))
+ assert_equal(Matrix[[4, 5]], @m1.minor(1, 1, 0, 2))
+ assert_equal(Matrix[[2], [5]], @m1.minor(0, 2, 1, 1))
+ assert_raise(ArgumentError) { @m1.minor(0) }
+ end
+
+ def test_regular?
+ assert(Matrix[[1, 0], [0, 1]].regular?)
+ assert(Matrix[[1, 0, 0], [0, 1, 0], [0, 0, 1]].regular?)
+ assert(!Matrix[[1, 0, 0], [0, 0, 1], [0, 0, 1]].regular?)
+ assert(!Matrix[[1, 0, 0], [0, 1, 0]].regular?)
+ end
+
+ def test_singular?
+ assert(!Matrix[[1, 0], [0, 1]].singular?)
+ assert(!Matrix[[1, 0, 0], [0, 1, 0], [0, 0, 1]].singular?)
+ assert(Matrix[[1, 0, 0], [0, 0, 1], [0, 0, 1]].singular?)
+ assert(Matrix[[1, 0, 0], [0, 1, 0]].singular?)
+ end
+
+ def test_square?
+ assert(Matrix[[1, 0], [0, 1]].square?)
+ assert(Matrix[[1, 0, 0], [0, 1, 0], [0, 0, 1]].square?)
+ assert(Matrix[[1, 0, 0], [0, 0, 1], [0, 0, 1]].square?)
+ assert(!Matrix[[1, 0, 0], [0, 1, 0]].square?)
+ end
+
+ def test_compare_by_row_vectors
+ assert(@m1.compare_by_row_vectors([[1, 2, 3], [4, 5, 6]]))
+ end
+
+ def test_mul
+ assert_equal(Matrix[[2,4],[6,8]], Matrix[[2,4],[6,8]] * Matrix.I(2))
+ assert_equal(Matrix[[4,8],[12,16]], Matrix[[2,4],[6,8]] * 2)
+ assert_equal(Matrix[[4,8],[12,16]], 2 * Matrix[[2,4],[6,8]])
+ assert_equal(Matrix[[14,32],[32,77]], @m1 * @m1.transpose)
+ assert_equal(Matrix[[17,22,27],[22,29,36],[27,36,45]], @m1.transpose * @m1)
+ assert_equal(Vector[14,32], @m1 * Vector[1,2,3])
+ o = Object.new
+ def o.coerce(m)
+ [m, m.transpose]
+ end
+ assert_equal(Matrix[[14,32],[32,77]], @m1 * o)
+ end
+
+ def test_add
+ assert_equal(Matrix[[6,0],[-4,12]], Matrix.scalar(2,5) + Matrix[[1,0],[-4,7]])
+ assert_equal(Matrix[[3,5,7],[9,11,13]], @m1 + @n1)
+ assert_equal(Matrix[[3,5,7],[9,11,13]], @n1 + @m1)
+ assert_equal(Matrix[[2],[4],[6]], Matrix[[1],[2],[3]] + Vector[1,2,3])
+ assert_raise(Matrix::ErrOperationNotDefined) { @m1 + 1 }
+ o = Object.new
+ def o.coerce(m)
+ [m, m]
+ end
+ assert_equal(Matrix[[2,4,6],[8,10,12]], @m1 + o)
+ end
+
+ def test_sub
+ assert_equal(Matrix[[4,0],[4,-2]], Matrix.scalar(2,5) - Matrix[[1,0],[-4,7]])
+ assert_equal(Matrix[[-1,-1,-1],[-1,-1,-1]], @m1 - @n1)
+ assert_equal(Matrix[[1,1,1],[1,1,1]], @n1 - @m1)
+ assert_equal(Matrix[[0],[0],[0]], Matrix[[1],[2],[3]] - Vector[1,2,3])
+ assert_raise(Matrix::ErrOperationNotDefined) { @m1 - 1 }
+ o = Object.new
+ def o.coerce(m)
+ [m, m]
+ end
+ assert_equal(Matrix[[0,0,0],[0,0,0]], @m1 - o)
+ end
+
+ def test_div
+ assert_equal(Matrix[[0,1,1],[2,2,3]], @m1 / 2)
+ assert_equal(Matrix[[1,1],[1,1]], Matrix[[2,2],[2,2]] / Matrix.scalar(2,2))
+ o = Object.new
+ def o.coerce(m)
+ [m, Matrix.scalar(2,2)]
+ end
+ assert_equal(Matrix[[1,1],[1,1]], Matrix[[2,2],[2,2]] / o)
+ end
+
+ def test_exp
+ assert_equal(Matrix[[67,96],[48,99]], Matrix[[7,6],[3,9]] ** 2)
+ assert_equal(Matrix.I(5), Matrix.I(5) ** -1)
+ assert_raise(Matrix::ErrOperationNotImplemented) { Matrix.I(5) ** 1.0 }
+ assert_raise(Matrix::ErrOperationNotDefined) { Matrix.I(5) ** Object.new }
+ end
+
+ def test_det
+ assert_in_delta(45.0, Matrix[[7,6],[3,9]].det, 0.0001)
+ assert_in_delta(0.0, Matrix[[0,0],[0,0]].det, 0.0001)
+ assert_in_delta(-7.0, Matrix[[0,0,1],[0,7,6],[1,3,9]].det, 0.0001)
+ assert_in_delta(0,0, @m1.det, 0.0001)
+ end
+
+ def test_det_e
+ assert_equal(45, Matrix[[7,6],[3,9]].det_e)
+ assert_equal(0, Matrix[[0,0],[0,0]].det_e)
+ assert_equal(-7, Matrix[[0,0,1],[0,7,6],[1,3,9]].det_e)
+ assert_equal(0, @m1.det_e)
+ end
+
+ def test_rank2
+ assert_equal(2, Matrix[[7,6],[3,9]].rank)
+ assert_equal(0, Matrix[[0,0],[0,0]].rank)
+ assert_equal(3, Matrix[[0,0,1],[0,7,6],[1,3,9]].rank)
+ assert_equal(2, @m1.rank)
+ end
+
+ def test_rank_e
+ assert_equal(2, Matrix[[7,6],[3,9]].rank_e)
+ assert_equal(0, Matrix[[0,0],[0,0]].rank_e)
+ assert_equal(3, Matrix[[0,0,1],[0,7,6],[1,3,9]].rank_e)
+ assert_equal(2, @m1.rank_e)
+ end
+
+ def test_trace
+ assert_equal(1+5+9, Matrix[[1,2,3],[4,5,6],[7,8,9]].trace)
+ end
+
+ def test_transpose
+ assert_equal(Matrix[[1,4],[2,5],[3,6]], @m1.transpose)
+ end
+
+ def test_row_vectors
+ assert_equal([Vector[1,2,3], Vector[4,5,6]], @m1.row_vectors)
+ end
+
+ def test_column_vectors
+ assert_equal([Vector[1,4], Vector[2,5], Vector[3,6]], @m1.column_vectors)
+ end
+
+ def test_elements_to_f
+ assert_equal(Matrix[[0.5,1.0,1.5],[2.0,2.5,3.0]], @m1.elements_to_f / 2)
+ end
+
+ def test_elements_to_i
+ assert_equal(Matrix[[0,1,1],[2,2,3]], (@m1.elements_to_f / 2).elements_to_i)
+ end
+
+ def test_elements_to_r
+ assert_equal(@m1.collect {|x| Rational(x, 2) }, @m1.elements_to_r / 2)
+ end
+
+ def test_to_s
+ assert_equal("Matrix[[1, 2, 3], [4, 5, 6]]", @m1.to_s)
+ assert_equal("Matrix.empty(0, 0)", Matrix[].to_s)
+ assert_equal("Matrix.empty(1, 0)", Matrix[[]].to_s)
+ end
+
+ def test_inspect
+ assert_equal("Matrix[[1, 2, 3], [4, 5, 6]]", @m1.inspect)
+ assert_equal("Matrix.empty(0, 0)", Matrix[].inspect)
+ assert_equal("Matrix.empty(1, 0)", Matrix[[]].inspect)
+ end
+
+ def test_scalar_add
+ s1 = @m1.coerce(1).first
+ assert_equal(Matrix[[1]], (s1 + 0) * Matrix[[1]])
+ assert_raise(Matrix::ErrOperationNotDefined) { s1 + Vector[0] }
+ assert_raise(Matrix::ErrOperationNotDefined) { s1 + Matrix[[0]] }
+ o = Object.new
+ def o.coerce(x)
+ [1, 1]
+ end
+ assert_equal(2, s1 + o)
+ end
+
+ def test_scalar_sub
+ s1 = @m1.coerce(1).first
+ assert_equal(Matrix[[1]], (s1 - 0) * Matrix[[1]])
+ assert_raise(Matrix::ErrOperationNotDefined) { s1 - Vector[0] }
+ assert_raise(Matrix::ErrOperationNotDefined) { s1 - Matrix[[0]] }
+ o = Object.new
+ def o.coerce(x)
+ [1, 1]
+ end
+ assert_equal(0, s1 - o)
+ end
+
+ def test_scalar_mul
+ s1 = @m1.coerce(1).first
+ assert_equal(Matrix[[1]], (s1 * 1) * Matrix[[1]])
+ assert_equal(Vector[2], s1 * Vector[2])
+ assert_equal(Matrix[[2]], s1 * Matrix[[2]])
+ o = Object.new
+ def o.coerce(x)
+ [1, 1]
+ end
+ assert_equal(1, s1 * o)
+ end
+
+ def test_scalar_div
+ s1 = @m1.coerce(1).first
+ assert_equal(Matrix[[1]], (s1 / 1) * Matrix[[1]])
+ assert_raise(Matrix::ErrOperationNotDefined) { s1 / Vector[0] }
+ assert_equal(Matrix[[Rational(1,2)]], s1 / Matrix[[2]])
+ o = Object.new
+ def o.coerce(x)
+ [1, 1]
+ end
+ assert_equal(1, s1 / o)
+ end
+
+ def test_scalar_pow
+ s1 = @m1.coerce(1).first
+ assert_equal(Matrix[[1]], (s1 ** 1) * Matrix[[1]])
+ assert_raise(Matrix::ErrOperationNotDefined) { s1 ** Vector[0] }
+ assert_raise(Matrix::ErrOperationNotImplemented) { s1 ** Matrix[[1]] }
+ o = Object.new
+ def o.coerce(x)
+ [1, 1]
+ end
+ assert_equal(1, s1 ** o)
+ end
end
diff --git a/test/matrix/test_vector.rb b/test/matrix/test_vector.rb
index 95a39693fc..9be54af4ea 100644
--- a/test/matrix/test_vector.rb
+++ b/test/matrix/test_vector.rb
@@ -46,4 +46,106 @@ class TestVector < Test::Unit::TestCase
assert_equal @v1.hash, @v2.hash
assert_equal @v1.hash, @v3.hash
end
+
+ def test_aref
+ assert_equal(1, @v1[0])
+ assert_equal(2, @v1[1])
+ assert_equal(3, @v1[2])
+ assert_equal(3, @v1[-1])
+ assert_equal(nil, @v1[3])
+ end
+
+ def test_size
+ assert_equal(3, @v1.size)
+ end
+
+ def test_each2
+ a = []
+ @v1.each2(@v4) {|x, y| a << [x, y] }
+ assert_equal([[1,1.0],[2,2.0],[3,3.0]], a)
+ end
+
+ def test_collect
+ a = @v1.collect {|x| x + 1 }
+ assert_equal(Vector[2,3,4], a)
+ end
+
+ def test_collect2
+ a = @v1.collect2(@v4) {|x, y| x + y }
+ assert_equal([2.0,4.0,6.0], a)
+ end
+
+ def test_map2
+ a = @v1.map2(@v4) {|x, y| x + y }
+ assert_equal(Vector[2.0,4.0,6.0], a)
+ end
+
+ def test_compare_by
+ assert(@v1.compare_by([1,2,3], :==))
+ assert(!@v1.compare_by([1,2,3], :equal?))
+ end
+
+ def test_mul
+ assert_equal(Vector[2,4,6], @v1 * 2)
+ assert_equal(Matrix[[1, 4, 9], [2, 8, 18], [3, 12, 27]], @v1 * Matrix[[1,4,9]])
+ assert_raise(Matrix::ErrOperationNotDefined) { @v1 * Vector[1,4,9] }
+ o = Object.new
+ def o.coerce(x)
+ [1, 1]
+ end
+ assert_equal(1, Vector[1, 2, 3] * o)
+ end
+
+ def test_add
+ assert_equal(Vector[2,4,6], @v1 + @v1)
+ assert_equal(Matrix[[2],[6],[12]], @v1 + Matrix[[1],[4],[9]])
+ o = Object.new
+ def o.coerce(x)
+ [1, 1]
+ end
+ assert_equal(2, Vector[1, 2, 3] + o)
+ end
+
+ def test_sub
+ assert_equal(Vector[0,0,0], @v1 - @v1)
+ assert_equal(Matrix[[0],[-2],[-6]], @v1 - Matrix[[1],[4],[9]])
+ o = Object.new
+ def o.coerce(x)
+ [1, 1]
+ end
+ assert_equal(0, Vector[1, 2, 3] - o)
+ end
+
+ def test_inner_product
+ assert_equal(1+4+9, @v1.inner_product(@v1))
+ end
+
+ def test_r
+ assert_equal(5, Vector[3, 4].r)
+ end
+
+ def test_covector
+ assert_equal(Matrix[[1,2,3]], @v1.covector)
+ end
+
+ def test_elements_to_f
+ assert_equal(Vector[0.5,1.0,1.5], @v1.elements_to_f * Rational(1, 2))
+ end
+
+ def test_elements_to_i
+ assert_equal(Vector[0,1,1], (@v1.elements_to_f * Rational(1, 2)).elements_to_i)
+ end
+
+ def test_elements_to_r
+ assert_equal(@v1.collect {|x| Rational(x, 2) }, @v1.elements_to_r * Rational(1, 2))
+ end
+
+ def test_to_s
+ assert_equal("Vector[1, 2, 3]", @v1.to_s)
+ end
+
+ def test_inspect
+ assert_equal("Vector[1, 2, 3]", @v1.inspect)
+ end
+
end
diff --git a/test/minitest/test_mini_test.rb b/test/minitest/test_mini_test.rb
index d8d5dfe7b3..f4c519ac9a 100644
--- a/test/minitest/test_mini_test.rb
+++ b/test/minitest/test_mini_test.rb
@@ -616,6 +616,27 @@ FILE:LINE:in `test_assert_raises_triggered_different'
assert_equal expected, actual
end
+ def test_assert_raises_triggered_different_msg
+ e = assert_raises MiniTest::Assertion do
+ @tc.assert_raises RuntimeError, "XXX" do
+ raise SyntaxError, "icky"
+ end
+ end
+
+ expected = "XXX
+[RuntimeError] exception expected, not
+Class: <SyntaxError>
+Message: <\"icky\">
+---Backtrace---
+FILE:LINE:in `test_assert_raises_triggered_different_msg'
+---------------"
+
+ actual = e.message.gsub(/^.+:\d+/, 'FILE:LINE')
+ actual.gsub!(/block \(\d+ levels\) in /, '') if RUBY_VERSION =~ /^1\.9/
+
+ assert_equal expected, actual
+ end
+
def test_assert_raises_triggered_none
e = assert_raises MiniTest::Assertion do
@tc.assert_raises MiniTest::Assertion do
@@ -628,6 +649,18 @@ FILE:LINE:in `test_assert_raises_triggered_different'
assert_equal expected, e.message
end
+ def test_assert_raises_triggered_none_msg
+ e = assert_raises MiniTest::Assertion do
+ @tc.assert_raises MiniTest::Assertion, "XXX" do
+ # do nothing
+ end
+ end
+
+ expected = "XXX\nMiniTest::Assertion expected but nothing was raised."
+
+ assert_equal expected, e.message
+ end
+
def test_assert_raises_triggered_subclass
e = assert_raises MiniTest::Assertion do
@tc.assert_raises StandardError do
diff --git a/test/mkmf/base.rb b/test/mkmf/base.rb
index 0a75744721..1b5b89e17c 100644
--- a/test/mkmf/base.rb
+++ b/test/mkmf/base.rb
@@ -5,8 +5,7 @@ require 'tmpdir'
$extout = '$(topdir)/'+RbConfig::CONFIG["EXTOUT"]
RbConfig::CONFIG['topdir'] = CONFIG['topdir'] = File.expand_path(CONFIG['topdir'])
RbConfig::CONFIG["extout"] = CONFIG["extout"] = $extout
-RbConfig::CONFIG["cppflags"] << " -I."
-CONFIG["cppflags"] << " -I."
+$INCFLAGS << " -I."
$extout_prefix = "$(extout)$(target_prefix)/"
class TestMkmf < Test::Unit::TestCase
diff --git a/test/mkmf/test_find_executable.rb b/test/mkmf/test_find_executable.rb
new file mode 100644
index 0000000000..87e1d03c51
--- /dev/null
+++ b/test/mkmf/test_find_executable.rb
@@ -0,0 +1,36 @@
+require_relative 'base'
+
+class TestMkmf
+ class TestFindExecutable < TestMkmf
+ class F
+ def do_find_executable(name)
+ find_executable(name)
+ end
+ end
+
+ def test_find_executable
+ bug2669 = '[ruby-core:27912]'
+ path, ENV["PATH"] = ENV["PATH"], path
+ ENV["PATH"] = @tmpdir
+ f = F.new
+ name = "foobar#{$$}#{rand(1000)}"
+ if /mswin\d|mingw|cygwin/ =~ RUBY_PLATFORM
+ exts = %w[.exe .com .cmd .bat]
+ else
+ exts = [""]
+ end
+ exts.each do |ext|
+ full = name+ext
+ begin
+ open(full, "w") {|ff| ff.chmod(0755)}
+ result = f.do_find_executable(name)
+ ensure
+ File.unlink(full)
+ end
+ assert_equal("#{@tmpdir}/#{name}#{ext}", result, bug2669)
+ end
+ ensure
+ ENV["PATH"] = path
+ end
+ end
+end
diff --git a/test/monitor/test_monitor.rb b/test/monitor/test_monitor.rb
index 973b3c2744..8591570b70 100644
--- a/test/monitor/test_monitor.rb
+++ b/test/monitor/test_monitor.rb
@@ -122,7 +122,7 @@ class TestMonitor < Test::Unit::TestCase
end
end
- def _test_timedwait
+ def test_timedwait
cond = @monitor.new_cond
b = "foo"
queue2 = Queue.new
@@ -153,7 +153,7 @@ class TestMonitor < Test::Unit::TestCase
@monitor.synchronize do
assert_equal("foo", c)
result3 = cond.wait(0.1)
- assert_equal(false, result3)
+ assert_equal(true, result3) # wait always returns true in Ruby 1.9
assert_equal("foo", c)
queue3.enq(nil)
result4 = cond.wait
diff --git a/test/net/imap/test_imap.rb b/test/net/imap/test_imap.rb
index 882487881d..b7714dff1a 100644
--- a/test/net/imap/test_imap.rb
+++ b/test/net/imap/test_imap.rb
@@ -215,16 +215,25 @@ class IMAPTest < Test::Unit::TestCase
begin
th = Thread.current
m = Monitor.new
+ in_idle = false
+ exception_raised = false
c = m.new_cond
Thread.start do
m.synchronize do
- c.wait
+ until in_idle
+ c.wait(0.1)
+ end
end
th.raise(Interrupt)
+ exception_raised = true
end
imap.idle do |res|
m.synchronize do
+ in_idle = true
c.signal
+ until exception_raised
+ c.wait(0.1)
+ end
end
end
rescue Interrupt
@@ -270,6 +279,34 @@ class IMAPTest < Test::Unit::TestCase
end
end
+ def test_unexpected_bye
+ server = TCPServer.new(0)
+ port = server.addr[1]
+ Thread.start do
+ begin
+ sock = server.accept
+ begin
+ sock.print("* OK Gimap ready for requests from 75.101.246.151 33if2752585qyk.26\r\n")
+ sock.gets
+ sock.print("* BYE System Error 33if2752585qyk.26\r\n")
+ ensure
+ sock.close
+ end
+ rescue
+ end
+ end
+ begin
+ begin
+ imap = Net::IMAP.new("localhost", :port => port)
+ assert_raise(Net::IMAP::ByeResponseError) do
+ imap.login("user", "password")
+ end
+ end
+ ensure
+ server.close
+ end
+ end
+
private
def imaps_test
diff --git a/test/net/imap/test_imap_response_parser.rb b/test/net/imap/test_imap_response_parser.rb
new file mode 100644
index 0000000000..f106e4a61d
--- /dev/null
+++ b/test/net/imap/test_imap_response_parser.rb
@@ -0,0 +1,66 @@
+require "net/imap"
+require "test/unit"
+
+class IMAPResponseParserTest < Test::Unit::TestCase
+ def setup
+ @do_not_reverse_lookup = Socket.do_not_reverse_lookup
+ Socket.do_not_reverse_lookup = true
+ if Net::IMAP.respond_to?(:max_flag_count)
+ @max_flag_count = Net::IMAP.max_flag_count
+ Net::IMAP.max_flag_count = 3
+ end
+ end
+
+ def teardown
+ Socket.do_not_reverse_lookup = @do_not_reverse_lookup
+ if Net::IMAP.respond_to?(:max_flag_count)
+ Net::IMAP.max_flag_count = @max_flag_count
+ end
+ end
+
+ def test_flag_list_safe
+ parser = Net::IMAP::ResponseParser.new
+ response = lambda {
+ $SAFE = 1
+ parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
+* LIST (\\HasChildren) "." "INBOX"
+EOF
+ }.call
+ assert_equal [:Haschildren], response.data.attr
+ end
+
+ def test_flag_list_too_many_flags
+ parser = Net::IMAP::ResponseParser.new
+ assert_nothing_raised do
+ 3.times do |i|
+ parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
+* LIST (\\Foo#{i}) "." "INBOX"
+EOF
+ end
+ end
+ assert_raise(Net::IMAP::FlagCountError) do
+ parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
+* LIST (\\Foo3) "." "INBOX"
+EOF
+ end
+ end
+
+ def test_flag_list_many_same_flags
+ parser = Net::IMAP::ResponseParser.new
+ assert_nothing_raised do
+ 100.times do
+ parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
+* LIST (\\Foo) "." "INBOX"
+EOF
+ end
+ end
+ end
+
+ def test_resp_text_code
+ parser = Net::IMAP::ResponseParser.new
+ response = parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
+* OK [CLOSED] Previous mailbox closed.
+EOF
+ assert_equal "CLOSED", response.data.code.name
+ end
+end
diff --git a/test/open-uri/test_open-uri.rb b/test/open-uri/test_open-uri.rb
index 3c596ce466..754f2d62a1 100644
--- a/test/open-uri/test_open-uri.rb
+++ b/test/open-uri/test_open-uri.rb
@@ -41,7 +41,7 @@ class TestOpenURI < Test::Unit::TestCase
end
def setup
- @proxies = %w[http_proxy ftp_proxy no_proxy]
+ @proxies = %w[http_proxy HTTP_PROXY ftp_proxy FTP_PROXY no_proxy]
@old_proxies = @proxies.map {|k| ENV[k] }
@proxies.each {|k| ENV[k] = nil }
end
diff --git a/test/open-uri/test_ssl.rb b/test/open-uri/test_ssl.rb
index 048227082d..0502f76346 100644
--- a/test/open-uri/test_ssl.rb
+++ b/test/open-uri/test_ssl.rb
@@ -35,7 +35,7 @@ class TestOpenURISSL < Test::Unit::TestCase
end
def setup
- @proxies = %w[http_proxy https_proxy ftp_proxy no_proxy]
+ @proxies = %w[http_proxy HTTP_PROXY https_proxy HTTPS_PROXY ftp_proxy FTP_PROXY no_proxy]
@old_proxies = @proxies.map {|k| ENV[k] }
@proxies.each {|k| ENV[k] = nil }
end
diff --git a/test/openssl/test_asn1.rb b/test/openssl/test_asn1.rb
index 86811a464c..04bbd7ff5c 100644
--- a/test/openssl/test_asn1.rb
+++ b/test/openssl/test_asn1.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative 'utils'
rescue LoadError
end
require 'test/unit'
diff --git a/test/openssl/test_config.rb b/test/openssl/test_config.rb
new file mode 100644
index 0000000000..9578bb2547
--- /dev/null
+++ b/test/openssl/test_config.rb
@@ -0,0 +1,15 @@
+require 'openssl'
+require "test/unit"
+
+class OpenSSL::TestConfig < Test::Unit::TestCase
+ def test_freeze
+ c = OpenSSL::Config.new
+ c['foo'] = [['key', 'value']]
+ c.freeze
+
+ # [ruby-core:18377]
+ assert_raise(RuntimeError, /frozen/) do
+ c['foo'] = [['key', 'wrong']]
+ end
+ end
+end
diff --git a/test/openssl/test_ns_spki.rb b/test/openssl/test_ns_spki.rb
index 3937132aa0..14895edb7d 100644
--- a/test/openssl/test_ns_spki.rb
+++ b/test/openssl/test_ns_spki.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative 'utils'
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_pkcs7.rb b/test/openssl/test_pkcs7.rb
index d86de36cc7..85e9b89b55 100644
--- a/test/openssl/test_pkcs7.rb
+++ b/test/openssl/test_pkcs7.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative 'utils'
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb
index e86b82110b..ef442d41d0 100644
--- a/test/openssl/test_ssl.rb
+++ b/test/openssl/test_ssl.rb
@@ -571,7 +571,7 @@ class OpenSSL::TestSSL < Test::Unit::TestCase
ctx_proc = Proc.new do |ctx, ssl|
foo_ctx = ctx.dup
- ctx.servername_cb = Proc.new do |ssl, hostname|
+ ctx.servername_cb = Proc.new do |ssl2, hostname|
case hostname
when 'foo.example.com'
foo_ctx
diff --git a/test/openssl/test_x509cert.rb b/test/openssl/test_x509cert.rb
index 398ab2ff34..4020d90a0e 100644
--- a/test/openssl/test_x509cert.rb
+++ b/test/openssl/test_x509cert.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative "utils"
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_x509crl.rb b/test/openssl/test_x509crl.rb
index e1f4e009cd..5a12c299a2 100644
--- a/test/openssl/test_x509crl.rb
+++ b/test/openssl/test_x509crl.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative "utils"
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_x509req.rb b/test/openssl/test_x509req.rb
index a37ed5c5ef..1ca56d7e05 100644
--- a/test/openssl/test_x509req.rb
+++ b/test/openssl/test_x509req.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative "utils"
rescue LoadError
end
require "test/unit"
diff --git a/test/openssl/test_x509store.rb b/test/openssl/test_x509store.rb
index fc7c35e3dd..7d0127abce 100644
--- a/test/openssl/test_x509store.rb
+++ b/test/openssl/test_x509store.rb
@@ -1,6 +1,6 @@
begin
require "openssl"
- require File.join(File.dirname(__FILE__), "utils.rb")
+ require_relative "utils"
rescue LoadError
end
require "test/unit"
diff --git a/test/optparse/test_getopts.rb b/test/optparse/test_getopts.rb
index fdefe5f3e5..1ba194ace1 100644
--- a/test/optparse/test_getopts.rb
+++ b/test/optparse/test_getopts.rb
@@ -1,4 +1,5 @@
require 'test/unit'
+require 'optparse'
class TestOptionParserGetopts < Test::Unit::TestCase
def setup
diff --git a/test/optparse/test_noarg.rb b/test/optparse/test_noarg.rb
index 329956a61a..3e6ed42f91 100644
--- a/test/optparse/test_noarg.rb
+++ b/test/optparse/test_noarg.rb
@@ -1,4 +1,4 @@
-require 'test_optparse'
+require_relative 'test_optparse'
module TestOptionParser::NoArg
class Def1 < TestOptionParser
diff --git a/test/optparse/test_optarg.rb b/test/optparse/test_optarg.rb
index 49cb1b93ec..2058e3719d 100644
--- a/test/optparse/test_optarg.rb
+++ b/test/optparse/test_optarg.rb
@@ -1,4 +1,4 @@
-require 'test_optparse'
+require_relative 'test_optparse'
class TestOptionParser::OptArg < TestOptionParser
def setup
diff --git a/test/optparse/test_placearg.rb b/test/optparse/test_placearg.rb
index ea5810cbc5..1aec01efb4 100644
--- a/test/optparse/test_placearg.rb
+++ b/test/optparse/test_placearg.rb
@@ -1,4 +1,4 @@
-require 'test_optparse'
+require_relative 'test_optparse'
class TestOptionParser::PlaceArg < TestOptionParser
def setup
diff --git a/test/optparse/test_reqarg.rb b/test/optparse/test_reqarg.rb
index 579794695a..47c9e9a8a7 100644
--- a/test/optparse/test_reqarg.rb
+++ b/test/optparse/test_reqarg.rb
@@ -1,4 +1,4 @@
-require 'test_optparse'
+require_relative 'test_optparse'
module TestOptionParser::ReqArg
class Def1 < TestOptionParser
diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb
new file mode 100644
index 0000000000..0ab59665a3
--- /dev/null
+++ b/test/resolv/test_dns.rb
@@ -0,0 +1,107 @@
+require 'test/unit'
+require 'resolv'
+require 'socket'
+
+class TestResolvDNS < Test::Unit::TestCase
+ def setup
+ @save_do_not_reverse_lookup = BasicSocket.do_not_reverse_lookup
+ BasicSocket.do_not_reverse_lookup = true
+ end
+
+ def teardown
+ BasicSocket.do_not_reverse_lookup = @save_do_not_reverse_lookup
+ end
+
+ def with_udp(host, port)
+ u = UDPSocket.new
+ begin
+ u.bind(host, port)
+ yield u
+ ensure
+ u.close
+ end
+ end
+
+ def test_query_ipv4_address
+ with_udp('127.0.0.1', 0) {|u|
+ _, server_port, _, server_address = u.addr
+ begin
+ th = Thread.new {
+ Resolv::DNS.open(:nameserver_port => [[server_address, server_port]]) {|dns|
+ dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A)
+ }
+ }
+ msg, (af, client_port, _, client_address) = u.recvfrom(4096)
+ id, word2, qdcount, ancount, nscount, arcount = msg.unpack("nnnnnn")
+ qr = (word2 & 0x8000) >> 15
+ opcode = (word2 & 0x7800) >> 11
+ aa = (word2 & 0x0400) >> 10
+ tc = (word2 & 0x0200) >> 9
+ rd = (word2 & 0x0100) >> 8
+ ra = (word2 & 0x0080) >> 7
+ z = (word2 & 0x0070) >> 4
+ rcode = word2 & 0x000f
+ rest = msg[12..-1]
+ assert_equal(0, qr) # 0:query 1:response
+ assert_equal(0, opcode) # 0:QUERY 1:IQUERY 2:STATUS
+ assert_equal(0, aa) # Authoritative Answer
+ assert_equal(0, tc) # TrunCation
+ assert_equal(1, rd) # Recursion Desired
+ assert_equal(0, ra) # Recursion Available
+ assert_equal(0, z) # Reserved for future use
+ assert_equal(0, rcode) # 0:No-error 1:Format-error 2:Server-failure 3:Name-Error 4:Not-Implemented 5:Refused
+ assert_equal(1, qdcount) # number of entries in the question section.
+ assert_equal(0, ancount) # number of entries in the answer section.
+ assert_equal(0, nscount) # number of entries in the authority records section.
+ assert_equal(0, arcount) # number of entries in the additional records section.
+ name = [3, "foo", 7, "example", 3, "org", 0].pack("Ca*Ca*Ca*C")
+ assert_operator(rest, :start_with?, name)
+ rest = rest[name.length..-1]
+ assert_equal(4, rest.length)
+ qtype, qclass = rest.unpack("nn")
+ assert_equal(1, qtype) # A
+ assert_equal(1, qtype) # IN
+ id = id
+ qr = 1
+ opcode = opcode
+ aa = 0
+ tc = 0
+ rd = rd
+ ra = 1
+ z = 0
+ rcode = 0
+ qdcount = 0
+ ancount = 1
+ nscount = 0
+ arcount = 0
+ word2 = (qr << 15) |
+ (opcode << 11) |
+ (aa << 10) |
+ (tc << 9) |
+ (rd << 8) |
+ (ra << 7) |
+ (z << 4) |
+ rcode
+ msg = [id, word2, qdcount, ancount, nscount, arcount].pack("nnnnnn")
+ type = 1
+ klass = 1
+ ttl = 3600
+ rdlength = 4
+ rdata = [192,0,2,1].pack("CCCC") # 192.0.2.1 (TEST-NET address) RFC 3330
+ rr = [name, type, klass, ttl, rdlength, rdata].pack("a*nnNna*")
+ msg << rr
+ u.send(msg, 0, client_address, client_port)
+ result = th.value
+ assert_instance_of(Array, result)
+ assert_equal(1, result.length)
+ rr = result[0]
+ assert_instance_of(Resolv::DNS::Resource::IN::A, rr)
+ assert_instance_of(Resolv::IPv4, rr.address)
+ assert_equal("192.0.2.1", rr.address.to_s)
+ assert_equal(3600, rr.ttl)
+ ensure
+ th.join
+ end
+ }
+ end
+end
diff --git a/test/rexml/test_document.rb b/test/rexml/test_document.rb
index 0261e80b74..1ee1a1d414 100644
--- a/test/rexml/test_document.rb
+++ b/test/rexml/test_document.rb
@@ -2,6 +2,25 @@ require "rexml/document"
require "test/unit"
class REXML::TestDocument < Test::Unit::TestCase
+ def test_version_attributes_to_s
+ doc = REXML::Document.new(<<-eoxml)
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
+ <svg id="svg2"
+ xmlns:sodipodi="foo"
+ xmlns:inkscape="bar"
+ sodipodi:version="0.32"
+ inkscape:version="0.44.1"
+ >
+ </svg>
+ eoxml
+
+ string = doc.to_s
+ assert_match('xmlns:sodipodi', string)
+ assert_match('xmlns:inkscape', string)
+ assert_match('sodipodi:version', string)
+ assert_match('inkscape:version', string)
+ end
+
def test_new
doc = REXML::Document.new(<<EOF)
<?xml version="1.0" encoding="UTF-8"?>
@@ -63,4 +82,14 @@ EOF
ensure
REXML::Document.entity_expansion_limit = 10000
end
+
+ def test_xml_declaration_standalone
+ bug2539 = '[ruby-core:27345]'
+ doc = REXML::Document.new('<?xml version="1.0" standalone="no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ doc = REXML::Document.new('<?xml version="1.0" standalone= "no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ doc = REXML::Document.new('<?xml version="1.0" standalone= "no" ?>')
+ assert_equal('no', doc.stand_alone?, bug2539)
+ end
end
diff --git a/test/ripper/dummyparser.rb b/test/ripper/dummyparser.rb
index ec8800b17b..ffc1f78ac6 100644
--- a/test/ripper/dummyparser.rb
+++ b/test/ripper/dummyparser.rb
@@ -179,7 +179,7 @@ class DummyParser < Ripper
end
def on_assoclist_from_args(a)
- Node.new('assocs', *a.list)
+ Node.new('assocs', *a)
end
(Ripper::PARSER_EVENTS.map(&:to_s) - instance_methods(false).map {|n|n.to_s.sub(/^on_/, '')}).each do |event|
diff --git a/test/ripper/test_files.rb b/test/ripper/test_files.rb
index 42475ed2d8..9aa45221dd 100644
--- a/test/ripper/test_files.rb
+++ b/test/ripper/test_files.rb
@@ -3,10 +3,11 @@ begin
require 'find'
require 'test/unit'
ripper_test = true
+ module TestRipper; end
rescue LoadError
end
-class TestRipper_Generic < Test::Unit::TestCase
+class TestRipper::Generic < Test::Unit::TestCase
SRCDIR = File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__))))
class Parser < Ripper
diff --git a/test/ripper/test_filter.rb b/test/ripper/test_filter.rb
index b398ebe5ed..005a5d81e2 100644
--- a/test/ripper/test_filter.rb
+++ b/test/ripper/test_filter.rb
@@ -2,10 +2,11 @@ begin
require 'ripper'
require 'test/unit'
ripper_test = true
+ module TestRipper; end
rescue LoadError
end
-class TestRipper_Filter < Test::Unit::TestCase
+class TestRipper::Filter < Test::Unit::TestCase
class Filter < Ripper::Filter
def on_default(event, token, data)
diff --git a/test/ripper/test_parser_events.rb b/test/ripper/test_parser_events.rb
index 6b37ff4da9..d28328da9d 100644
--- a/test/ripper/test_parser_events.rb
+++ b/test/ripper/test_parser_events.rb
@@ -3,13 +3,13 @@ begin
require_relative '../ruby/envutil'
require 'test/unit'
ripper_test = true
+ module TestRipper; end
rescue LoadError
end
-class TestRipper_ParserEvents < Test::Unit::TestCase
+class TestRipper::ParserEvents < Test::Unit::TestCase
# should be enabled
-=begin
def test_event_coverage
dispatched = Ripper::PARSER_EVENTS.map {|event,*| event }
dispatched.each do |e|
@@ -17,7 +17,6 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
"event not tested: #{e.inspect}"
end
end
-=end
def parse(str, nm = nil, &bl)
dp = DummyParser.new(str)
@@ -89,6 +88,33 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
assert_equal '[fcall(m,[1,2,*ref(a),&ref(b)])]', parse('m(1,2,*a,&b)')
end
+ def test_args_add
+ thru_args_add = false
+ parse('m(a)', :on_args_add) {thru_args_add = true}
+ assert_equal true, thru_args_add
+ end
+
+ def test_args_add_block
+ thru_args_add_block = false
+ parse('m(&b)', :on_args_add_block) {thru_args_add_block = true}
+ assert_equal true, thru_args_add_block
+ end
+
+ def test_args_add_star
+ thru_args_add_star = false
+ parse('m(*a)', :on_args_add_star) {thru_args_add_star = true}
+ assert_equal true, thru_args_add_star
+ thru_args_add_star = false
+ parse('m(*a, &b)', :on_args_add_star) {thru_args_add_star = true}
+ assert_equal true, thru_args_add_star
+ end
+
+ def test_args_new
+ thru_args_new = false
+ parse('m()', :on_args_new) {thru_args_new = true}
+ assert_equal true, thru_args_new
+ end
+
def test_arg_paren
# FIXME
end
@@ -98,12 +124,24 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
assert_equal '[aref(ref(v),[1,2])]', parse('v[1,2]')
end
+ def test_assoclist_from_args
+ thru_assoclist_from_args = false
+ parse('{a=>b}', :on_assoclist_from_args) {thru_assoclist_from_args = true}
+ assert_equal true, thru_assoclist_from_args
+ end
+
def test_assocs
assert_equal '[fcall(m,[assocs(assoc(1,2))])]', parse('m(1=>2)')
assert_equal '[fcall(m,[assocs(assoc(1,2),assoc(3,4))])]', parse('m(1=>2,3=>4)')
assert_equal '[fcall(m,[3,assocs(assoc(1,2))])]', parse('m(3,1=>2)')
end
+ def test_assoc_new
+ thru_assoc_new = false
+ parse('{a=>b}', :on_assoc_new) {thru_assoc_new = true}
+ assert_equal true, thru_assoc_new
+ end
+
def test_aref_field
assert_equal '[assign(aref_field(ref(a),[1]),2)]', parse('a[1]=2')
end
@@ -149,6 +187,21 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
assert_equal true, thru_assign_error
end
+ def test_bare_assoc_hash
+ thru_bare_assoc_hash = false
+ parse('x[a=>b]', :on_bare_assoc_hash) {thru_bare_assoc_hash = true}
+ assert_equal true, thru_bare_assoc_hash
+ thru_bare_assoc_hash = false
+ parse('x[1, a=>b]', :on_bare_assoc_hash) {thru_bare_assoc_hash = true}
+ assert_equal true, thru_bare_assoc_hash
+ thru_bare_assoc_hash = false
+ parse('x(a=>b)', :on_bare_assoc_hash) {thru_bare_assoc_hash = true}
+ assert_equal true, thru_bare_assoc_hash
+ thru_bare_assoc_hash = false
+ parse('x(1, a=>b)', :on_bare_assoc_hash) {thru_bare_assoc_hash = true}
+ assert_equal true, thru_bare_assoc_hash
+ end
+
def test_begin
thru_begin = false
parse('begin end', :on_begin) {thru_begin = true}
@@ -164,6 +217,41 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
end
end
+ def test_blockarg
+ thru_blockarg = false
+ parse("def a(&b) end", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+ thru_blockarg = false
+ parse("def a(x, &b) end", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+
+ thru_blockarg = false
+ parse("proc{|&b|}", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+ thru_blockarg = false
+ parse("proc{|x, &b|}", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+ thru_blockarg = false
+ parse("proc{|&b;y|}", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+ thru_blockarg = false
+ parse("proc{|&b,x;y|}", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+
+ thru_blockarg = false
+ parse("proc do |&b| end", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+ thru_blockarg = false
+ parse("proc do |&b, x| end", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+ thru_blockarg = false
+ parse("proc do |&b;y| end", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+ thru_blockarg = false
+ parse("proc do |&b, x;y| end", :on_blockarg) {thru_blockarg = true}
+ assert_equal true, thru_blockarg
+ end
+
def test_block_var
thru_block_var = false
parse("proc{||}", :on_block_var) {thru_block_var = true}
@@ -198,6 +286,14 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
assert_equal true, thru_block_var
end
+ def test_block_var_add_block
+ # not used
+ end
+
+ def test_block_var_add_star
+ # not used
+ end
+
def test_bodystmt
thru_bodystmt = false
parse("class X\nend", :on_bodystmt) {thru_bodystmt = true}
@@ -222,6 +318,22 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
assert_equal "[call(ref(foo),.,call,[])]", tree
end
+ def test_excessed_comma
+ thru_excessed_comma = false
+ parse("proc{|x,|}", :on_excessed_comma) {thru_excessed_comma = true}
+ assert_equal true, thru_excessed_comma
+ thru_excessed_comma = false
+ parse("proc{|x,y,|}", :on_excessed_comma) {thru_excessed_comma = true}
+ assert_equal true, thru_excessed_comma
+
+ thru_excessed_comma = false
+ parse("proc do |x,| end", :on_excessed_comma) {thru_excessed_comma = true}
+ assert_equal true, thru_excessed_comma
+ thru_excessed_comma = false
+ parse("proc do |x,y,| end", :on_excessed_comma) {thru_excessed_comma = true}
+ assert_equal true, thru_excessed_comma
+ end
+
def test_heredoc
bug1921 = '[ruby-core:24855]'
thru_heredoc_beg = false
@@ -254,11 +366,11 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
thru_mlhs_add_star = false
tree = parse("a, *b = 1, 2", :on_mlhs_add_star) {thru_mlhs_add_star = true}
assert_equal true, thru_mlhs_add_star
- assert_match /mlhs_add_star\(mlhs_add\(mlhs_new\(\),a\),b\)/, tree
+ assert_match(/mlhs_add_star\(mlhs_add\(mlhs_new\(\),a\),b\)/, tree)
thru_mlhs_add_star = false
tree = parse("a, *b, c = 1, 2", :on_mlhs_add_star) {thru_mlhs_add_star = true}
assert_equal true, thru_mlhs_add_star
- assert_match /mlhs_add\(mlhs_add_star\(mlhs_add\(mlhs_new\(\),a\),b\),mlhs_add\(mlhs_new\(\),c\)\)/, tree, bug2232
+ assert_match(/mlhs_add\(mlhs_add_star\(mlhs_add\(mlhs_new\(\),a\),b\),mlhs_add\(mlhs_new\(\),c\)\)/, tree, bug2232)
end
def test_mlhs_new
@@ -276,335 +388,679 @@ class TestRipper_ParserEvents < Test::Unit::TestCase
assert_equal true, thru_mlhs_paren
end
-=begin
def test_brace_block
- assert_equal true, $thru__brace_block
+ thru_brace_block = false
+ parse('proc {}', :on_brace_block) {thru_brace_block = true}
+ assert_equal true, thru_brace_block
end
def test_break
- assert_equal true, $thru__break
+ thru_break = false
+ parse('proc {break}', :on_break) {thru_break = true}
+ assert_equal true, thru_break
end
def test_case
- assert_equal true, $thru__case
+ thru_case = false
+ parse('case foo when true; end', :on_case) {thru_case = true}
+ assert_equal true, thru_case
end
def test_class
- assert_equal true, $thru__class
+ thru_class = false
+ parse('class Foo; end', :on_class) {thru_class = true}
+ assert_equal true, thru_class
end
def test_class_name_error
- assert_equal true, $thru__class_name_error
+ thru_class_name_error = false
+ parse('class foo; end', :on_class_name_error) {thru_class_name_error = true}
+ assert_equal true, thru_class_name_error
end
def test_command
- assert_equal true, $thru__command
+ thru_command = false
+ parse('foo a b', :on_command) {thru_command = true}
+ assert_equal true, thru_command
end
def test_command_call
- assert_equal true, $thru__command_call
+ thru_command_call = false
+ parse('foo.bar a, b', :on_command_call) {thru_command_call = true}
+ assert_equal true, thru_command_call
end
def test_const_ref
- assert_equal true, $thru__const_ref
+ thru_const_ref = false
+ parse('class A;end', :on_const_ref) {thru_const_ref = true}
+ assert_equal true, thru_const_ref
+ thru_const_ref = false
+ parse('module A;end', :on_const_ref) {thru_const_ref = true}
+ assert_equal true, thru_const_ref
end
- def test_constpath_field
- assert_equal true, $thru__constpath_field
+ def test_const_path_field
+ thru_const_path_field = false
+ parse('foo::X = 1', :on_const_path_field) {thru_const_path_field = true}
+ assert_equal true, thru_const_path_field
end
- def test_constpath_ref
- assert_equal true, $thru__constpath_ref
+ def test_const_path_ref
+ thru_const_path_ref = false
+ parse('foo::X', :on_const_path_ref) {thru_const_path_ref = true}
+ assert_equal true, thru_const_path_ref
end
def test_def
- assert_equal true, $thru__def
+ thru_def = false
+ parse('def foo; end', :on_def) {
+ thru_def = true
+ }
+ assert_equal true, thru_def
end
def test_defined
- assert_equal true, $thru__defined
+ thru_defined = false
+ parse('defined?(x)', :on_defined) {thru_defined = true}
+ assert_equal true, thru_defined
end
def test_defs
- assert_equal true, $thru__defs
+ thru_defs = false
+ parse('def foo.bar; end', :on_defs) {thru_defs = true}
+ assert_equal true, thru_defs
end
def test_do_block
- assert_equal true, $thru__do_block
+ thru_do_block = false
+ parse('proc do end', :on_do_block) {thru_do_block = true}
+ assert_equal true, thru_do_block
end
def test_dot2
- assert_equal true, $thru__dot2
+ thru_dot2 = false
+ parse('a..b', :on_dot2) {thru_dot2 = true}
+ assert_equal true, thru_dot2
end
def test_dot3
- assert_equal true, $thru__dot3
+ thru_dot3 = false
+ parse('a...b', :on_dot3) {thru_dot3 = true}
+ assert_equal true, thru_dot3
end
def test_dyna_symbol
- assert_equal true, $thru__dyna_symbol
+ thru_dyna_symbol = false
+ parse(':"#{foo}"', :on_dyna_symbol) {thru_dyna_symbol = true}
+ assert_equal true, thru_dyna_symbol
end
def test_else
- assert_equal true, $thru__else
+ thru_else = false
+ parse('if foo; bar else zot end', :on_else) {thru_else = true}
+ assert_equal true, thru_else
end
def test_elsif
- assert_equal true, $thru__elsif
+ thru_elsif = false
+ parse('if foo; bar elsif qux; zot end', :on_elsif) {thru_elsif = true}
+ assert_equal true, thru_elsif
end
def test_ensure
- assert_equal true, $thru__ensure
+ thru_ensure = false
+ parse('begin foo ensure bar end', :on_ensure) {thru_ensure = true}
+ assert_equal true, thru_ensure
end
def test_fcall
- assert_equal true, $thru__fcall
+ thru_fcall = false
+ parse('foo()', :on_fcall) {thru_fcall = true}
+ assert_equal true, thru_fcall
end
def test_field
- assert_equal true, $thru__field
+ thru_field = false
+ parse('foo.x = 1', :on_field) {thru_field = true}
+ assert_equal true, thru_field
end
def test_for
- assert_equal true, $thru__for
+ thru_for = false
+ parse('for i in foo; end', :on_for) {thru_for = true}
+ assert_equal true, thru_for
end
def test_hash
- assert_equal true, $thru__hash
+ thru_hash = false
+ parse('{1=>2}', :on_hash) {thru_hash = true}
+ assert_equal true, thru_hash
+ thru_hash = false
+ parse('{a: 2}', :on_hash) {thru_hash = true}
+ assert_equal true, thru_hash
end
def test_if
- assert_equal true, $thru__if
+ thru_if = false
+ parse('if false; end', :on_if) {thru_if = true}
+ assert_equal true, thru_if
end
def test_if_mod
- assert_equal true, $thru__if_mod
+ thru_if_mod = false
+ parse('nil if nil', :on_if_mod) {thru_if_mod = true}
+ assert_equal true, thru_if_mod
end
def test_ifop
- assert_equal true, $thru__ifop
+ thru_ifop = false
+ parse('a ? b : c', :on_ifop) {thru_ifop = true}
+ assert_equal true, thru_ifop
end
- def test_iter_block
- assert_equal true, $thru__iter_block
+ def test_lambda
+ thru_lambda = false
+ parse('->{}', :on_lambda) {thru_lambda = true}
+ assert_equal true, thru_lambda
+ end
+
+ def test_magic_comment
+ thru_magic_comment = false
+ parse('# -*- foo:bar -*-', :on_magic_comment) {thru_magic_comment = true}
+ assert_equal true, thru_magic_comment
+ end
+
+ def test_method_add_block
+ thru_method_add_block = false
+ parse('a {}', :on_method_add_block) {thru_method_add_block = true}
+ assert_equal true, thru_method_add_block
+ thru_method_add_block = false
+ parse('a do end', :on_method_add_block) {thru_method_add_block = true}
+ assert_equal true, thru_method_add_block
end
def test_method_add_arg
- assert_equal true, $thru__method_add_arg
+ thru_method_add_arg = false
+ parse('a()', :on_method_add_arg) {thru_method_add_arg = true}
+ assert_equal true, thru_method_add_arg
+ thru_method_add_arg = false
+ parse('a {}', :on_method_add_arg) {thru_method_add_arg = true}
+ assert_equal true, thru_method_add_arg
+ thru_method_add_arg = false
+ parse('a.b(1)', :on_method_add_arg) {thru_method_add_arg = true}
+ assert_equal true, thru_method_add_arg
+ thru_method_add_arg = false
+ parse('a::b(1)', :on_method_add_arg) {thru_method_add_arg = true}
+ assert_equal true, thru_method_add_arg
end
def test_module
- assert_equal true, $thru__module
+ thru_module = false
+ parse('module A; end', :on_module) {thru_module = true}
+ assert_equal true, thru_module
end
def test_mrhs_add
- assert_equal true, $thru__mrhs_add
+ thru_mrhs_add = false
+ parse('a = a, b', :on_mrhs_add) {thru_mrhs_add = true}
+ assert_equal true, thru_mrhs_add
end
def test_mrhs_add_star
- assert_equal true, $thru__mrhs_add_star
+ thru_mrhs_add_star = false
+ parse('a = a, *b', :on_mrhs_add_star) {thru_mrhs_add_star = true}
+ assert_equal true, thru_mrhs_add_star
end
def test_mrhs_new
- assert_equal true, $thru__mrhs_new
+ thru_mrhs_new = false
+ parse('a = *a', :on_mrhs_new) {thru_mrhs_new = true}
+ assert_equal true, thru_mrhs_new
end
- def test_mrhs_new_from_arglist
- assert_equal true, $thru__mrhs_new_from_arglist
+ def test_mrhs_new_from_args
+ thru_mrhs_new_from_args = false
+ parse('a = a, b', :on_mrhs_new_from_args) {thru_mrhs_new_from_args = true}
+ assert_equal true, thru_mrhs_new_from_args
end
def test_next
- assert_equal true, $thru__next
+ thru_next = false
+ parse('a {next}', :on_next) {thru_next = true}
+ assert_equal true, thru_next
end
def test_opassign
- assert_equal true, $thru__opassign
+ thru_opassign = false
+ parse('a += b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a -= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a *= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a /= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a %= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a **= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a &= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a |= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a <<= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a >>= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a &&= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
+ thru_opassign = false
+ parse('a ||= b', :on_opassign) {thru_opassign = true}
+ assert_equal true, thru_opassign
end
def test_param_error
- assert_equal true, $thru__param_error
+ thru_param_error = false
+ parse('def foo(A) end', :on_param_error) {thru_param_error = true}
+ assert_equal true, thru_param_error
+ thru_param_error = false
+ parse('def foo($a) end', :on_param_error) {thru_param_error = true}
+ assert_equal true, thru_param_error
+ thru_param_error = false
+ parse('def foo(@a) end', :on_param_error) {thru_param_error = true}
+ assert_equal true, thru_param_error
+ thru_param_error = false
+ parse('def foo(@@a) end', :on_param_error) {thru_param_error = true}
+ assert_equal true, thru_param_error
end
def test_params
- assert_equal true, $thru__params
+ thru_params = false
+ parse('a {||}', :on_params) {thru_params = true}
+ assert_equal true, thru_params
+ thru_params = false
+ parse('a {|x|}', :on_params) {thru_params = true}
+ assert_equal true, thru_params
+ thru_params = false
+ parse('a {|*x|}', :on_params) {thru_params = true}
+ assert_equal true, thru_params
end
def test_paren
- assert_equal true, $thru__paren
+ thru_paren = false
+ parse('()', :on_paren) {thru_paren = true}
+ assert_equal true, thru_paren
end
def test_parse_error
- assert_equal true, $thru__parse_error
+ thru_parse_error = false
+ parse('<>', :on_parse_error) {thru_parse_error = true}
+ assert_equal true, thru_parse_error
end
def test_qwords_add
- assert_equal true, $thru__qwords_add
+ thru_qwords_add = false
+ parse('%w[a]', :on_qwords_add) {thru_qwords_add = true}
+ assert_equal true, thru_qwords_add
end
def test_qwords_new
- assert_equal true, $thru__qwords_new
+ thru_qwords_new = false
+ parse('%w[]', :on_qwords_new) {thru_qwords_new = true}
+ assert_equal true, thru_qwords_new
end
def test_redo
- assert_equal true, $thru__redo
+ thru_redo = false
+ parse('redo', :on_redo) {thru_redo = true}
+ assert_equal true, thru_redo
end
def test_regexp_literal
- assert_equal true, $thru__regexp_literal
+ thru_regexp_literal = false
+ parse('//', :on_regexp_literal) {thru_regexp_literal = true}
+ assert_equal true, thru_regexp_literal
end
def test_rescue
- assert_equal true, $thru__rescue
+ thru_rescue = false
+ parse('begin; rescue; end', :on_rescue) {thru_rescue = true}
+ assert_equal true, thru_rescue
end
def test_rescue_mod
- assert_equal true, $thru__rescue_mod
+ thru_rescue_mod = false
+ parse('nil rescue nil', :on_rescue_mod) {thru_rescue_mod = true}
+ assert_equal true, thru_rescue_mod
end
- def test_restparam
- assert_equal true, $thru__restparam
+ def test_rest_param
+ thru_rest_param = false
+ parse('def a(*) end', :on_rest_param) {thru_rest_param = true}
+ assert_equal true, thru_rest_param
+ thru_rest_param = false
+ parse('def a(*x) end', :on_rest_param) {thru_rest_param = true}
+ assert_equal true, thru_rest_param
end
def test_retry
- assert_equal true, $thru__retry
+ thru_retry = false
+ parse('retry', :on_retry) {thru_retry = true}
+ assert_equal true, thru_retry
end
def test_return
- assert_equal true, $thru__return
+ thru_return = false
+ parse('return a', :on_return) {thru_return = true}
+ assert_equal true, thru_return
end
def test_return0
- assert_equal true, $thru__return0
+ thru_return0 = false
+ parse('return', :on_return0) {thru_return0 = true}
+ assert_equal true, thru_return0
end
def test_sclass
- assert_equal true, $thru__sclass
- end
-
- def test_space
- assert_equal true, $thru__space
+ thru_sclass = false
+ parse('class << a; end', :on_sclass) {thru_sclass = true}
+ assert_equal true, thru_sclass
end
def test_string_add
- assert_equal true, $thru__string_add
+ thru_string_add = false
+ parse('"aa"', :on_string_add) {thru_string_add = true}
+ assert_equal true, thru_string_add
end
def test_string_concat
- assert_equal true, $thru__string_concat
+ thru_string_concat = false
+ parse('"a" "b"', :on_string_concat) {thru_string_concat = true}
+ assert_equal true, thru_string_concat
end
def test_string_content
- assert_equal true, $thru__string_content
+ thru_string_content = false
+ parse('""', :on_string_content) {thru_string_content = true}
+ assert_equal true, thru_string_content
+ thru_string_content = false
+ parse('"a"', :on_string_content) {thru_string_content = true}
+ assert_equal true, thru_string_content
+ thru_string_content = false
+ parse('%[a]', :on_string_content) {thru_string_content = true}
+ assert_equal true, thru_string_content
+ thru_string_content = false
+ parse('\'a\'', :on_string_content) {thru_string_content = true}
+ assert_equal true, thru_string_content
+ thru_string_content = false
+ parse('%<a>', :on_string_content) {thru_string_content = true}
+ assert_equal true, thru_string_content
+ thru_string_content = false
+ parse('%!a!', :on_string_content) {thru_string_content = true}
+ assert_equal true, thru_string_content
+ thru_string_content = false
+ parse('%q!a!', :on_string_content) {thru_string_content = true}
+ assert_equal true, thru_string_content
+ thru_string_content = false
+ parse('%Q!a!', :on_string_content) {thru_string_content = true}
+ assert_equal true, thru_string_content
end
def test_string_dvar
- assert_equal true, $thru__string_dvar
+ thru_string_dvar = false
+ parse('"#$a"', :on_string_dvar) {thru_string_dvar = true}
+ assert_equal true, thru_string_dvar
+ thru_string_dvar = false
+ parse('\'#$a\'', :on_string_dvar) {thru_string_dvar = true}
+ assert_equal false, thru_string_dvar
+ thru_string_dvar = false
+ parse('"#@a"', :on_string_dvar) {thru_string_dvar = true}
+ assert_equal true, thru_string_dvar
+ thru_string_dvar = false
+ parse('\'#@a\'', :on_string_dvar) {thru_string_dvar = true}
+ assert_equal false, thru_string_dvar
+ thru_string_dvar = false
+ parse('"#@@a"', :on_string_dvar) {thru_string_dvar = true}
+ assert_equal true, thru_string_dvar
+ thru_string_dvar = false
+ parse('\'#@@a\'', :on_string_dvar) {thru_string_dvar = true}
+ assert_equal false, thru_string_dvar
+ thru_string_dvar = false
+ parse('"#$1"', :on_string_dvar) {thru_string_dvar = true}
+ assert_equal true, thru_string_dvar
+ thru_string_dvar = false
+ parse('\'#$1\'', :on_string_dvar) {thru_string_dvar = true}
+ assert_equal false, thru_string_dvar
end
def test_string_embexpr
- assert_equal true, $thru__string_embexpr
+ thru_string_embexpr = false
+ parse('"#{}"', :on_string_embexpr) {thru_string_embexpr = true}
+ assert_equal true, thru_string_embexpr
+ thru_string_embexpr = false
+ parse('\'#{}\'', :on_string_embexpr) {thru_string_embexpr = true}
+ assert_equal false, thru_string_embexpr
end
def test_string_literal
- assert_equal true, $thru__string_literal
+ thru_string_literal = false
+ parse('""', :on_string_literal) {thru_string_literal = true}
+ assert_equal true, thru_string_literal
end
def test_super
- assert_equal true, $thru__super
+ thru_super = false
+ parse('super()', :on_super) {thru_super = true}
+ assert_equal true, thru_super
end
def test_symbol
- assert_equal true, $thru__symbol
+ thru_symbol = false
+ parse(':a', :on_symbol) {thru_symbol = true}
+ assert_equal true, thru_symbol
+ thru_symbol = false
+ parse(':$a', :on_symbol) {thru_symbol = true}
+ assert_equal true, thru_symbol
+ thru_symbol = false
+ parse(':@a', :on_symbol) {thru_symbol = true}
+ assert_equal true, thru_symbol
+ thru_symbol = false
+ parse(':@@a', :on_symbol) {thru_symbol = true}
+ assert_equal true, thru_symbol
+ thru_symbol = false
+ parse(':==', :on_symbol) {thru_symbol = true}
+ assert_equal true, thru_symbol
end
def test_symbol_literal
- assert_equal true, $thru__symbol_literal
+ thru_symbol_literal = false
+ parse(':a', :on_symbol_literal) {thru_symbol_literal = true}
+ assert_equal true, thru_symbol_literal
end
- def test_topconst_field
- assert_equal true, $thru__topconst_field
+ def test_top_const_field
+ thru_top_const_field = false
+ parse('::A=1', :on_top_const_field) {thru_top_const_field = true}
+ assert_equal true, thru_top_const_field
end
- def test_topconst_ref
- assert_equal true, $thru__topconst_ref
+ def test_top_const_ref
+ thru_top_const_ref = false
+ parse('::A', :on_top_const_ref) {thru_top_const_ref = true}
+ assert_equal true, thru_top_const_ref
end
def test_unary
- assert_equal true, $thru__unary
+ thru_unary = false
+ parse('not a 1, 2', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('not (a)', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('!a', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('-10', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('-10*2', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('-10.1', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('-10.1*2', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('-a', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('+a', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('~a', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
+ thru_unary = false
+ parse('not()', :on_unary) {thru_unary = true}
+ assert_equal true, thru_unary
end
def test_undef
- assert_equal true, $thru__undef
+ thru_undef = false
+ parse('undef a', :on_undef) {thru_undef = true}
+ assert_equal true, thru_undef
+ thru_undef = false
+ parse('undef <=>', :on_undef) {thru_undef = true}
+ assert_equal true, thru_undef
+ thru_undef = false
+ parse('undef a, b', :on_undef) {thru_undef = true}
+ assert_equal true, thru_undef
end
def test_unless
- assert_equal true, $thru__unless
+ thru_unless = false
+ parse('unless a; end', :on_unless) {thru_unless = true}
+ assert_equal true, thru_unless
end
def test_unless_mod
- assert_equal true, $thru__unless_mod
+ thru_unless_mod = false
+ parse('nil unless a', :on_unless_mod) {thru_unless_mod = true}
+ assert_equal true, thru_unless_mod
+ end
+
+ def test_until
+ thru_until = false
+ parse('until a; end', :on_until) {thru_until = true}
+ assert_equal true, thru_until
end
def test_until_mod
- assert_equal true, $thru__until_mod
+ thru_until_mod = false
+ parse('nil until a', :on_until_mod) {thru_until_mod = true}
+ assert_equal true, thru_until_mod
end
def test_var_field
- assert_equal true, $thru__var_field
+ thru_var_field = false
+ parse('a = 1', :on_var_field) {thru_var_field = true}
+ assert_equal true, thru_var_field
+ thru_var_field = false
+ parse('a += 1', :on_var_field) {thru_var_field = true}
+ assert_equal true, thru_var_field
end
def test_when
- assert_equal true, $thru__when
+ thru_when = false
+ parse('case a when b; end', :on_when) {thru_when = true}
+ assert_equal true, thru_when
+ thru_when = false
+ parse('case when a; end', :on_when) {thru_when = true}
+ assert_equal true, thru_when
end
def test_while
- assert_equal true, $thru__while
+ thru_while = false
+ parse('while a; end', :on_while) {thru_while = true}
+ assert_equal true, thru_while
end
def test_while_mod
- assert_equal true, $thru__while_mod
+ thru_while_mod = false
+ parse('nil while a', :on_while_mod) {thru_while_mod = true}
+ assert_equal true, thru_while_mod
end
def test_word_add
- assert_equal true, $thru__word_add
+ thru_word_add = false
+ parse('%W[a]', :on_word_add) {thru_word_add = true}
+ assert_equal true, thru_word_add
end
def test_word_new
- assert_equal true, $thru__word_new
+ thru_word_new = false
+ parse('%W[a]', :on_word_new) {thru_word_new = true}
+ assert_equal true, thru_word_new
end
def test_words_add
- assert_equal true, $thru__words_add
+ thru_words_add = false
+ parse('%W[a]', :on_words_add) {thru_words_add = true}
+ assert_equal true, thru_words_add
end
def test_words_new
- assert_equal true, $thru__words_new
+ thru_words_new = false
+ parse('%W[]', :on_words_new) {thru_words_new = true}
+ assert_equal true, thru_words_new
end
def test_xstring_add
- assert_equal true, $thru__xstring_add
+ thru_xstring_add = false
+ parse('`x`', :on_xstring_add) {thru_xstring_add = true}
+ assert_equal true, thru_xstring_add
end
def test_xstring_literal
- assert_equal true, $thru__xstring_literal
+ thru_xstring_literal = false
+ parse('``', :on_xstring_literal) {thru_xstring_literal = true}
+ assert_equal true, thru_xstring_literal
end
def test_xstring_new
- assert_equal true, $thru__xstring_new
+ thru_xstring_new = false
+ parse('``', :on_xstring_new) {thru_xstring_new = true}
+ assert_equal true, thru_xstring_new
end
def test_yield
- assert_equal true, $thru__yield
+ thru_yield = false
+ parse('yield a', :on_yield) {thru_yield = true}
+ assert_equal true, thru_yield
end
def test_yield0
- assert_equal true, $thru__yield0
+ thru_yield0 = false
+ parse('yield', :on_yield0) {thru_yield0 = true}
+ assert_equal true, thru_yield0
end
def test_zsuper
- assert_equal true, $thru__zsuper
+ thru_zsuper = false
+ parse('super', :on_zsuper) {thru_zsuper = true}
+ assert_equal true, thru_zsuper
end
-=end
def test_local_variables
cmd = 'command(w,[regexp_literal(xstring_add(xstring_new(),25 # ),/)])'
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index d6997ff475..25e4b13e6c 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -5,10 +5,11 @@ begin
require 'ripper'
require 'test/unit'
ripper_test = true
+ module TestRipper; end
rescue LoadError
end
-class TestRipper_ScannerEvents < Test::Unit::TestCase
+class TestRipper::ScannerEvents < Test::Unit::TestCase
def test_event_coverage
dispatched = Ripper::SCANNER_EVENTS.map {|event,_| event }
diff --git a/test/rss/test_maker_0.9.rb b/test/rss/test_maker_0.9.rb
index 32aa183756..c36a0be580 100644
--- a/test/rss/test_maker_0.9.rb
+++ b/test/rss/test_maker_0.9.rb
@@ -453,5 +453,22 @@ module RSS
end
assert_nil(rss.channel.textInput)
end
+
+ def test_date_in_string
+ date = Time.now
+
+ rss = RSS::Maker.make("0.91") do |maker|
+ setup_dummy_channel(maker)
+ setup_dummy_image(maker)
+
+ maker.items.new_item do |item|
+ item.title = "The first item"
+ item.link = "http://example.com/blog/1.html"
+ item.date = date.rfc822
+ end
+ end
+
+ assert_equal(date.iso8601, rss.items[0].date.iso8601)
+ end
end
end
diff --git a/test/ruby/enc/test_utf16.rb b/test/ruby/enc/test_utf16.rb
index 52850e6376..90a8314067 100644
--- a/test/ruby/enc/test_utf16.rb
+++ b/test/ruby/enc/test_utf16.rb
@@ -369,7 +369,7 @@ EOT
assert(r =~ s, "#{encdump(r)} =~ #{encdump(s)}")
end
- def test_casecmp
+ def test_casecmp2
assert_equal(0, "\0A".force_encoding("UTF-16BE").casecmp("\0a".force_encoding("UTF-16BE")))
assert_not_equal(0, "\0A".force_encoding("UTF-16LE").casecmp("\0a".force_encoding("UTF-16LE")))
assert_not_equal(0, "A\0".force_encoding("UTF-16BE").casecmp("a\0".force_encoding("UTF-16BE")))
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index f0d5c2f8f6..1954dfc221 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -20,19 +20,16 @@ module EnvUtil
end
ruby = File.join("..", ruby)
end
- begin
- require "rbconfig"
- File.join(
- RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
- )
- rescue LoadError
+ if defined?(RbConfig.ruby)
+ RbConfig.ruby
+ else
"ruby"
end
end
module_function :rubybin
LANG_ENVS = %w"LANG LC_ALL LC_CTYPE"
+
def rubyexec(*args)
ruby = EnvUtil.rubybin
c = "C"
@@ -66,6 +63,56 @@ module EnvUtil
end
module_function :rubyexec
+ def invoke_ruby(args, stdin_data="", capture_stdout=false, capture_stderr=false, opt={})
+ begin
+ in_c, in_p = IO.pipe
+ out_p, out_c = IO.pipe if capture_stdout
+ err_p, err_c = IO.pipe if capture_stderr
+ c = "C"
+ env = {}
+ LANG_ENVS.each {|lc| env[lc], ENV[lc] = ENV[lc], c}
+ opt = opt.dup
+ opt[:in] = in_c
+ opt[:out] = out_c if capture_stdout
+ opt[:err] = err_c if capture_stderr
+ pid = spawn(EnvUtil.rubybin, *args, opt)
+ in_c.close
+ out_c.close if capture_stdout
+ err_c.close if capture_stderr
+ in_p.write stdin_data.to_str
+ in_p.close
+ th_stdout = Thread.new { out_p.read } if capture_stdout
+ th_stderr = Thread.new { err_p.read } if capture_stderr
+ if (!capture_stdout || th_stdout.join(10)) && (!capture_stderr || th_stderr.join(10))
+ stdout = th_stdout.value if capture_stdout
+ stderr = th_stderr.value if capture_stderr
+ else
+ raise Timeout::Error
+ end
+ out_p.close if capture_stdout
+ err_p.close if capture_stderr
+ Process.wait pid
+ status = $?
+ ensure
+ env.each_pair {|lc, v|
+ if v
+ ENV[lc] = v
+ else
+ ENV.delete(lc)
+ end
+ } if env
+ in_c.close if in_c && !in_c.closed?
+ in_p.close if in_p && !in_p.closed?
+ out_c.close if out_c && !out_c.closed?
+ out_p.close if out_p && !out_p.closed?
+ err_c.close if err_c && !err_c.closed?
+ err_p.close if err_p && !err_p.closed?
+ (th_stdout.kill; th_stdout.join) if th_stdout
+ (th_stderr.kill; th_stderr.join) if th_stderr
+ end
+ return stdout, stderr, status
+ end
+ module_function :invoke_ruby
def verbose_warning
class << (stderr = "")
@@ -126,31 +173,8 @@ module Test
out_p.close if out_p && !out_p.closed?
end
- LANG_ENVS = %w"LANG LC_ALL LC_CTYPE"
- def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil)
- in_c, in_p = IO.pipe
- out_p, out_c = IO.pipe
- err_p, err_c = IO.pipe
- c = "C"
- env = {}
- LANG_ENVS.each {|lc| env[lc], ENV[lc] = ENV[lc], c}
- pid = spawn(EnvUtil.rubybin, *args, STDIN=>in_c, STDOUT=>out_c, STDERR=>err_c)
- in_c.close
- out_c.close
- err_c.close
- in_p.write test_stdin
- in_p.close
- th_stdout = Thread.new { out_p.read }
- th_stderr = Thread.new { err_p.read }
- if th_stdout.join(10) && th_stderr.join(10)
- stdout = th_stdout.value
- stderr = th_stderr.value
- else
- flunk("timeout")
- end
- out_p.close
- err_p.close
- Process.wait pid
+ def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil, opt={})
+ stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, opt)
if block_given?
yield(stdout.lines.map {|l| l.chomp }, stderr.lines.map {|l| l.chomp })
else
@@ -165,24 +189,32 @@ module Test
assert_equal(test_stderr, stderr.lines.map {|l| l.chomp }, message)
end
end
- ensure
- env.each_pair {|lc, v|
- if v
- ENV[lc] = v
- else
- ENV.delete(lc)
- end
- } if env
- in_c.close if in_c && !in_c.closed?
- in_p.close if in_p && !in_p.closed?
- out_c.close if out_c && !out_c.closed?
- out_p.close if out_p && !out_p.closed?
- err_c.close if err_c && !err_c.closed?
- err_p.close if err_p && !err_p.closed?
- (th_stdout.kill; th_stdout.join) if th_stdout
- (th_stderr.kill; th_stderr.join) if th_stderr
end
+
+ def assert_ruby_status(args, test_stdin="", message=nil, opt={})
+ stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, false, false, opt)
+ m = message ? "#{message} (#{status.inspect})" : "ruby exit status is not success: #{status.inspect}"
+ assert(status.success?, m)
+ end
+
end
end
end
+begin
+ require 'rbconfig'
+rescue LoadError
+else
+ module RbConfig
+ @ruby = EnvUtil.rubybin
+ class << self
+ undef ruby if method_defined?(:ruby)
+ attr_reader :ruby
+ end
+ dir = File.dirname(ruby)
+ name = File.basename(ruby, CONFIG['EXEEXT'])
+ CONFIG['bindir'] = dir
+ CONFIG['ruby_install_name'] = name
+ CONFIG['RUBY_INSTALL_NAME'] = name
+ end
+end
diff --git a/test/ruby/test_alias.rb b/test/ruby/test_alias.rb
index 7f8a32c529..6320121bce 100644
--- a/test/ruby/test_alias.rb
+++ b/test/ruby/test_alias.rb
@@ -77,4 +77,31 @@ class TestAlias < Test::Unit::TestCase
end
assert_equal("ABC", x.try(:upcase), '[ruby-dev:38824]')
end
+
+ def test_special_const_alias
+ assert_raise(TypeError) do
+ 1.instance_eval do
+ alias to_string to_s
+ end
+ end
+ end
+
+ def test_alias_with_zsuper_method
+ c = Class.new
+ c.class_eval do
+ def foo
+ :ok
+ end
+ def bar
+ :ng
+ end
+ private :foo
+ end
+ d = Class.new(c)
+ d.class_eval do
+ public :foo
+ alias bar foo
+ end
+ assert_equal(:ok, d.new.bar)
+ end
end
diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb
index 0797190447..a0dbef0cb8 100644
--- a/test/ruby/test_array.rb
+++ b/test/ruby/test_array.rb
@@ -539,6 +539,9 @@ class TestArray < Test::Unit::TestCase
a = @cls[1, 2, 3]
a.concat(a)
assert_equal([1, 2, 3, 1, 2, 3], a)
+
+ assert_raise(TypeError) { [0].concat(:foo) }
+ assert_raise(RuntimeError) { [0].freeze.concat(:foo) }
end
def test_count
@@ -760,6 +763,40 @@ class TestArray < Test::Unit::TestCase
assert_match(/reentered/, e.message, '[ruby-dev:34798]')
end
+ def test_permutation_with_callcc
+ respond_to?(:callcc, true) or require 'continuation'
+ n = 1000
+ cont = nil
+ ary = [1,2,3]
+ begin
+ ary.permutation {
+ callcc {|k| cont = k} unless cont
+ }
+ rescue => e
+ end
+ n -= 1
+ cont.call if 0 < n
+ assert_instance_of(RuntimeError, e)
+ assert_match(/reentered/, e.message)
+ end
+
+ def test_combination_with_callcc
+ respond_to?(:callcc, true) or require 'continuation'
+ n = 1000
+ cont = nil
+ ary = [1,2,3]
+ begin
+ ary.combination(2) {
+ callcc {|k| cont = k} unless cont
+ }
+ rescue => e
+ end
+ n -= 1
+ cont.call if 0 < n
+ assert_instance_of(RuntimeError, e)
+ assert_match(/reentered/, e.message)
+ end
+
def test_hash
a1 = @cls[ 'cat', 'dog' ]
a2 = @cls[ 'cat', 'dog' ]
@@ -999,6 +1036,13 @@ class TestArray < Test::Unit::TestCase
assert_equal(@cls[4, 5, 6], a)
assert_equal(a_id, a.__id__)
assert_equal(@cls[], a.replace(@cls[]))
+
+ fa = a.dup.freeze
+ assert_nothing_raised(RuntimeError) { a.replace(a) }
+ assert_raise(RuntimeError) { fa.replace(fa) }
+ assert_raise(ArgumentError) { fa.replace() }
+ assert_raise(TypeError) { a.replace(42) }
+ assert_raise(RuntimeError) { fa.replace(42) }
end
def test_reverse
@@ -1140,6 +1184,9 @@ class TestArray < Test::Unit::TestCase
a = @cls[1, 2, 3, 4, 5]
assert_equal(nil, a.slice!(-6,2))
assert_equal(@cls[1, 2, 3, 4, 5], a)
+
+ assert_raise(ArgumentError) { @cls[1].slice! }
+ assert_raise(ArgumentError) { @cls[1].slice!(0, 0, 0) }
end
def test_sort
@@ -1150,6 +1197,8 @@ class TestArray < Test::Unit::TestCase
assert_equal(@cls[4, 3, 2, 1], a.sort { |x, y| y <=> x} )
assert_equal(@cls[4, 1, 2, 3], a)
+ assert_equal(@cls[1, 2, 3, 4], a.sort { |x, y| (x - y) * (2**100) })
+
a.fill(1)
assert_equal(@cls[1, 1, 1, 1], a.sort)
@@ -1286,6 +1335,11 @@ class TestArray < Test::Unit::TestCase
assert_equal(@cls[ "a:def", "b:abc", "c:jkl" ], c)
assert_nil(@cls[1, 2, 3].uniq!)
+
+ f = a.dup.freeze
+ assert_raise(ArgumentError) { a.uniq!(1) }
+ assert_raise(ArgumentError) { f.uniq!(1) }
+ assert_raise(RuntimeError) { f.uniq! }
end
def test_unshift
@@ -1413,14 +1467,18 @@ class TestArray < Test::Unit::TestCase
assert_equal([1, 1, 1], Array.new(3, 1) { 1 })
end
- def test_aset
+ def test_aset_error
assert_raise(IndexError) { [0][-2] = 1 }
assert_raise(IndexError) { [0][LONGP] = 2 }
assert_raise(IndexError) { [0][(LONGP + 1) / 2 - 1] = 2 }
+ assert_raise(IndexError) { [0][LONGP..-1] = 2 }
a = [0]
a[2] = 4
assert_equal([0, nil, 4], a)
assert_raise(ArgumentError) { [0][0, 0, 0] = 0 }
+ assert_raise(ArgumentError) { [0].freeze[0, 0, 0] = 0 }
+ assert_raise(TypeError) { [0][:foo] = 0 }
+ assert_raise(RuntimeError) { [0].freeze[:foo] = 0 }
end
def test_first2
@@ -1437,8 +1495,9 @@ class TestArray < Test::Unit::TestCase
assert_equal([2, 3], a)
end
- def test_unshift2
- Struct.new(:a, :b, :c)
+ def test_unshift_error
+ assert_raise(RuntimeError) { [].freeze.unshift('cat') }
+ assert_raise(RuntimeError) { [].freeze.unshift() }
end
def test_aref
@@ -1497,6 +1556,8 @@ class TestArray < Test::Unit::TestCase
assert_raise(ArgumentError) { a.insert }
assert_equal([0, 1, 2], a.insert(-1, 2))
assert_equal([0, 1, 3, 2], a.insert(-2, 3))
+ assert_raise(RuntimeError) { [0].freeze.insert(0)}
+ assert_raise(ArgumentError) { [0].freeze.insert }
end
def test_join2
@@ -1588,10 +1649,17 @@ class TestArray < Test::Unit::TestCase
assert_not_equal([a, a].hash, a.hash) # Implementation dependent
end
- def test_flatten2
+ def test_flatten_error
a = []
a << a
assert_raise(ArgumentError) { a.flatten }
+
+ f = [].freeze
+ assert_raise(ArgumentError) { a.flatten!(1, 2) }
+ assert_raise(TypeError) { a.flatten!(:foo) }
+ assert_raise(ArgumentError) { f.flatten!(1, 2) }
+ assert_raise(RuntimeError) { f.flatten! }
+ assert_raise(RuntimeError) { f.flatten!(:foo) }
end
def test_shuffle
@@ -1716,7 +1784,7 @@ class TestArray < Test::Unit::TestCase
assert_equal((1..10).to_a, a)
end
- def test_slice_freezed_array
+ def test_slice_frozen_array
a = [1,2,3,4,5].freeze
assert_equal([1,2,3,4], a[0,4])
assert_equal([2,3,4,5], a[1,4])
@@ -1727,4 +1795,55 @@ class TestArray < Test::Unit::TestCase
a.sort_by! {|x| -x }
assert_equal([5,4,3,2,1], a)
end
+
+ def test_rotate
+ a = [1,2,3,4,5].freeze
+ assert_equal([2,3,4,5,1], a.rotate)
+ assert_equal([5,1,2,3,4], a.rotate(-1))
+ assert_equal([3,4,5,1,2], a.rotate(2))
+ assert_equal([4,5,1,2,3], a.rotate(-2))
+ assert_equal([4,5,1,2,3], a.rotate(13))
+ assert_equal([3,4,5,1,2], a.rotate(-13))
+ a = [1].freeze
+ assert_equal([1], a.rotate)
+ assert_equal([1], a.rotate(2))
+ assert_equal([1], a.rotate(-4))
+ assert_equal([1], a.rotate(13))
+ assert_equal([1], a.rotate(-13))
+ a = [].freeze
+ assert_equal([], a.rotate)
+ assert_equal([], a.rotate(2))
+ assert_equal([], a.rotate(-4))
+ assert_equal([], a.rotate(13))
+ assert_equal([], a.rotate(-13))
+ a = [1,2,3]
+ assert_raise(ArgumentError) { a.rotate(1, 1) }
+ end
+
+ def test_rotate!
+ a = [1,2,3,4,5]
+ assert_equal([2,3,4,5,1], a.rotate!)
+ assert_equal([2,3,4,5,1], a)
+ assert_equal([4,5,1,2,3], a.rotate!(2))
+ assert_equal([5,1,2,3,4], a.rotate!(-4))
+ assert_equal([3,4,5,1,2], a.rotate!(13))
+ assert_equal([5,1,2,3,4], a.rotate!(-13))
+ a = [1]
+ assert_equal([1], a.rotate!)
+ assert_equal([1], a.rotate!(2))
+ assert_equal([1], a.rotate!(-4))
+ assert_equal([1], a.rotate!(13))
+ assert_equal([1], a.rotate!(-13))
+ a = []
+ assert_equal([], a.rotate!)
+ assert_equal([], a.rotate!(2))
+ assert_equal([], a.rotate!(-4))
+ assert_equal([], a.rotate!(13))
+ assert_equal([], a.rotate!(-13))
+ a = [].freeze
+ e = assert_raise(RuntimeError) {a.rotate!}
+ assert_match(/can't modify frozen array/, e.message)
+ a = [1,2,3]
+ assert_raise(ArgumentError) { a.rotate!(1, 1) }
+ end
end
diff --git a/test/ruby/test_basicinstructions.rb b/test/ruby/test_basicinstructions.rb
index 36a3b2b51d..ff14e4a7a6 100644
--- a/test/ruby/test_basicinstructions.rb
+++ b/test/ruby/test_basicinstructions.rb
@@ -64,7 +64,7 @@ class TestBasicInstructions < Test::Unit::TestCase
end
def test_regexp
- assert_equal /test/, /test/
+ assert_equal(/test/, /test/)
assert_equal 'test', /test/.source
assert_equal 'TEST', /TEST/.source
assert_equal true, !!(/test/ =~ 'test')
@@ -76,9 +76,9 @@ class TestBasicInstructions < Test::Unit::TestCase
assert_equal true, !!(re =~ 'test')
assert_equal false, !!(re =~ 'does not match')
- assert_equal /x#{1+1}x/, /x#{1+1}x/
+ assert_equal(/x#{1+1}x/, /x#{1+1}x/)
s = "OK"
- assert_equal /x#{s}x/, /x#{s}x/
+ assert_equal(/x#{s}x/, /x#{s}x/)
assert_equal true, !!(/x#{s}x/ =~ "xOKx")
assert_equal false, !!(/x#{s}x/ =~ "does not match")
diff --git a/test/ruby/test_beginendblock.rb b/test/ruby/test_beginendblock.rb
index 463ebd94b6..caed180613 100644
--- a/test/ruby/test_beginendblock.rb
+++ b/test/ruby/test_beginendblock.rb
@@ -41,6 +41,12 @@ class TestBeginEndBlock < Test::Unit::TestCase
end
end
+ def test_begininclass
+ assert_raise(SyntaxError) do
+ eval("class TestBeginEndBlock; BEGIN {}; end")
+ end
+ end
+
def test_endblockwarn
ruby = EnvUtil.rubybin
# Use Tempfile to create temporary file path.
@@ -74,8 +80,8 @@ EOW
'-e', 'raise %[SomethingElse]']) {|f|
f.read
}
- assert_match /SomethingBad/, out, "[ruby-core:9675]"
- assert_match /SomethingElse/, out, "[ruby-core:9675]"
+ assert_match(/SomethingBad/, out, "[ruby-core:9675]")
+ assert_match(/SomethingElse/, out, "[ruby-core:9675]")
end
def test_should_propagate_exit_code
@@ -93,7 +99,7 @@ EOW
'-e', 'at_exit{Process.kill(:INT, $$); loop{}}']) {|f|
f.read
}
- assert_match /Interrupt$/, out
+ assert_match(/Interrupt$/, out)
Process.kill(0, 0) rescue return # check if signal works
assert_nil $?.exitstatus
assert_equal Signal.list["INT"], $?.termsig
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb
index b77fd8f683..40c4f21c3f 100644
--- a/test/ruby/test_bignum.rb
+++ b/test/ruby/test_bignum.rb
@@ -175,6 +175,8 @@ class TestBignum < Test::Unit::TestCase
def test_to_f
assert_nothing_raised { T31P.to_f.to_i }
assert_raise(FloatDomainError) { (1024**1024).to_f.to_i }
+ assert_equal(1, (2**50000).to_f.infinite?)
+ assert_equal(-1, (-(2**50000)).to_f.infinite?)
end
def test_cmp
@@ -208,8 +210,9 @@ class TestBignum < Test::Unit::TestCase
assert_equal(-1, (x+1) - (x+2))
assert_equal(0, (2**100) - (2.0**100))
o = Object.new
- def o.coerce(x); [2**100+2, x]; end
- assert_equal(1, (2**100+1) - o)
+ def o.coerce(x); [x, 2**100+2]; end
+ assert_equal(-1, (2**100+1) - o)
+ assert_equal(-1, T_ONE - 2)
end
def test_plus
@@ -219,7 +222,7 @@ class TestBignum < Test::Unit::TestCase
assert_equal(1267651809154049016125877911552, (2**80) + (2**100))
assert_equal(2**101, (2**100) + (2.0**100))
o = Object.new
- def o.coerce(x); [2**80, x]; end
+ def o.coerce(x); [x, 2**80]; end
assert_equal(1267651809154049016125877911552, (2**100) + o)
end
@@ -232,7 +235,7 @@ class TestBignum < Test::Unit::TestCase
assert_equal(T32.to_f, T32 * 1.0)
assert_raise(TypeError) { T32 * "foo" }
o = Object.new
- def o.coerce(x); [2**100, x]; end
+ def o.coerce(x); [x, 2**100]; end
assert_equal(2**180, (2**80) * o)
end
@@ -413,4 +416,16 @@ class TestBignum < Test::Unit::TestCase
assert_in_delta(1.0, @fmax2.fdiv(@fmax2), 0.01)
end
+ def test_float_fdiv
+ b = 1E+300.to_i
+ assert_equal(b, (b ** 2).fdiv(b))
+ assert(@big.fdiv(0.0 / 0.0).nan?)
+ assert_in_delta(1E+300, (10**500).fdiv(1E+200), 1E+285)
+ end
+
+ def test_obj_fdiv
+ o = Object.new
+ def o.coerce(x); [x, 2**100]; end
+ assert_equal((2**200).to_f, (2**300).fdiv(o))
+ end
end
diff --git a/test/ruby/test_case.rb b/test/ruby/test_case.rb
index f9f16d55a2..c4bffa811f 100644
--- a/test/ruby/test_case.rb
+++ b/test/ruby/test_case.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require 'envutil.rb'
+require_relative 'envutil.rb'
class TestCase < Test::Unit::TestCase
def test_case
@@ -57,11 +57,11 @@ class TestCase < Test::Unit::TestCase
def test_deoptimization
assert_in_out_err(['-e', <<-EOS], '', %w[42], [])
- class Symbol; def ===(o); p 42; true; end; end; case :foo; when :foo; end
+ class Symbol; undef ===; def ===(o); p 42; true; end; end; case :foo; when :foo; end
EOS
assert_in_out_err(['-e', <<-EOS], '', %w[42], [])
- class Fixnum; def ===(o); p 42; true; end; end; case 1; when 1; end
+ class Fixnum; undef ===; def ===(o); p 42; true; end; end; case 1; when 1; end
EOS
end
end
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb
index a1f087ad63..3a0ced8be7 100644
--- a/test/ruby/test_class.rb
+++ b/test/ruby/test_class.rb
@@ -181,6 +181,8 @@ class TestClass < Test::Unit::TestCase
o = Object.new
c = class << o; self; end
assert_raise(TypeError) { c.dup }
+
+ assert_raise(TypeError) { BasicObject.dup }
end
def test_singleton_class
@@ -209,4 +211,13 @@ class TestClass < Test::Unit::TestCase
c = eval("class C\u{df}; self; end")
assert_equal("TestClass::C\u{df}", c.name, '[ruby-core:24600]')
end
+
+ def test_invalid_jump_from_class_definition
+ assert_raise(SyntaxError) { eval("class C; next; end") }
+ assert_raise(SyntaxError) { eval("class C; break; end") }
+ assert_raise(SyntaxError) { eval("class C; redo; end") }
+ assert_raise(SyntaxError) { eval("class C; retry; end") }
+ assert_raise(SyntaxError) { eval("class C; return; end") }
+ assert_raise(SyntaxError) { eval("class C; yield; end") }
+ end
end
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb
index 6885294f84..f6d65de6de 100644
--- a/test/ruby/test_complex.rb
+++ b/test/ruby/test_complex.rb
@@ -7,9 +7,10 @@ class Complex_Test < Test::Unit::TestCase
def setup
@rational = defined?(Rational)
if @rational
- @keiju = Rational.instance_variable_get('@RCS_ID')
+ @keiju = Rational.instance_variables.include?(:@RCS_ID)
end
- @unify = $".grep(/mathn/).size != 0
+ seps = [File::SEPARATOR, File::ALT_SEPARATOR].compact.map{|x| Regexp.escape(x)}.join("|")
+ @unify = $".grep(/(?:^|#{seps})mathn(?:\.(?:rb|so))?/).size != 0
end
def test_compsub
diff --git a/test/ruby/test_defined.rb b/test/ruby/test_defined.rb
index bfcd7fb667..07485bd2cc 100644
--- a/test/ruby/test_defined.rb
+++ b/test/ruby/test_defined.rb
@@ -12,6 +12,10 @@ class TestDefined < Test::Unit::TestCase
end
def baz(f)
end
+ attr_accessor :attr
+ def attrasgn_test
+ yield(defined?(self.attr = 1))
+ end
end
def defined_test
@@ -32,6 +36,7 @@ class TestDefined < Test::Unit::TestCase
assert(defined?(::Array)) # toplevel constant
assert(defined?(File::Constants)) # nested constant
assert(defined?(Object.new)) # method
+ assert(defined?(Object::new)) # method
assert(!defined?(Object.print)) # private method
assert(defined?(1 == 2)) # operator expression
@@ -45,6 +50,8 @@ class TestDefined < Test::Unit::TestCase
assert_nil(defined?(f.quux(x)))
assert(defined?(print(x)))
assert_nil(defined?(quux(x)))
+ assert(defined?(f.attr = 1))
+ f.attrasgn_test { |v| assert(v) }
assert(defined_test) # not iterator
assert(!defined_test{}) # called as iterator
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index eb315d3d85..236fd991db 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -162,6 +162,9 @@ class TestDir < Test::Unit::TestCase
assert_equal([], Dir.glob(File.join(@root, '[')))
assert_equal([], Dir.glob(File.join(@root, '[a-\\')))
+ assert_equal([File.join(@root, "a")], Dir.glob(File.join(@root, 'a\\')))
+ assert_equal((?a..?f).map {|f| File.join(@root, f) }.sort, Dir.glob(File.join(@root, '[abc/def]')).sort)
+
d = "\u{3042}\u{3044}".encode("utf-16le")
assert_raise(Encoding::CompatibilityError) {Dir.glob(d)}
m = Class.new {define_method(:to_path) {d}}
@@ -172,4 +175,40 @@ class TestDir < Test::Unit::TestCase
assert_equal(Dir.foreach(@root).to_a.sort, %w(. ..) + (?a..?z).to_a)
end
+ def test_dir_enc
+ dir = Dir.open(@root, encoding: "UTF-8")
+ begin
+ while name = dir.read
+ assert_equal(Encoding.find("UTF-8"), name.encoding)
+ end
+ ensure
+ dir.close
+ end
+
+ dir = Dir.open(@root, encoding: "ASCII-8BIT")
+ begin
+ while name = dir.read
+ assert_equal(Encoding.find("ASCII-8BIT"), name.encoding)
+ end
+ ensure
+ dir.close
+ end
+ end
+
+ def test_symlink
+ begin
+ ["dummy", *?a..?z].each do |f|
+ File.symlink(File.join(@root, f),
+ File.join(@root, "symlink-#{ f }"))
+ end
+ rescue NotImplementedError
+ return
+ end
+
+ assert_equal([*?a..?z, *"symlink-a".."symlink-z"].each_slice(2).map {|f, _| File.join(@root, f + "/") }.sort,
+ Dir.glob(File.join(@root, "*/")).sort)
+
+ Dir.glob(File.join(@root, "**/"))
+ end
+
end
diff --git a/test/ruby/test_dir_m17n.rb b/test/ruby/test_dir_m17n.rb
new file mode 100644
index 0000000000..fb37fe1342
--- /dev/null
+++ b/test/ruby/test_dir_m17n.rb
@@ -0,0 +1,193 @@
+require 'test/unit'
+require 'tmpdir'
+require_relative 'envutil'
+
+class TestDir_M17N < Test::Unit::TestCase
+ def with_tmpdir
+ Dir.mktmpdir {|dir|
+ Dir.chdir(dir) {
+ yield dir
+ }
+ }
+ end
+
+ ## UTF-8 default_external, no default_internal
+
+ def test_filename_extutf8
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+ filename = "\u3042"
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ }
+ end
+
+ def test_filename_extutf8_invalid
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EASCII-8BIT], <<-'EOS', nil, :chdir=>d)
+ filename = "\xff".force_encoding("ASCII-8BIT") # invalid byte sequence as UTF-8
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+ filename = "\xff".force_encoding("UTF-8") # invalid byte sequence as UTF-8
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ }
+ end
+
+ def test_filename_as_bytes_extutf8
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+ filename = "\xc2\xa1".force_encoding("utf-8")
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+ filename = "\xc2\xa1".force_encoding("euc-jp")
+ begin
+ open(filename) {}
+ exit true
+ rescue Errno::ENOENT
+ exit false
+ end
+ EOS
+ assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+ filename1 = "\xc2\xa1".force_encoding("utf-8")
+ filename2 = "\xc2\xa1".force_encoding("euc-jp")
+ filename3 = filename1.encode("euc-jp")
+ filename4 = filename2.encode("utf-8")
+ s1 = File.stat(filename1) rescue nil
+ s2 = File.stat(filename2) rescue nil
+ s3 = File.stat(filename3) rescue nil
+ s4 = File.stat(filename4) rescue nil
+ exit((s1 && s2 && !s3 && !s4) ? true : false)
+ EOS
+ }
+ end
+
+ ## UTF-8 default_external, EUC-JP default_internal
+
+ def test_filename_extutf8_inteucjp_representable
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+ filename = "\u3042"
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ assert_ruby_status(%w[-EUTF-8:EUC-JP], <<-'EOS', nil, :chdir=>d)
+ filename = "\xA4\xA2".force_encoding("euc-jp")
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ assert_ruby_status(%w[-EUTF-8:EUC-JP], <<-'EOS', nil, :chdir=>d)
+ filename = "\xA4\xA2".force_encoding("euc-jp")
+ begin
+ open(filename) {}
+ exit true
+ rescue Errno::ENOENT
+ exit false
+ end
+ EOS
+ }
+ end
+
+ def test_filename_extutf8_inteucjp_unrepresentable
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+ filename1 = "\u2661" # WHITE HEART SUIT which is not representable in EUC-JP
+ filename2 = "\u3042" # HIRAGANA LETTER A which is representable in EUC-JP
+ File.open(filename1, "w") {}
+ File.open(filename2, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename1) && ents.include?(filename2)
+ EOS
+ assert_ruby_status(%w[-EUTF-8:EUC-JP], <<-'EOS', nil, :chdir=>d)
+ filename1 = "\u2661" # WHITE HEART SUIT which is not representable in EUC-JP
+ filename2 = "\xA4\xA2".force_encoding("euc-jp") # HIRAGANA LETTER A in EUC-JP
+ ents = Dir.entries(".")
+ exit ents.include?(filename1) && ents.include?(filename2)
+ EOS
+ assert_ruby_status(%w[-EUTF-8:EUC-JP], <<-'EOS', nil, :chdir=>d)
+ filename1 = "\u2661" # WHITE HEART SUIT which is not representable in EUC-JP
+ filename2 = "\u3042" # HIRAGANA LETTER A which is representable in EUC-JP
+ filename3 = "\xA4\xA2".force_encoding("euc-jp") # HIRAGANA LETTER A in EUC-JP
+ s1 = File.stat(filename1) rescue nil
+ s2 = File.stat(filename2) rescue nil
+ s3 = File.stat(filename3) rescue nil
+ exit((s1 && s2 && s3) ? true : false)
+ EOS
+ }
+ end
+
+ ## others
+
+ def test_filename_bytes_euc_jp
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EEUC-JP], <<-'EOS', nil, :chdir=>d)
+ filename = "\xA4\xA2".force_encoding("euc-jp")
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ ents.each {|e| e.force_encoding("ASCII-8BIT") }
+ exit ents.include?(filename.force_encoding("ASCII-8BIT"))
+ EOS
+ }
+ end
+
+ def test_filename_euc_jp
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EEUC-JP], <<-'EOS', nil, :chdir=>d)
+ filename = "\xA4\xA2".force_encoding("euc-jp")
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ assert_ruby_status(%w[-EASCII-8BIT], <<-'EOS', nil, :chdir=>d)
+ filename = "\xA4\xA2"
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ }
+ end
+
+ def test_filename_utf8_raw_name
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EUTF-8], <<-'EOS', nil, :chdir=>d)
+ filename = "\u3042".force_encoding("utf-8")
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ assert_ruby_status(%w[-EASCII-8BIT], <<-'EOS', nil, :chdir=>d)
+ filename = "\u3042".force_encoding("ASCII-8BIT")
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ }
+ end
+
+ def test_filename_ext_euc_jp_and_int_utf_8
+ with_tmpdir {|d|
+ assert_ruby_status(%w[-EEUC-JP], <<-'EOS', nil, :chdir=>d)
+ filename = "\xA4\xA2".force_encoding("euc-jp")
+ File.open(filename, "w") {}
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ assert_ruby_status(%w[-EEUC-JP:UTF-8], <<-'EOS', nil, :chdir=>d)
+ filename = "\u3042"
+ ents = Dir.entries(".")
+ exit ents.include?(filename)
+ EOS
+ }
+ end
+
+end
+
diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb
index 5fce12da84..cc03eaf218 100644
--- a/test/ruby/test_econv.rb
+++ b/test/ruby/test_econv.rb
@@ -399,7 +399,7 @@ class TestEncodingConverter < Test::Unit::TestCase
src << "abc\r\ndef"; check_ec("abc\ndef", "", :source_buffer_empty, *a)
src << "ghi\njkl"; check_ec("abc\ndefghi\njkl", "", :source_buffer_empty, *a)
src << "mno\rpqr"; check_ec("abc\ndefghi\njklmno\npqr", "", :source_buffer_empty, *a)
- src << "stu\r"; check_ec("abc\ndefghi\njklmno\npqrstu\n", "", :source_buffer_empty, *a)
+ src << "stu\r"; check_ec("abc\ndefghi\njklmno\npqrstu", "", :source_buffer_empty, *a)
src << "\nvwx"; check_ec("abc\ndefghi\njklmno\npqrstu\nvwx", "", :source_buffer_empty, *a)
src << "\nyz"; check_ec("abc\ndefghi\njklmno\npqrstu\nvwx\nyz", "", :source_buffer_empty, *a)
end
@@ -410,11 +410,25 @@ class TestEncodingConverter < Test::Unit::TestCase
src << "abc\r\ndef"; check_ec("abc\ndef", "", :source_buffer_empty, *a)
src << "ghi\njkl"; check_ec("abc\ndefghi\njkl", "", :source_buffer_empty, *a)
src << "mno\rpqr"; check_ec("abc\ndefghi\njklmno\npqr", "", :source_buffer_empty, *a)
- src << "stu\r"; check_ec("abc\ndefghi\njklmno\npqrstu\n", "", :source_buffer_empty, *a)
+ src << "stu\r"; check_ec("abc\ndefghi\njklmno\npqrstu", "", :source_buffer_empty, *a)
src << "\nvwx"; check_ec("abc\ndefghi\njklmno\npqrstu\nvwx", "", :source_buffer_empty, *a)
src << "\nyz"; check_ec("abc\ndefghi\njklmno\npqrstu\nvwx\nyz", "", :source_buffer_empty, *a)
end
+ def test_universal_newline3
+ ec = Encoding::Converter.new("", "", universal_newline: true)
+ a = ["", src="", ec, nil, 50, :partial_input=>true]
+ src << "abc\r\ndef"; check_ec("abc\ndef", "", :source_buffer_empty, *a)
+ src << "ghi\njkl"; check_ec("abc\ndefghi\njkl", "", :source_buffer_empty, *a)
+ src << "mno\rpqr"; check_ec("abc\ndefghi\njklmno\npqr", "", :source_buffer_empty, *a)
+ src << "stu\r"; check_ec("abc\ndefghi\njklmno\npqrstu", "", :source_buffer_empty, *a)
+ src << "\nvwx"; check_ec("abc\ndefghi\njklmno\npqrstu\nvwx", "", :source_buffer_empty, *a)
+ src << "\nyz"; check_ec("abc\ndefghi\njklmno\npqrstu\nvwx\nyz", "", :source_buffer_empty, *a)
+ src << "\r"; check_ec("abc\ndefghi\njklmno\npqrstu\nvwx\nyz", "", :source_buffer_empty, *a)
+ a[-1] = nil
+ src << ""; check_ec("abc\ndefghi\njklmno\npqrstu\nvwx\nyz\n", "", :finished, *a)
+ end
+
def test_crlf_newline
ec = Encoding::Converter.new("UTF-8", "EUC-JP", crlf_newline: true)
assert_econv("abc\r\ndef", :finished, 50, ec, "abc\ndef", "")
@@ -872,7 +886,7 @@ class TestEncodingConverter < Test::Unit::TestCase
Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", universal_newline: true))
end
- def test_invalid_replace
+ def test_invalid_replace2
assert_raise(ArgumentError) {
broken = "\x80".force_encoding("euc-jp")
"".encode("euc-jp", :undef => :replace, :replace => broken)
diff --git a/test/ruby/test_encoding.rb b/test/ruby/test_encoding.rb
index 8034977f93..600101a59c 100644
--- a/test/ruby/test_encoding.rb
+++ b/test/ruby/test_encoding.rb
@@ -1,4 +1,5 @@
require 'test/unit'
+require_relative 'envutil'
class TestEncoding < Test::Unit::TestCase
@@ -39,6 +40,20 @@ class TestEncoding < Test::Unit::TestCase
assert_raise(ArgumentError) { Encoding.find("foobarbazqux") }
assert_nothing_raised{Encoding.find("locale")}
assert_nothing_raised{Encoding.find("filesystem")}
+
+ if /(?:ms|dar)win/ !~ RUBY_PLATFORM
+ # Unix's filesystem encoding is default_external
+ assert_ruby_status(%w[-EUTF-8:EUC-JP], <<-'EOS')
+ exit Encoding.find("filesystem") == Encoding::UTF_8
+ Encoding.default_external = Encoding::EUC_JP
+ exit Encoding.find("filesystem") == Encoding::EUC_JP
+ EOS
+ end
+ end
+
+ def test_replicate
+ assert(Encoding::UTF_8.replicate('UTF-8-ANOTHER'))
+ assert(Encoding::ISO_2022_JP.replicate('ISO-2022-JP-ANOTHER'))
end
def test_dummy_p
diff --git a/test/ruby/test_enum.rb b/test/ruby/test_enum.rb
index 4b71f5b6cc..7e490a1212 100644
--- a/test/ruby/test_enum.rb
+++ b/test/ruby/test_enum.rb
@@ -143,29 +143,30 @@ class TestEnumerable < Test::Unit::TestCase
def test_min
assert_equal(1, @obj.min)
assert_equal(3, @obj.min {|a,b| b <=> a })
- a = %w(albatross dog horse)
- assert_equal("albatross", a.min)
- assert_equal("dog", a.min {|a,b| a.length <=> b.length })
+ ary = %w(albatross dog horse)
+ assert_equal("albatross", ary.min)
+ assert_equal("dog", ary.min {|a,b| a.length <=> b.length })
assert_equal(1, [3,2,1].min)
end
def test_max
assert_equal(3, @obj.max)
assert_equal(1, @obj.max {|a,b| b <=> a })
- a = %w(albatross dog horse)
- assert_equal("horse", a.max)
- assert_equal("albatross", a.max {|a,b| a.length <=> b.length })
+ ary = %w(albatross dog horse)
+ assert_equal("horse", ary.max)
+ assert_equal("albatross", ary.max {|a,b| a.length <=> b.length })
assert_equal(1, [3,2,1].max{|a,b| b <=> a })
end
def test_minmax
assert_equal([1, 3], @obj.minmax)
assert_equal([3, 1], @obj.minmax {|a,b| b <=> a })
- a = %w(albatross dog horse)
- assert_equal(["albatross", "horse"], a.minmax)
- assert_equal(["dog", "albatross"], a.minmax {|a,b| a.length <=> b.length })
+ ary = %w(albatross dog horse)
+ assert_equal(["albatross", "horse"], ary.minmax)
+ assert_equal(["dog", "albatross"], ary.minmax {|a,b| a.length <=> b.length })
assert_equal([1, 3], [2,3,1].minmax)
assert_equal([3, 1], [2,3,1].minmax {|a,b| b <=> a })
+ assert_equal([1, 3], [2,2,3,3,1,1].minmax)
end
def test_min_by
@@ -196,6 +197,14 @@ class TestEnumerable < Test::Unit::TestCase
assert(!([1,2,3].member?(4)))
end
+ class Foo
+ include Enumerable
+ def each
+ yield 1
+ yield 1,2
+ end
+ end
+
def test_each_with_index
a = []
@obj.each_with_index {|x, i| a << [x, i] }
@@ -206,6 +215,7 @@ class TestEnumerable < Test::Unit::TestCase
hash[item] = index
end
assert_equal({"cat"=>0, "wombat"=>2, "dog"=>1}, hash)
+ assert_equal([[1, 0], [[1, 2], 1]], Foo.new.each_with_index.to_a)
end
def test_each_with_object
@@ -216,6 +226,12 @@ class TestEnumerable < Test::Unit::TestCase
}
assert_same(obj, ret)
assert_equal([55, 3628800], ret)
+ assert_equal([[1, nil], [[1, 2], nil]], Foo.new.each_with_object(nil).to_a)
+ end
+
+ def test_each_entry
+ assert_equal([1, 2, 3], [1, 2, 3].each_entry.to_a)
+ assert_equal([1, [1, 2]], Foo.new.each_entry.to_a)
end
def test_zip
diff --git a/test/ruby/test_enumerator.rb b/test/ruby/test_enumerator.rb
index fe8a573b2b..0ee33ca6f1 100644
--- a/test/ruby/test_enumerator.rb
+++ b/test/ruby/test_enumerator.rb
@@ -332,6 +332,46 @@ class TestEnumerator < Test::Unit::TestCase
assert_equal(10, exc.result)
end
+ def test_inspect
+ e = (0..10).each_cons(2)
+ assert_equal("#<Enumerator: 0..10:each_cons(2)>", e.inspect)
+ e = Enumerator.new {|y| x = y.yield; 10 }
+ assert_match(/\A#<Enumerator: .*:each>/, e.inspect)
+
+ a = []
+ e = a.each_with_object(a)
+ a << e
+ assert_equal("#<Enumerator: [#<Enumerator: ...>]:each_with_object([#<Enumerator: ...>])>",
+ e.inspect)
+ end
+
+ def test_generator
+ # note: Enumerator::Generator is a class just for internal
+ g = Enumerator::Generator.new {|y| y << 1 << 2 << 3; :foo }
+ g2 = g.dup
+ a = []
+ assert_equal(:foo, g.each {|x| a << x })
+ assert_equal([1, 2, 3], a)
+ a = []
+ assert_equal(:foo, g2.each {|x| a << x })
+ assert_equal([1, 2, 3], a)
+ end
+
+ def test_yielder
+ # note: Enumerator::Yielder is a class just for internal
+ a = []
+ y = Enumerator::Yielder.new {|x| a << x }
+ assert_equal(y, y << 1 << 2 << 3)
+ assert_equal([1, 2, 3], a)
+
+ a = []
+ y = Enumerator::Yielder.new {|x| a << x }
+ assert_equal([1], y.yield(1))
+ assert_equal([1, 2], y.yield(2))
+ assert_equal([1, 2, 3], y.yield(3))
+
+ assert_raise(LocalJumpError) { Enumerator::Yielder.new }
+ end
end
diff --git a/test/ruby/test_env.rb b/test/ruby/test_env.rb
index 65fd79fa8f..94f978e71c 100644
--- a/test/ruby/test_env.rb
+++ b/test/ruby/test_env.rb
@@ -68,6 +68,7 @@ class TestEnv < Test::Unit::TestCase
ENV['test'] = val[0...-1]
assert_nil(ENV.key(val))
+ assert_nil(ENV.index(val))
assert_nil(ENV.key(val.upcase))
ENV['test'] = val
if IGNORE_CASE
@@ -122,6 +123,7 @@ class TestEnv < Test::Unit::TestCase
assert_equal(nil, ENV["test"])
assert_raise(ArgumentError) { ENV["foo\0bar"] = "test" }
assert_raise(ArgumentError) { ENV["test"] = "foo\0bar" }
+ assert_raise(Errno::EINVAL) { ENV["foo=bar"] = "test" }
ENV[PATH_ENV] = "/tmp/".taint
assert_equal("/tmp/", ENV[PATH_ENV])
end
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index 1eaeb7b3fb..d7833b9d44 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -242,4 +242,66 @@ class TestException < Test::Unit::TestCase
}
assert_raise(SystemExit, '[ruby-dev:38760]') {test_proc.call}
end
+
+ def test_thread_signal_location
+ stdout, stderr, status = EnvUtil.invoke_ruby("-d", <<-RUBY, false, true)
+Thread.start do
+ begin
+ Process.kill(:INT, $$)
+ ensure
+ raise "in ensure"
+ end
+end.join
+ RUBY
+ assert_not_match(/:0/, stderr, "[ruby-dev:39116]")
+ end
+
+ def test_errinfo
+ begin
+ raise "foo"
+ assert(false)
+ rescue => e
+ assert_equal(e, $!)
+ 1.times { assert_equal(e, $!) }
+ end
+
+ assert_equal(nil, $!)
+ end
+
+ def test_inspect
+ assert_equal("#<Exception: Exception>", Exception.new.inspect)
+
+ e = Class.new(Exception)
+ e.class_eval do
+ def to_s; ""; end
+ end
+ assert_equal(e.inspect, e.new.inspect)
+ end
+
+ def test_set_backtrace
+ e = Exception.new
+
+ e.set_backtrace("foo")
+ assert_equal(["foo"], e.backtrace)
+
+ e.set_backtrace(%w(foo bar baz))
+ assert_equal(%w(foo bar baz), e.backtrace)
+
+ assert_raise(TypeError) { e.set_backtrace(1) }
+ assert_raise(TypeError) { e.set_backtrace([1]) }
+ end
+
+ def test_exit_success_p
+ begin
+ exit
+ rescue SystemExit => e
+ end
+ assert(e.success?)
+
+ begin
+ abort
+ rescue SystemExit => e
+ end
+ assert(!e.success?)
+ end
end
diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb
index b4666ad4a6..b8ba9a4b19 100644
--- a/test/ruby/test_file.rb
+++ b/test/ruby/test_file.rb
@@ -140,13 +140,13 @@ class TestFile < Test::Unit::TestCase
end
def test_s_chown
- assert_nothing_raised { File.chown -1, -1 }
+ assert_nothing_raised { File.chown(-1, -1) }
assert_nothing_raised { File.chown nil, nil }
end
def test_chown
assert_nothing_raised {
- File.open(__FILE__) {|f| f.chown -1, -1 }
+ File.open(__FILE__) {|f| f.chown(-1, -1) }
}
assert_nothing_raised("[ruby-dev:27140]") {
File.open(__FILE__) {|f| f.chown nil, nil }
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index e7d60960b8..74b960c54f 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -492,7 +492,7 @@ class TestFileExhaustive < Test::Unit::TestCase
f.close
make_file("foo", @file)
- assert_raise(IOError) { File.open(@file) {|f| f.truncate(0)} }
+ assert_raise(IOError) { File.open(@file) {|ff| ff.truncate(0)} }
rescue NotImplementedError
end
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index 15e17ad92a..c18e4f0422 100644
--- a/test/ruby/test_float.rb
+++ b/test/ruby/test_float.rb
@@ -24,7 +24,7 @@ class TestFloat < Test::Unit::TestCase
assert_equal(false, (x >= y))
end
def test_nan
- nan = 0.0/0
+ nan = Float::NAN
nan_test(nan, nan)
nan_test(nan, 0)
nan_test(nan, 1)
@@ -118,7 +118,7 @@ class TestFloat < Test::Unit::TestCase
end
def test_to_s
- inf = 1.0 / 0.0
+ inf = Float::INFINITY
assert_equal("Infinity", inf.to_s)
assert_equal("-Infinity", (-inf).to_s)
assert_equal("NaN", (inf / inf).to_s)
@@ -171,7 +171,7 @@ class TestFloat < Test::Unit::TestCase
assert_equal([1.0, 0.0], 2.0.divmod(2.0))
assert_raise(TypeError) { 2.0.divmod(nil) }
- inf = 1.0 / 0.0
+ inf = Float::INFINITY
assert_raise(ZeroDivisionError) {inf.divmod(0)}
a, b = (2.0**32).divmod(1.0)
@@ -186,8 +186,8 @@ class TestFloat < Test::Unit::TestCase
end
def test_eql
- inf = 1.0 / 0.0
- nan = inf / inf
+ inf = Float::INFINITY
+ nan = Float::NAN
assert(1.0.eql?(1.0))
assert(inf.eql?(inf))
assert(!(nan.eql?(nan)))
@@ -200,8 +200,8 @@ class TestFloat < Test::Unit::TestCase
end
def test_cmp
- inf = 1.0 / 0.0
- nan = inf / inf
+ inf = Float::INFINITY
+ nan = Float::NAN
assert_equal(0, 1.0 <=> 1.0)
assert_equal(1, 1.0 <=> 0.0)
assert_equal(-1, 1.0 <=> 2.0)
@@ -232,14 +232,14 @@ class TestFloat < Test::Unit::TestCase
end
def test_infinite_p
- inf = 1.0 / 0.0
+ inf = Float::INFINITY
assert(1, inf.infinite?)
assert(1, (-inf).infinite?)
assert_nil(1.0.infinite?)
end
def test_finite_p
- inf = 1.0 / 0.0
+ inf = Float::INFINITY
assert(!(inf.finite?))
assert(!((-inf).finite?))
assert(1.0.finite?)
@@ -266,7 +266,7 @@ class TestFloat < Test::Unit::TestCase
assert_equal(-2, (-2.0).round)
assert_equal(-2, (-2.0).truncate)
- inf = 1.0/0.0
+ inf = Float::INFINITY
assert_raise(FloatDomainError) { inf.floor }
assert_raise(FloatDomainError) { inf.ceil }
assert_raise(FloatDomainError) { inf.round }
@@ -413,7 +413,7 @@ class TestFloat < Test::Unit::TestCase
assert(Float("1e10_00").infinite?)
assert_raise(TypeError) { Float(nil) }
o = Object.new
- def o.to_f; inf = 1.0/0.0; inf/inf; end
+ def o.to_f; inf = Float::INFINITY; inf/inf; end
assert(Float(o).nan?)
end
diff --git a/test/ruby/test_fnmatch.rb b/test/ruby/test_fnmatch.rb
index 1c1a158477..e5f5ba6a4f 100644
--- a/test/ruby/test_fnmatch.rb
+++ b/test/ruby/test_fnmatch.rb
@@ -79,6 +79,8 @@ class TestFnmatch < Test::Unit::TestCase
assert(File.fnmatch('cat', 'CAT', File::FNM_CASEFOLD))
assert(!File.fnmatch('[a-z]', 'D'))
assert(File.fnmatch('[a-z]', 'D', File::FNM_CASEFOLD))
+ assert(!File.fnmatch('[abc]', 'B'))
+ assert(File.fnmatch('[abc]', 'B', File::FNM_CASEFOLD))
# wildcard doesn't match '/' if FNM_PATHNAME is set
assert(File.fnmatch('foo?boo', 'foo/boo'))
assert(File.fnmatch('foo*', 'foo/boo'))
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index c860b25239..79ce095733 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -51,7 +51,7 @@ class TestHash < Test::Unit::TestCase
assert_equal([], x[22])
assert_not_same(x[22], x[22])
- x = Hash.new{|h,k| z = k; h[k] = k*2}
+ x = Hash.new{|h,kk| z = kk; h[kk] = kk*2}
z = 0
assert_equal(44, x[22])
assert_equal(22, z)
@@ -376,7 +376,7 @@ class TestHash < Test::Unit::TestCase
assert_equal('nil', @h.fetch(nil))
end
- def test_key?
+ def test_key2?
assert(!@cls[].key?(1))
assert(!@cls[].key?(nil))
assert(@h.key?(nil))
@@ -648,7 +648,7 @@ class TestHash < Test::Unit::TestCase
assert_equal(hb, h2)
end
- def test_value?
+ def test_value2?
assert(!@cls[].value?(1))
assert(!@cls[].value?(nil))
assert(@h.value?(nil))
@@ -703,14 +703,14 @@ class TestHash < Test::Unit::TestCase
end
def test_default_proc
- h = Hash.new {|h, k| h + k + "baz" }
+ h = Hash.new {|hh, k| hh + k + "baz" }
assert_equal("foobarbaz", h.default_proc.call("foo", "bar"))
h = {}
assert_nil(h.default_proc)
end
def test_shift2
- h = Hash.new {|h, k| :foo }
+ h = Hash.new {|hh, k| :foo }
h[1] = 2
assert_equal([1, 2], h.shift)
assert_equal(:foo, h.shift)
@@ -748,6 +748,13 @@ class TestHash < Test::Unit::TestCase
h2 = {}
h2.replace h1
assert_equal(:foo, h2[0])
+
+ assert_raise(ArgumentError) { h2.replace() }
+ assert_raise(TypeError) { h2.replace(1) }
+ h2.freeze
+ assert_raise(ArgumentError) { h2.replace() }
+ assert_raise(RuntimeError) { h2.replace(h1) }
+ assert_raise(RuntimeError) { h2.replace(42) }
end
def test_size2
@@ -871,4 +878,13 @@ class TestHash < Test::Unit::TestCase
def o.hash; 2<<100; end
assert_equal({x=>1}.hash, {x=>1}.hash)
end
+
+ def test_hash_poped
+ assert_nothing_raised { eval("a = 1; {a => a}; a") }
+ end
+
+ def test_recursive_check
+ h = {}
+ assert_raise(ArgumentError) { h[h] = :foo }
+ end
end
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb
index b3dd11d55a..7f8212ebf0 100644
--- a/test/ruby/test_integer.rb
+++ b/test/ruby/test_integer.rb
@@ -84,6 +84,12 @@ class TestInteger < Test::Unit::TestCase
assert_raise(ArgumentError) { Integer("0x123", 10) }
assert_raise(ArgumentError) { Integer(1234, 10) }
assert_raise(ArgumentError) { Integer(12.34, 10) }
+ assert_raise(ArgumentError) { Integer(Object.new, 1) }
+
+ assert_raise(ArgumentError) { Integer(1, 1, 1) }
+
+ assert_equal(2 ** 50, Integer(2.0 ** 50))
+ assert_raise(TypeError) { Integer(nil) }
end
def test_int_p
@@ -144,10 +150,10 @@ class TestInteger < Test::Unit::TestCase
1.upto(0) {|x| a << x }
assert_equal([], a)
- x = 2**30 - 1
+ y = 2**30 - 1
a = []
- x.upto(x+2) {|x| a << x }
- assert_equal([x, x+1, x+2], a)
+ y.upto(y+2) {|x| a << x }
+ assert_equal([y, y+1, y+2], a)
end
def test_downto
@@ -159,10 +165,10 @@ class TestInteger < Test::Unit::TestCase
1.downto(2) {|x| a << x }
assert_equal([], a)
- x = -(2**30)
+ y = -(2**30)
a = []
- x.downto(x-2) {|x| a << x }
- assert_equal([x, x-1, x-2], a)
+ y.downto(y-2) {|x| a << x }
+ assert_equal([y, y-1, y-2], a)
end
def test_times
@@ -192,9 +198,4 @@ class TestInteger < Test::Unit::TestCase
assert_equal(-1111_1111_1111_1111_1111_1111_1111_1110, (-1111_1111_1111_1111_1111_1111_1111_1111).round(-1))
assert_equal(Bignum, (-1111_1111_1111_1111_1111_1111_1111_1111).round(-1).class)
end
-
- def test_Integer2
- assert_equal(2 ** 50, Integer(2.0 ** 50))
- assert_raise(TypeError) { Integer(nil) }
- end
end
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index 976aae8c2e..deacd0b36d 100644
--- a/test/ruby/test_io_m17n.rb
+++ b/test/ruby/test_io_m17n.rb
@@ -558,6 +558,12 @@ EOT
assert_equal(eucjp, r.read)
}
+ with_pipe("UTF-8") {|r,w|
+ w << "a" * 1023 + "\u3042" + "a" * 1022
+ w.close
+ assert_equal(true, r.read.valid_encoding?)
+ }
+
with_pipe("UTF-8:EUC-JP") {|r,w|
assert_equal(Encoding::UTF_8, r.external_encoding)
assert_equal(Encoding::EUC_JP, r.internal_encoding)
@@ -1505,7 +1511,6 @@ EOT
assert_equal("a", f.getc)
assert_equal("\n", f.getc)
f.binmode
- assert_equal("\n", f.getc)
assert_equal("b", f.getc)
assert_equal("\r", f.getc)
assert_equal("\n", f.getc)
@@ -1525,7 +1530,6 @@ EOT
assert_equal("a", f.getc)
assert_equal("\n", f.getc)
f.binmode
- assert_equal("\n", f.getc)
assert_equal("b", f.getc)
assert_equal("\r", f.getc)
assert_equal("\n", f.getc)
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb
index ca6022a4fb..42e3960e72 100644
--- a/test/ruby/test_iterator.rb
+++ b/test/ruby/test_iterator.rb
@@ -5,8 +5,8 @@ class Array
collect{|e| [e, yield(e)]}.sort{|a,b|a[1]<=>b[1]}
end
def iter_test2
- a = collect{|e| [e, yield(e)]}
- a.sort{|a,b|a[1]<=>b[1]}
+ ary = collect{|e| [e, yield(e)]}
+ ary.sort{|a,b|a[1]<=>b[1]}
end
end
@@ -51,7 +51,7 @@ class TestIterator < Test::Unit::TestCase
def test_nested_iterator
i = 0
- tt{|i| break if i == 5}
+ tt{|j| break if j == 5}
assert_equal(0, i)
assert_raise(ArgumentError) do
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb
index 52f7704940..80c8af9312 100644
--- a/test/ruby/test_literal.rb
+++ b/test/ruby/test_literal.rb
@@ -77,16 +77,16 @@ class TestRubyLiteral < Test::Unit::TestCase
def test_regexp
assert_instance_of Regexp, //
- assert_match //, 'a'
- assert_match //, ''
+ assert_match(//, 'a')
+ assert_match(//, '')
assert_instance_of Regexp, /a/
- assert_match /a/, 'a'
- assert_no_match /test/, 'tes'
+ assert_match(/a/, 'a')
+ assert_no_match(/test/, 'tes')
re = /test/
assert_match re, 'test'
str = 'test'
assert_match re, str
- assert_match /test/, str
+ assert_match(/test/, str)
assert_equal 0, (/test/ =~ 'test')
assert_equal 0, (re =~ 'test')
assert_equal 0, (/test/ =~ str)
@@ -211,6 +211,16 @@ class TestRubyLiteral < Test::Unit::TestCase
}
}
}
+ bug2407 = '[ruby-dev:39798]'
+ head.each {|h|
+ if /^0/ =~ h
+ begin
+ eval("#{h}_")
+ rescue SyntaxError => e
+ assert_match(/numeric literal without digits\Z/, e.message, bug2407)
+ end
+ end
+ }
end
def test_float
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index d8a3c09552..cb60e0fa76 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -200,7 +200,7 @@ class TestM17N < Test::Unit::TestCase
assert_equal('"\xF8\x80\x80\x80 "', u("\xf8\x80\x80\x80 ").inspect)
assert_equal('"\xFC\x80\x80\x80\x80 "', u("\xfc\x80\x80\x80\x80 ").inspect)
-
+ assert_equal('"\x{81308130}"', "\x81\x30\x81\x30".force_encoding('GB18030').inspect)
assert_equal("\"\\xA1\\x{8FA1A1}\"", e("\xa1\x8f\xa1\xa1").inspect)
assert_equal('"\x81."', s("\x81.").inspect)
@@ -646,40 +646,40 @@ class TestM17N < Test::Unit::TestCase
def test_dynamic_ascii_regexp
assert_warning(%r{regexp match /.../n against to}) {
- assert_regexp_generic_ascii(/#{}/n)
+ assert_regexp_generic_ascii(/#{ }/n)
}
- assert_regexp_fixed_ascii8bit(/#{}\xc2\xa1/n)
- assert_regexp_fixed_ascii8bit(/\xc2\xa1#{}/n)
+ assert_regexp_fixed_ascii8bit(/#{ }\xc2\xa1/n)
+ assert_regexp_fixed_ascii8bit(/\xc2\xa1#{ }/n)
assert_nothing_raised { s1, s2 = a('\xc2'), a('\xa1'); /#{s1}#{s2}/ }
end
def test_dynamic_eucjp_regexp
- assert_regexp_fixed_eucjp(/#{}/e)
- assert_regexp_fixed_eucjp(/#{}\xc2\xa1/e)
- assert_regexp_fixed_eucjp(/\xc2\xa1#{}/e)
- assert_raise(SyntaxError) { eval('/\xc2#{}/e') }
- assert_raise(SyntaxError) { eval('/#{}\xc2/e') }
- assert_raise(SyntaxError) { eval('/\xc2#{}\xa1/e') }
+ assert_regexp_fixed_eucjp(/#{ }/e)
+ assert_regexp_fixed_eucjp(/#{ }\xc2\xa1/e)
+ assert_regexp_fixed_eucjp(/\xc2\xa1#{ }/e)
+ assert_raise(SyntaxError) { eval('/\xc2#{ }/e') }
+ assert_raise(SyntaxError) { eval('/#{ }\xc2/e') }
+ assert_raise(SyntaxError) { eval('/\xc2#{ }\xa1/e') }
assert_raise(ArgumentError) { s1, s2 = e('\xc2'), e('\xa1'); /#{s1}#{s2}/ }
end
def test_dynamic_sjis_regexp
- assert_regexp_fixed_sjis(/#{}/s)
- assert_regexp_fixed_sjis(/#{}\xc2\xa1/s)
- assert_regexp_fixed_sjis(/\xc2\xa1#{}/s)
- assert_raise(SyntaxError) { eval('/\x81#{}/s') }
- assert_raise(SyntaxError) { eval('/#{}\x81/s') }
- assert_raise(SyntaxError) { eval('/\x81#{}\xa1/s') }
+ assert_regexp_fixed_sjis(/#{ }/s)
+ assert_regexp_fixed_sjis(/#{ }\xc2\xa1/s)
+ assert_regexp_fixed_sjis(/\xc2\xa1#{ }/s)
+ assert_raise(SyntaxError) { eval('/\x81#{ }/s') }
+ assert_raise(SyntaxError) { eval('/#{ }\x81/s') }
+ assert_raise(SyntaxError) { eval('/\x81#{ }\xa1/s') }
assert_raise(ArgumentError) { s1, s2 = s('\x81'), s('\xa1'); /#{s1}#{s2}/ }
end
def test_dynamic_utf8_regexp
- assert_regexp_fixed_utf8(/#{}/u)
- assert_regexp_fixed_utf8(/#{}\xc2\xa1/u)
- assert_regexp_fixed_utf8(/\xc2\xa1#{}/u)
- assert_raise(SyntaxError) { eval('/\xc2#{}/u') }
- assert_raise(SyntaxError) { eval('/#{}\xc2/u') }
- assert_raise(SyntaxError) { eval('/\xc2#{}\xa1/u') }
+ assert_regexp_fixed_utf8(/#{ }/u)
+ assert_regexp_fixed_utf8(/#{ }\xc2\xa1/u)
+ assert_regexp_fixed_utf8(/\xc2\xa1#{ }/u)
+ assert_raise(SyntaxError) { eval('/\xc2#{ }/u') }
+ assert_raise(SyntaxError) { eval('/#{ }\xc2/u') }
+ assert_raise(SyntaxError) { eval('/\xc2#{ }\xa1/u') }
assert_raise(ArgumentError) { s1, s2 = u('\xc2'), u('\xa1'); /#{s1}#{s2}/ }
end
@@ -712,23 +712,23 @@ class TestM17N < Test::Unit::TestCase
assert_raise(SyntaxError) { eval(s(%{/\\u{6666}\\xc2\\xa1/})) }
assert_nothing_raised { eval(u(%{/\\u{6666}\\xc2\\xa1/})) }
- assert_raise(SyntaxError) { eval(a(%{/\xc2\xa1#{}\\u{6666}/})) }
- assert_raise(SyntaxError) { eval(e(%{/\xc2\xa1#{}\\u{6666}/})) }
- assert_raise(SyntaxError) { eval(s(%{/\xc2\xa1#{}\\u{6666}/})) }
- assert_nothing_raised { eval(u(%{/\xc2\xa1#{}\\u{6666}/})) }
- assert_raise(SyntaxError) { eval(a(%{/\\u{6666}#{}\xc2\xa1/})) }
- assert_raise(SyntaxError) { eval(e(%{/\\u{6666}#{}\xc2\xa1/})) }
- assert_raise(SyntaxError) { eval(s(%{/\\u{6666}#{}\xc2\xa1/})) }
- assert_nothing_raised { eval(u(%{/\\u{6666}#{}\xc2\xa1/})) }
-
- assert_raise(SyntaxError) { eval(a(%{/\\xc2\\xa1#{}\\u{6666}/})) }
- assert_raise(SyntaxError) { eval(e(%{/\\xc2\\xa1#{}\\u{6666}/})) }
- assert_raise(SyntaxError) { eval(s(%{/\\xc2\\xa1#{}\\u{6666}/})) }
- assert_nothing_raised { eval(u(%{/\\xc2\\xa1#{}\\u{6666}/})) }
- assert_raise(SyntaxError) { eval(a(%{/\\u{6666}#{}\\xc2\\xa1/})) }
- assert_raise(SyntaxError) { eval(e(%{/\\u{6666}#{}\\xc2\\xa1/})) }
- assert_raise(SyntaxError) { eval(s(%{/\\u{6666}#{}\\xc2\\xa1/})) }
- assert_nothing_raised { eval(u(%{/\\u{6666}#{}\\xc2\\xa1/})) }
+ assert_raise(SyntaxError) { eval(a(%{/\xc2\xa1#{ }\\u{6666}/})) }
+ assert_raise(SyntaxError) { eval(e(%{/\xc2\xa1#{ }\\u{6666}/})) }
+ assert_raise(SyntaxError) { eval(s(%{/\xc2\xa1#{ }\\u{6666}/})) }
+ assert_nothing_raised { eval(u(%{/\xc2\xa1#{ }\\u{6666}/})) }
+ assert_raise(SyntaxError) { eval(a(%{/\\u{6666}#{ }\xc2\xa1/})) }
+ assert_raise(SyntaxError) { eval(e(%{/\\u{6666}#{ }\xc2\xa1/})) }
+ assert_raise(SyntaxError) { eval(s(%{/\\u{6666}#{ }\xc2\xa1/})) }
+ assert_nothing_raised { eval(u(%{/\\u{6666}#{ }\xc2\xa1/})) }
+
+ assert_raise(SyntaxError) { eval(a(%{/\\xc2\\xa1#{ }\\u{6666}/})) }
+ assert_raise(SyntaxError) { eval(e(%{/\\xc2\\xa1#{ }\\u{6666}/})) }
+ assert_raise(SyntaxError) { eval(s(%{/\\xc2\\xa1#{ }\\u{6666}/})) }
+ assert_nothing_raised { eval(u(%{/\\xc2\\xa1#{ }\\u{6666}/})) }
+ assert_raise(SyntaxError) { eval(a(%{/\\u{6666}#{ }\\xc2\\xa1/})) }
+ assert_raise(SyntaxError) { eval(e(%{/\\u{6666}#{ }\\xc2\\xa1/})) }
+ assert_raise(SyntaxError) { eval(s(%{/\\u{6666}#{ }\\xc2\\xa1/})) }
+ assert_nothing_raised { eval(u(%{/\\u{6666}#{ }\\xc2\\xa1/})) }
end
def test_str_allocate
@@ -757,11 +757,12 @@ class TestM17N < Test::Unit::TestCase
def test_sprintf_p
enc = "".inspect.encoding
+ asc = Encoding::US_ASCII
Encoding.list.each do |e|
format = "%p".force_encoding(e)
['', 'a', "\xC2\xA1", "\x00"].each do |s|
s.force_encoding(e)
- assert_strenc(s.inspect, enc, format % s)
+ assert_strenc(s.inspect, e.ascii_compatible? && enc == asc ? e : enc, format % s)
end
s = "\xC2\xA1".force_encoding(e)
assert_strenc('%10s' % s.inspect, enc, "%10p" % s)
@@ -867,6 +868,11 @@ class TestM17N < Test::Unit::TestCase
assert_equal(nil, u("\xc2\xa1\xc2\xa2\xc2\xa3")[u("\xa1\xc2")])
assert_raise(Encoding::CompatibilityError) { u("\xc2\xa1\xc2\xa2\xc2\xa3")[a("\xa1\xc2")] }
assert_nil(e("\xa1\xa2\xa3\xa4")[e("\xa2\xa3")])
+
+ bug2379 = '[ruby-core:26787]'
+ assert_equal("\u{439}", "\u{439}"[0, 30], bug2379)
+ assert_equal("\u{439}", "a\u{439}"[1, 30], bug2379)
+ assert_equal("\u{439}", "a\u{439}bcdefghijklmnop"[1, 1][0, 1], bug2379)
end
def test_aset
@@ -1212,36 +1218,36 @@ class TestM17N < Test::Unit::TestCase
assert_equal(Encoding::US_ASCII, eval("\n# -*- encoding: ASCII-8BIT -*-\n__ENCODING__".force_encoding("US-ASCII")))
# leading expressions
- assert_equal(Encoding::ASCII_8BIT, eval("1+1 # -*- encoding: US-ASCII -*-\n__ENCODING__".force_encoding("ASCII-8BIT")))
- assert_equal(Encoding::US_ASCII, eval("1+1 # -*- encoding: ASCII-8BIT -*-\n__ENCODING__".force_encoding("US-ASCII")))
+ assert_equal(Encoding::ASCII_8BIT, eval("v=1 # -*- encoding: US-ASCII -*-\n__ENCODING__".force_encoding("ASCII-8BIT")))
+ assert_equal(Encoding::US_ASCII, eval("v=1 # -*- encoding: ASCII-8BIT -*-\n__ENCODING__".force_encoding("US-ASCII")))
end
def test_regexp_usascii
assert_regexp_usascii_literal('//', Encoding::US_ASCII)
- assert_regexp_usascii_literal('/#{}/', Encoding::US_ASCII)
+ assert_regexp_usascii_literal('/#{ }/', Encoding::US_ASCII)
assert_regexp_usascii_literal('/#{"a"}/', Encoding::US_ASCII)
assert_regexp_usascii_literal('/#{%q"\x80"}/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/#{"\x80"}/', nil, SyntaxError)
assert_regexp_usascii_literal('/a/', Encoding::US_ASCII)
- assert_regexp_usascii_literal('/a#{}/', Encoding::US_ASCII)
+ assert_regexp_usascii_literal('/a#{ }/', Encoding::US_ASCII)
assert_regexp_usascii_literal('/a#{"a"}/', Encoding::US_ASCII)
assert_regexp_usascii_literal('/a#{%q"\x80"}/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/a#{"\x80"}/', nil, SyntaxError)
assert_regexp_usascii_literal('/\x80/', Encoding::ASCII_8BIT)
- assert_regexp_usascii_literal('/\x80#{}/', Encoding::ASCII_8BIT)
+ assert_regexp_usascii_literal('/\x80#{ }/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/\x80#{"a"}/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/\x80#{%q"\x80"}/', Encoding::ASCII_8BIT)
assert_regexp_usascii_literal('/\x80#{"\x80"}/', nil, SyntaxError)
assert_regexp_usascii_literal('/\u1234/', Encoding::UTF_8)
- assert_regexp_usascii_literal('/\u1234#{}/', Encoding::UTF_8)
+ assert_regexp_usascii_literal('/\u1234#{ }/', Encoding::UTF_8)
assert_regexp_usascii_literal('/\u1234#{"a"}/', Encoding::UTF_8)
assert_regexp_usascii_literal('/\u1234#{%q"\x80"}/', nil, SyntaxError)
assert_regexp_usascii_literal('/\u1234#{"\x80"}/', nil, SyntaxError)
assert_regexp_usascii_literal('/\u1234\x80/', nil, SyntaxError)
- assert_regexp_usascii_literal('/\u1234#{}\x80/', nil, RegexpError)
+ assert_regexp_usascii_literal('/\u1234#{ }\x80/', nil, RegexpError)
end
def test_gbk
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb
index 57a8b16dfa..ab891363b1 100644
--- a/test/ruby/test_m17n_comb.rb
+++ b/test/ruby/test_m17n_comb.rb
@@ -1057,7 +1057,7 @@ class TestM17NComb < Test::Unit::TestCase
def test_str_oct
STRINGS.each {|s|
t = s.oct
- t2 = a(s)[/\A[0-9a-fA-FxXbB]*/].oct
+ t2 = a(s)[/\A[0-9a-fA-FxX]*/].oct
assert_equal(t2, t)
}
end
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index df02086da8..d78183192c 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -1,4 +1,5 @@
require 'test/unit'
+require 'tempfile'
require_relative 'marshaltestlib'
class TestMarshal < Test::Unit::TestCase
@@ -193,10 +194,77 @@ class TestMarshal < Test::Unit::TestCase
assert_equal(true, y.untrusted?)
end
+ def test_taint_and_untrust_each_object
+ x = Object.new
+ obj = [[x]]
+
+ # clean object causes crean stream
+ assert_equal(false, obj.tainted?)
+ assert_equal(false, obj.untrusted?)
+ assert_equal(false, obj.first.tainted?)
+ assert_equal(false, obj.first.untrusted?)
+ assert_equal(false, obj.first.first.tainted?)
+ assert_equal(false, obj.first.first.untrusted?)
+ s = Marshal.dump(obj)
+ assert_equal(false, s.tainted?)
+ assert_equal(false, s.untrusted?)
+
+ # tainted/untrusted object causes tainted/untrusted stream
+ x.taint
+ x.untrust
+ assert_equal(false, obj.tainted?)
+ assert_equal(false, obj.untrusted?)
+ assert_equal(false, obj.first.tainted?)
+ assert_equal(false, obj.first.untrusted?)
+ assert_equal(true, obj.first.first.tainted?)
+ assert_equal(true, obj.first.first.untrusted?)
+ t = Marshal.dump(obj)
+ assert_equal(true, t.tainted?)
+ assert_equal(true, t.untrusted?)
+
+ # clean stream causes clean objects
+ assert_equal(false, s.tainted?)
+ assert_equal(false, s.untrusted?)
+ y = Marshal.load(s)
+ assert_equal(false, y.tainted?)
+ assert_equal(false, y.untrusted?)
+ assert_equal(false, y.first.tainted?)
+ assert_equal(false, y.first.untrusted?)
+ assert_equal(false, y.first.first.tainted?)
+ assert_equal(false, y.first.first.untrusted?)
+
+ # tainted/untrusted stream causes tainted/untrusted objects
+ assert_equal(true, t.tainted?)
+ assert_equal(true, t.untrusted?)
+ y = Marshal.load(t)
+ assert_equal(true, y.tainted?)
+ assert_equal(true, y.untrusted?)
+ assert_equal(true, y.first.tainted?)
+ assert_equal(true, y.first.untrusted?)
+ assert_equal(true, y.first.first.tainted?)
+ assert_equal(true, y.first.first.untrusted?)
+
+ # same tests by different senario
+ s.taint
+ s.untrust
+ assert_equal(true, s.tainted?)
+ assert_equal(true, s.untrusted?)
+ y = Marshal.load(s)
+ assert_equal(true, y.tainted?)
+ assert_equal(true, y.untrusted?)
+ assert_equal(true, y.first.tainted?)
+ assert_equal(true, y.first.untrusted?)
+ assert_equal(true, y.first.first.tainted?)
+ assert_equal(true, y.first.first.untrusted?)
+ end
+
def test_symbol
[:ruby, :"\u{7d05}\u{7389}"].each do |sym|
assert_equal(sym, Marshal.load(Marshal.dump(sym)), '[ruby-core:24788]')
end
+ bug2548 = '[ruby-core:27375]'
+ ary = [:$1, nil]
+ assert_equal(ary, Marshal.load(Marshal.dump(ary)), bug2548)
end
ClassUTF8 = eval("class R\u{e9}sum\u{e9}; self; end")
@@ -258,6 +326,15 @@ class TestMarshal < Test::Unit::TestCase
b = "\x82\xa2".force_encoding(Encoding::Windows_31J)
c = [/#{a}/, /#{b}/]
assert_equal(c, Marshal.load(Marshal.dump(c)), bug2109)
+
+ assert_nothing_raised(ArgumentError, '[ruby-dev:40386]') do
+ re = Tempfile.open("marshal_regexp") do |f|
+ f.binmode.write("\x04\bI/\x00\x00\x06:\rencoding\"\rUS-ASCII")
+ f.close
+ Marshal.load(f.open.binmode)
+ end
+ assert_equal(//, re)
+ end
end
class DumpTest
@@ -300,4 +377,77 @@ class TestMarshal < Test::Unit::TestCase
assert(true, '[ruby-dev:39425]')
assert_raise(StopIteration) {e.next}
end
+
+ def test_dump_buffer
+ bug2390 = '[ruby-dev:39744]'
+ w = ""
+ def w.write(str)
+ self << str.to_s
+ end
+ Marshal.dump(Object.new, w)
+ assert_not_empty(w, bug2390)
+ end
+
+ class C5
+ def marshal_dump
+ "foo"
+ end
+ def marshal_load(foo)
+ @foo = foo
+ end
+ def initialize(x)
+ @x = x
+ end
+ end
+ def test_marshal_dump
+ c = C5.new("bar")
+ s = Marshal.dump(c)
+ d = Marshal.load(s)
+ assert_equal("foo", d.instance_variable_get(:@foo))
+ assert_equal(false, d.instance_variable_defined?(:@x))
+ end
+
+ class C6
+ def initialize
+ @stdin = STDIN
+ end
+ attr_reader :stdin
+ def marshal_dump
+ 1
+ end
+ def marshal_load(x)
+ @stdin = STDIN
+ end
+ end
+ def test_marshal_dump_extra_iv
+ o = C6.new
+ m = nil
+ assert_nothing_raised("[ruby-dev:21475] [ruby-dev:39845]") {
+ m = Marshal.dump(o)
+ }
+ o2 = Marshal.load(m)
+ assert_equal(STDIN, o.stdin)
+ end
+
+ def test_marshal_string_encoding
+ o1 = ["foo".force_encoding("EUC-JP")] + [ "bar" ] * 2
+ m = Marshal.dump(o1)
+ o2 = Marshal.load(m)
+ assert_equal(o1, o2, "[ruby-dev:40388]")
+ end
+
+ def test_marshal_regexp_encoding
+ o1 = [Regexp.new("r1".force_encoding("EUC-JP"))] + ["r2"] * 2
+ m = Marshal.dump(o1)
+ o2 = Marshal.load(m)
+ assert_equal(o1, o2, "[ruby-dev:40416]")
+ end
+
+ def test_marshal_encoding_encoding
+ o1 = [Encoding.find("EUC-JP")] + ["r2"] * 2
+ m = Marshal.dump(o1)
+ o2 = Marshal.load(m)
+ assert_equal(o1, o2)
+ end
+
end
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index c60f7fa8a8..ddeb6d6c87 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -82,6 +82,7 @@ class TestMethod < Test::Unit::TestCase
o = Object.new
def o.foo; end
assert_nothing_raised { RubyVM::InstructionSequence.disasm(o.method(:foo)) }
+ assert_nothing_raised { RubyVM::InstructionSequence.disasm("x".method(:upcase)) }
end
def test_new
@@ -178,6 +179,10 @@ class TestMethod < Test::Unit::TestCase
o = Object.new
o.instance_eval { define_singleton_method(:foo) { :foo } }
assert_equal(:foo, o.foo)
+
+ assert_raise(TypeError) do
+ Class.new.class_eval { define_method(:foo, Object.new) }
+ end
end
def test_clone
@@ -311,4 +316,19 @@ class TestMethod < Test::Unit::TestCase
assert_equal([[:req, :a], [:opt, :b], [:rest, :c], [:req, :d], [:block, :e]], self.class.instance_method(:pmo7).parameters)
assert_equal([[:req], [:block, :b]], self.class.instance_method(:pma1).parameters)
end
+
+ def test_public_method_with_zsuper_method
+ c = Class.new
+ c.class_eval do
+ def foo
+ :ok
+ end
+ private :foo
+ end
+ d = Class.new(c)
+ d.class_eval do
+ public :foo
+ end
+ assert_equal(:ok, d.new.public_method(:foo).call)
+ end
end
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 59c965325f..f90543196b 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -216,10 +216,29 @@ class TestModule < Test::Unit::TestCase
remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.ancestors))))
end
+ CLASS_EVAL = 2
+ @@class_eval = 'b'
+
def test_class_eval
Other.class_eval("CLASS_EVAL = 1")
assert_equal(1, Other::CLASS_EVAL)
assert(Other.constants.include?(:CLASS_EVAL))
+ assert_equal(2, Other.class_eval { CLASS_EVAL })
+
+ Other.class_eval("@@class_eval = 'a'")
+ assert_equal('a', Other.class_variable_get(:@@class_eval))
+ assert_equal('b', Other.class_eval { @@class_eval })
+
+ Other.class_eval do
+ module_function
+
+ def class_eval_test
+ "foo"
+ end
+ end
+ assert("foo", Other.class_eval_test)
+
+ assert_equal([Other], Other.class_eval { |*args| args })
end
def test_const_defined?
@@ -361,6 +380,21 @@ class TestModule < Test::Unit::TestCase
Object.module_eval "WALTER = 99"
c2 = Module.constants
assert_equal([:WALTER], c2 - c1)
+
+ assert_equal([], Module.constants(true))
+ assert_equal([], Module.constants(false))
+
+ src = <<-INPUT
+ ary = Module.constants
+ module M
+ WALTER = 99
+ end
+ class Module
+ include M
+ end
+ p Module.constants - ary, Module.constants(true), Module.constants(false)
+ INPUT
+ assert_in_out_err([], src, %w([:M] [:WALTER] []), [])
end
module M1
@@ -451,7 +485,7 @@ class TestModule < Test::Unit::TestCase
def test_class_variable_get
c = Class.new
- c.class_eval { @@foo = :foo }
+ c.class_eval('@@foo = :foo')
assert_equal(:foo, c.class_variable_get(:@@foo))
assert_raise(NameError) { c.class_variable_get(:@@bar) } # c.f. instance_variable_get
assert_raise(NameError) { c.class_variable_get(:foo) }
@@ -460,13 +494,13 @@ class TestModule < Test::Unit::TestCase
def test_class_variable_set
c = Class.new
c.class_variable_set(:@@foo, :foo)
- assert_equal(:foo, c.class_eval { @@foo })
+ assert_equal(:foo, c.class_eval('@@foo'))
assert_raise(NameError) { c.class_variable_set(:foo, 1) }
end
def test_class_variable_defined
c = Class.new
- c.class_eval { @@foo = :foo }
+ c.class_eval('@@foo = :foo')
assert_equal(true, c.class_variable_defined?(:@@foo))
assert_equal(false, c.class_variable_defined?(:@@bar))
assert_raise(NameError) { c.class_variable_defined?(:foo) }
@@ -474,7 +508,7 @@ class TestModule < Test::Unit::TestCase
def test_remove_class_variable
c = Class.new
- c.class_eval { @@foo = :foo }
+ c.class_eval('@@foo = :foo')
c.class_eval { remove_class_variable(:@@foo) }
assert_equal(false, c.class_variable_defined?(:@@foo))
end
@@ -854,4 +888,28 @@ class TestModule < Test::Unit::TestCase
end
assert_equal("", stderr)
end
+
+ def test_protected_singleton_method
+ klass = Class.new
+ x = klass.new
+ class << x
+ protected
+
+ def foo
+ end
+ end
+ assert_raise(NoMethodError) do
+ x.foo
+ end
+ klass.send(:define_method, :bar) do
+ x.foo
+ end
+ assert_nothing_raised do
+ x.bar
+ end
+ y = klass.new
+ assert_raise(NoMethodError) do
+ y.bar
+ end
+ end
end
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb
index e90ca3b6d9..0a49422074 100644
--- a/test/ruby/test_object.rb
+++ b/test/ruby/test_object.rb
@@ -322,6 +322,16 @@ class TestObject < Test::Unit::TestCase
assert_raise(ArgumentError) do
c.new.method_missing
end
+
+ bug2494 = '[ruby-core:27219]'
+ c = Class.new do
+ def method_missing(meth, *args)
+ super
+ end
+ end
+ b = c.new
+ foo rescue nil
+ assert_nothing_raised(bug2494) {[b].flatten}
end
def test_respond_to_missing
@@ -399,7 +409,7 @@ class TestObject < Test::Unit::TestCase
def test_superclass_method
bug2312 = '[ruby-dev:39581]'
assert_in_out_err(["-e", "module Enumerable;undef min;end; (1..2).min{}"],
- [], [], /no superclass method/, bug2312)
+ "", [], /no superclass method/, bug2312)
end
def test_specific_eval_with_wrong_arguments
@@ -416,12 +426,20 @@ class TestObject < Test::Unit::TestCase
end
end
+ class InstanceExec
+ INSTANCE_EXEC = 123
+ end
+
def test_instance_exec
x = 1.instance_exec(42) {|a| self + a }
assert_equal(43, x)
x = "foo".instance_exec("bar") {|a| self + a }
assert_equal("foobar", x)
+
+ assert_raise(NameError) do
+ InstanceExec.new.instance_exec { INSTANCE_EXEC }
+ end
end
def test_extend
diff --git a/test/ruby/test_primitive.rb b/test/ruby/test_primitive.rb
index 46133eff8c..d701348f26 100644
--- a/test/ruby/test_primitive.rb
+++ b/test/ruby/test_primitive.rb
@@ -228,6 +228,12 @@ class TestRubyPrimitive < Test::Unit::TestCase
assert_equal 7, a[0]
a[0] ||= 3
assert_equal 7, a[0]
+
+ a = [0, 1, nil, 3, 4]
+ a[*[2]] ||= :foo
+ assert_equal [0, 1, :foo, 3, 4], a
+ a[*[1,3]] &&= [:bar]
+ assert_equal [0, :bar, 4], a
end
def test_opassign_and_or
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 6c2bae4c41..f6fd5c8ea0 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -178,7 +178,7 @@ class TestProc < Test::Unit::TestCase
b = proc { :foo }
assert_equal(:foo, b.curry[])
- b = lambda {|x, y, &b| b.call(x + y) }.curry
+ b = lambda {|x, y, &blk| blk.call(x + y) }.curry
b = b.call(2) { raise }
b = b.call(3) {|x| x + 4 }
assert_equal(9, b)
@@ -620,7 +620,7 @@ class TestProc < Test::Unit::TestCase
assert_equal [1, 2, 3, 4, 5, 6, Proc, :x], (pr.call(1, 2, 3, 4, 5, 6, 7){|x| x})
end
- def test_proc_args_opt_and_block
+ def test_proc_args_opt_and_block2
pr = proc {|a,b,c=:c,d=:d,*e,&f|
[a, b, c, d, e, f.class, f&&f.call(:x)]
}
@@ -735,6 +735,10 @@ class TestProc < Test::Unit::TestCase
assert_equal([[:req, :a], [:rest, :b], [:req, :c], [:block, :d]], method(:pmo6).to_proc.parameters)
assert_equal([[:req, :a], [:opt, :b], [:rest, :c], [:req, :d], [:block, :e]], method(:pmo7).to_proc.parameters)
assert_equal([[:req], [:block, :b]], method(:pma1).to_proc.parameters)
+
+ assert_equal([], "".method(:upcase).to_proc.parameters)
+ assert_equal([[:rest]], "".method(:gsub).to_proc.parameters)
+ assert_equal([[:rest]], proc {}.curry.parameters)
end
def test_to_s
@@ -746,14 +750,15 @@ class TestProc < Test::Unit::TestCase
assert(x.to_s.tainted?)
end
- def source_location_test
- __LINE__
+ @@line_of_source_location_test = __LINE__ + 1
+ def source_location_test a=1,
+ b=2
end
def test_source_location
file, lineno = method(:source_location_test).source_location
assert_match(/^#{ Regexp.quote(__FILE__) }$/, file)
- assert_equal(source_location_test - 1, lineno)
+ assert_equal(@@line_of_source_location_test, lineno, 'Bug #2427')
end
def test_splat_without_respond_to
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 06d2529597..c95c58f788 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -238,7 +238,7 @@ class TestProcess < Test::Unit::TestCase
h = {}
cmd = [h, RUBY]
- ENV.each do |k,v|
+ (ENV.keys + MANDATORY_ENVS).each do |k|
case k
when /\APATH\z/i
when *MANDATORY_ENVS
@@ -260,6 +260,24 @@ class TestProcess < Test::Unit::TestCase
system({"fofo"=>"haha"}, *ENVCOMMAND, STDOUT=>"out")
assert_match(/^fofo=haha$/, File.read("out").chomp)
}
+
+ old = ENV["hmm"]
+ begin
+ ENV["hmm"] = "fufu"
+ IO.popen(ENVCOMMAND) {|io| assert_match(/^hmm=fufu$/, io.read) }
+ IO.popen([{"hmm"=>""}, *ENVCOMMAND]) {|io| assert_match(/^hmm=$/, io.read) }
+ IO.popen([{"hmm"=>nil}, *ENVCOMMAND]) {|io| assert_not_match(/^hmm=/, io.read) }
+ ENV["hmm"] = ""
+ IO.popen(ENVCOMMAND) {|io| assert_match(/^hmm=$/, io.read) }
+ IO.popen([{"hmm"=>""}, *ENVCOMMAND]) {|io| assert_match(/^hmm=$/, io.read) }
+ IO.popen([{"hmm"=>nil}, *ENVCOMMAND]) {|io| assert_not_match(/^hmm=/, io.read) }
+ ENV["hmm"] = nil
+ IO.popen(ENVCOMMAND) {|io| assert_not_match(/^hmm=/, io.read) }
+ IO.popen([{"hmm"=>""}, *ENVCOMMAND]) {|io| assert_match(/^hmm=$/, io.read) }
+ IO.popen([{"hmm"=>nil}, *ENVCOMMAND]) {|io| assert_not_match(/^hmm=/, io.read) }
+ ensure
+ ENV["hmm"] = old
+ end
end
def test_execopts_unsetenv_others
@@ -1148,4 +1166,22 @@ class TestProcess < Test::Unit::TestCase
rescue ArgumentError
end
end
+
+ def test_no_curdir
+ if /mswin|bccwin|mingw/ =~ RUBY_PLATFORM
+ skip "removing current directory is not supported"
+ end
+ with_tmpchdir {|d|
+ Dir.mkdir("vd")
+ status = nil
+ Dir.chdir("vd") {
+ dir = "#{d}/vd"
+ # OpenSolaris cannot remove the current directory.
+ system(RUBY, "-e", "Dir.chdir '..'; Dir.rmdir #{dir.dump}")
+ system({"RUBYLIB"=>nil}, RUBY, "-e", "exit true")
+ status = $?
+ }
+ assert(status.success?, "[ruby-dev:38105]")
+ }
+ end
end
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb
index 5ad2638d4a..a2935955de 100644
--- a/test/ruby/test_range.rb
+++ b/test/ruby/test_range.rb
@@ -1,5 +1,6 @@
require 'test/unit'
require 'delegate'
+require 'timeout'
class TestRange < Test::Unit::TestCase
def test_range_string
@@ -188,8 +189,12 @@ class TestRange < Test::Unit::TestCase
o1 = Object.new
o2 = Object.new
- def o1.<=>(x); -1; end
- def o2.<=>(x); 0; end
+ def o1.setcmp(v) @cmpresult = v end
+ o1.setcmp(-1)
+ def o1.<=>(x); @cmpresult; end
+ def o2.setcmp(v) @cmpresult = v end
+ o2.setcmp(0)
+ def o2.<=>(x); @cmpresult; end
class << o1; self; end.class_eval do
define_method(:succ) { o2 }
end
@@ -205,19 +210,19 @@ class TestRange < Test::Unit::TestCase
r2.each {|x| a << x }
assert_equal([o1], a)
- def o2.<=>(x); 1; end
+ o2.setcmp(1)
a = []
r1.each {|x| a << x }
assert_equal([o1], a)
- def o2.<=>(x); nil; end
+ o2.setcmp(nil)
a = []
r1.each {|x| a << x }
assert_equal([o1], a)
- def o1.<=>(x); nil; end
+ o1.setcmp(nil)
a = []
r2.each {|x| a << x }
@@ -269,20 +274,24 @@ class TestRange < Test::Unit::TestCase
def test_beg_len
o = Object.new
assert_raise(TypeError) { [][o] }
- def o.begin; -10; end
+ class << o; attr_accessor :begin end
+ o.begin = -10
assert_raise(TypeError) { [][o] }
- def o.end; 0; end
+ class << o; attr_accessor :end end
+ o.end = 0
assert_raise(NoMethodError) { [][o] }
- def o.exclude_end?; false; end
+ def o.exclude_end=(v) @exclude_end = v end
+ def o.exclude_end?() @exclude_end end
+ o.exclude_end = false
assert_nil([0][o])
assert_raise(RangeError) { [0][o] = 1 }
- def o.begin; 10; end
- def o.end; 10; end
+ o.begin = 10
+ o.end = 10
assert_nil([0][o])
- def o.begin; 0; end
+ o.begin = 0
assert_equal([0], [0][o])
- def o.begin; 2; end
- def o.end; 0; end
+ o.begin = 2
+ o.end = 0
assert_equal([], [0, 1, 2][o])
end
@@ -294,4 +303,37 @@ class TestRange < Test::Unit::TestCase
o.instance_eval { initialize(o, 1) }
assert_equal("(... .. ...)..1", o.inspect)
end
+
+ def test_comparison_when_recursive
+ x = CyclicRange.allocate; x.send(:initialize, x, 1)
+ y = CyclicRange.allocate; y.send(:initialize, y, 1)
+ Timeout.timeout(1) {
+ assert x == y
+ assert x.eql? y
+ }
+
+ z = CyclicRange.allocate; z.send(:initialize, z, :another)
+ Timeout.timeout(1) {
+ assert x != z
+ assert !x.eql?(z)
+ }
+
+ x = CyclicRange.allocate
+ y = CyclicRange.allocate
+ x.send(:initialize, y, 1)
+ y.send(:initialize, x, 1)
+ Timeout.timeout(1) {
+ assert x == y
+ assert x.eql?(y)
+ }
+
+ x = CyclicRange.allocate
+ z = CyclicRange.allocate
+ x.send(:initialize, z, 1)
+ z.send(:initialize, x, :other)
+ Timeout.timeout(1) {
+ assert x != z
+ assert !x.eql?(z)
+ }
+ end
end
diff --git a/test/ruby/test_rational.rb b/test/ruby/test_rational.rb
index 274a6eb33f..02d8bd61ed 100644
--- a/test/ruby/test_rational.rb
+++ b/test/ruby/test_rational.rb
@@ -7,9 +7,10 @@ class Rational_Test < Test::Unit::TestCase
def setup
@complex = defined?(Complex)
if @complex
- @keiju = Complex.instance_variable_get('@RCS_ID')
+ @keiju = Complex.instance_variables.include?(:@RCS_ID)
end
- @unify = $".grep(/mathn/).size != 0
+ seps = [File::SEPARATOR, File::ALT_SEPARATOR].compact.map{|x| Regexp.escape(x)}.join("|")
+ @unify = $".grep(/(?:^|#{seps})mathn(?:\.(?:rb|so))?/).size != 0
end
def test_ratsub
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 4f8a1a6c77..4cd35d5248 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -10,6 +10,10 @@ class TestRegexp < Test::Unit::TestCase
$VERBOSE = @verbose
end
+ def test_ruby_core_27247
+ assert_match(/(a){2}z/, "aaz")
+ end
+
def test_ruby_dev_24643
assert_nothing_raised("[ruby-dev:24643]") {
/(?:(?:[a]*[a])?b)*a*$/ =~ "aabaaca"
@@ -791,4 +795,9 @@ class TestRegexp < Test::Unit::TestCase
h = {a => 42}
assert_equal(42, h[b], '[ruby-core:24748]')
end
+
+ def test_regexp_poped
+ assert_nothing_raised { eval("a = 1; /\#{ a }/; a") }
+ assert_nothing_raised { eval("a = 1; /\#{ a }/o; a") }
+ end
end
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 510da8e272..458c61998f 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -2,6 +2,7 @@ require 'test/unit'
require 'tempfile'
require_relative 'envutil'
+require 'tmpdir'
class TestRequire < Test::Unit::TestCase
def test_require_invalid_shared_object
@@ -84,7 +85,7 @@ class TestRequire < Test::Unit::TestCase
begin
require 'socket'
p :ng
- rescue NameError
+ rescue TypeError
p :ok
end
INPUT
@@ -246,7 +247,6 @@ class TestRequire < Test::Unit::TestCase
end
def test_relative
- require 'tmpdir'
load_path = $:.dup
$:.delete(".")
Dir.mktmpdir do |tmp|
@@ -268,4 +268,19 @@ class TestRequire < Test::Unit::TestCase
ensure
$:.replace(load_path) if load_path
end
+
+ def test_relative_symlink
+ Dir.mktmpdir {|tmp|
+ Dir.chdir(tmp) {
+ Dir.mkdir "a"
+ Dir.mkdir "b"
+ File.open("a/lib.rb", "w") {|f| f.puts 'puts "a/lib.rb"' }
+ File.open("b/lib.rb", "w") {|f| f.puts 'puts "b/lib.rb"' }
+ File.open("a/tst.rb", "w") {|f| f.puts 'require_relative "lib"' }
+ File.symlink("../a/tst.rb", "b/tst.rb")
+ result = IO.popen([EnvUtil.rubybin, "b/tst.rb"]).read
+ assert_equal("a/lib.rb\n", result, "[ruby-dev:40040]")
+ }
+ }
+ end
end
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index d4143cffb8..ee5331c18e 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -38,10 +38,14 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_warning
+ save_rubyopt = ENV['RUBYOPT']
+ ENV['RUBYOPT'] = nil
assert_in_out_err(%w(-W0 -e) + ['p $-W'], "", %w(0), [])
assert_in_out_err(%w(-W1 -e) + ['p $-W'], "", %w(1), [])
assert_in_out_err(%w(-Wx -e) + ['p $-W'], "", %w(1), [])
assert_in_out_err(%w(-W -e) + ['p $-W'], "", %w(2), [])
+ ensure
+ ENV['RUBYOPT'] = save_rubyopt
end
def test_safe_level
@@ -271,7 +275,7 @@ class TestRubyOptions < Test::Unit::TestCase
def test_sflag
assert_in_out_err(%w(- -abc -def=foo -ghi-jkl -- -xyz),
- "#!ruby -s\np [$abc, $def, $ghi_jkl, $xyz]\n",
+ "#!ruby -s\np [$abc, $def, $ghi_jkl, defined?($xyz)]\n",
['[true, "foo", true, nil]'], [])
assert_in_out_err(%w(- -#), "#!ruby -s\n", [],
@@ -320,4 +324,31 @@ class TestRubyOptions < Test::Unit::TestCase
assert_in_out_err(["-r", notexist, "-ep"], "", [], pat)
assert_in_out_err([notexist], "", [], pat)
end
+
+ def test_segv_test
+ assert_in_out_err(["-e", "Process.kill :SEGV, $$"], "", [],
+ %r(\A
+ -e:(?:1:)?\s\[BUG\]\sSegmentation\sfault\n
+ #{ Regexp.quote(RUBY_DESCRIPTION) }\n\n
+ --\scontrol\sframe\s----------\n
+ (?:c:.*\n)*
+ ---------------------------\n
+ (?:
+ --\sRuby\slevel\sbacktrace\sinformation\s----------------------------------------\n
+ -e:1:in\s`<main>'\n
+ -e:1:in\s`kill'\n
+ )?
+ \n
+ (?:
+ --\sC\slevel\sbacktrace\sinformation\s-------------------------------------------\n
+ (?:(?:.*\s)?\[0x\h+\]\n)*\n
+ )?
+ \[NOTE\]\n
+ You\smay\shave\sencountered\sa\sbug\sin\sthe\sRuby\sinterpreter\sor\sextension\slibraries.\n
+ Bug\sreports\sare\swelcome.\n
+ For\sdetails:\shttp:\/\/www.ruby-lang.org/bugreport.html\n\n\z
+ )x,
+ nil,
+ :rlimit_core=>0)
+ end
end
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 7fd7cc6534..f66b728146 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -263,8 +263,31 @@ class TestSetTraceFunc < Test::Unit::TestCase
assert_equal([], events)
end
+ def test_break # [ruby-core:27606] [Bug #2610]
+ events = []
+ eval <<-EOF.gsub(/^.*?: /, "")
+ 1: set_trace_func(Proc.new { |event, file, lineno, mid, binding, klass|
+ 2: events << [event, lineno, mid, klass]
+ 3: })
+ 4: [1,2,3].any? {|n| n}
+ 8: set_trace_func(nil)
+ EOF
+
+ [["c-return", 3, :set_trace_func, Kernel],
+ ["line", 4, __method__, self.class],
+ ["c-call", 4, :any?, Enumerable],
+ ["c-call", 4, :each, Array],
+ ["line", 4, __method__, self.class],
+ ["c-return", 4, :each, Array],
+ ["c-return", 4, :any?, Enumerable],
+ ["line", 5, __method__, self.class],
+ ["c-call", 5, :set_trace_func, Kernel]].each{|e|
+ assert_equal(e, events.shift)
+ }
+ end
+
def test_invalid_proc
- assert_raise(TypeError) { set_trace_func(1) }
+ assert_raise(TypeError) { set_trace_func(1) }
end
def test_raise_in_trace
diff --git a/test/ruby/test_sprintf_comb.rb b/test/ruby/test_sprintf_comb.rb
index 5dee7305fb..261732bcbc 100644
--- a/test/ruby/test_sprintf_comb.rb
+++ b/test/ruby/test_sprintf_comb.rb
@@ -229,7 +229,7 @@ class TestSprintfComb < Test::Unit::TestCase
digits.reverse!
- str = digits.map {|d| digitmap[d] }.join
+ str = digits.map {|digit| digitmap[digit] }.join
pad = ''
nlen = prefix.length + sign.length + str.length
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 27360e76c1..64205f6082 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -218,6 +218,13 @@ class TestString < Test::Unit::TestCase
l = s.size
s << "bar"
assert_equal(l + 3, s.size)
+
+ bug = '[ruby-core:27583]'
+ assert_raise(RangeError, bug) {S("a".force_encoding(Encoding::UTF_8)) << -3}
+ assert_raise(RangeError, bug) {S("a".force_encoding(Encoding::UTF_8)) << -2}
+ assert_raise(RangeError, bug) {S("a".force_encoding(Encoding::UTF_8)) << -1}
+ assert_raise(RangeError, bug) {S("a".force_encoding(Encoding::UTF_8)) << 0x81308130}
+ assert_nothing_raised {S("a".force_encoding(Encoding::GB18030)) << 0x81308130}
end
def test_MATCH # '=~'
@@ -320,9 +327,12 @@ class TestString < Test::Unit::TestCase
end
+ Bug2463 = '[ruby-dev:39856]'
def test_center
assert_equal(S("hello"), S("hello").center(4))
assert_equal(S(" hello "), S("hello").center(11))
+ assert_equal(S("ababaababa"), S("").center(10, "ab"), Bug2463)
+ assert_equal(S("ababaababab"), S("").center(11, "ab"), Bug2463)
end
def test_chomp
@@ -779,6 +789,8 @@ class TestString < Test::Unit::TestCase
def test_ljust
assert_equal(S("hello"), S("hello").ljust(4))
assert_equal(S("hello "), S("hello").ljust(11))
+ assert_equal(S("ababababab"), S("").ljust(10, "ab"), Bug2463)
+ assert_equal(S("abababababa"), S("").ljust(11, "ab"), Bug2463)
end
def test_next
@@ -863,6 +875,12 @@ class TestString < Test::Unit::TestCase
s2 = ["foo"].pack("p")
s.replace(s2)
assert_equal(s2, s)
+
+ fs = "".freeze
+ assert_raise(RuntimeError) { fs.replace("a") }
+ assert_raise(RuntimeError) { fs.replace(fs) }
+ assert_raise(ArgumentError) { fs.replace() }
+ assert_raise(RuntimeError) { fs.replace(42) }
end
def test_reverse
@@ -917,6 +935,8 @@ class TestString < Test::Unit::TestCase
def test_rjust
assert_equal(S("hello"), S("hello").rjust(4))
assert_equal(S(" hello"), S("hello").rjust(11))
+ assert_equal(S("ababababab"), S("").rjust(10, "ab"), Bug2463)
+ assert_equal(S("abababababa"), S("").rjust(11, "ab"), Bug2463)
end
def test_scan
diff --git a/test/ruby/test_struct.rb b/test/ruby/test_struct.rb
index b6a77a9fb7..49dcdb45b2 100644
--- a/test/ruby/test_struct.rb
+++ b/test/ruby/test_struct.rb
@@ -1,4 +1,5 @@
require 'test/unit'
+require 'timeout'
class TestStruct < Test::Unit::TestCase
def test_struct
@@ -219,4 +220,33 @@ class TestStruct < Test::Unit::TestCase
a = struct_test.new(42)
assert_equal("#<struct Struct::R\u{e9}sum\u{e9} r\u{e9}sum\u{e9}=42>", a.inspect, '[ruby-core:24849]')
end
+
+ def test_comparison_when_recursive
+ klass1 = Struct.new(:a, :b, :c)
+
+ x = klass1.new(1, 2, nil); x.c = x
+ y = klass1.new(1, 2, nil); y.c = y
+ Timeout.timeout(1) {
+ assert x == y
+ assert x.eql? y
+ }
+
+ z = klass1.new(:something, :other, nil); z.c = z
+ Timeout.timeout(1) {
+ assert x != z
+ assert !x.eql?(z)
+ }
+
+ x.c = y; y.c = x
+ Timeout.timeout(1) {
+ assert x == y
+ assert x.eql?(y)
+ }
+
+ x.c = z; z.c = x
+ Timeout.timeout(1) {
+ assert x != z
+ assert !x.eql?(z)
+ }
+ end
end
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index f402da3907..0f09669293 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -132,4 +132,8 @@ class TestSymbol < Test::Unit::TestCase
assert_equal(:Foo, :foo.capitalize)
assert_equal(:fOo, :FoO.swapcase)
end
+
+ def test_symbol_poped
+ assert_nothing_raised { eval('a = 1; :"#{ a }"; 1') }
+ end
end
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index 0fbad0af33..1819982250 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -37,7 +37,7 @@ class TestSystem < Test::Unit::TestCase
tmp = open(tmpfilename, "w")
tmp.print "this is a leading junk\n";
tmp.print "#! /usr/local/bin/ruby -s\n";
- tmp.print "print $zzz\n";
+ tmp.print "print $zzz if defined? $zzz\n";
tmp.print "__END__\n";
tmp.print "this is a trailing junk\n";
tmp.close
@@ -49,7 +49,7 @@ class TestSystem < Test::Unit::TestCase
tmp.print "#! /non/exist\\interpreter?/./to|be:ignored\n";
tmp.print "this is a leading junk\n";
tmp.print "#! /usr/local/bin/ruby -s\n";
- tmp.print "print $zzz\n";
+ tmp.print "print $zzz if defined? $zzz\n";
tmp.print "__END__\n";
tmp.print "this is a trailing junk\n";
tmp.close
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index bae1f0038a..6707fc4a29 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -130,7 +130,7 @@ class TestThread < Test::Unit::TestCase
end
t1.kill
t2.kill
- assert(c1 > c2, "[ruby-dev:33124]")
+ # assert_operator(c1, :>, c2, "[ruby-dev:33124]") # not guaranteed
end
def test_new
diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb
index d7e736de3a..c583b4e873 100644
--- a/test/ruby/test_time.rb
+++ b/test/ruby/test_time.rb
@@ -27,6 +27,16 @@ class TestTime < Test::Unit::TestCase
assert_equal(Time.utc(2000, 3, 21, 3, 30) + (-3 * 3600),
Time.utc(2000, 3, 21, 0, 30))
assert_equal(0, (Time.at(1.1) + 0.9).usec)
+
+ assert((Time.utc(2000, 4, 1) + 24).utc?)
+ assert(!(Time.local(2000, 4, 1) + 24).utc?)
+
+ t = Time.new(2000, 4, 1, 0, 0, 0, "+01:00") + 24
+ assert(!t.utc?)
+ assert_equal(3600, t.utc_offset)
+ t = Time.new(2000, 4, 1, 0, 0, 0, "+02:00") + 24
+ assert(!t.utc?)
+ assert_equal(7200, t.utc_offset)
end
def test_time_subt()
@@ -191,6 +201,18 @@ class TestTime < Test::Unit::TestCase
assert_marshal_roundtrip(Time.at(0, 0.120))
end
+ def test_marshal_nsec_191
+ # generated by ruby 1.9.1p376
+ m = "\x04\bIu:\tTime\r \x80\x11\x80@\xE2\x01\x00\x06:\rsubmicro\"\ax\x90"
+ t = Marshal.load(m)
+ assert_equal(Time.at(Rational(123456789, 1000000000)), t, "[ruby-dev:40133]")
+ end
+
+ def test_marshal_rational
+ assert_marshal_roundtrip(Time.at(0, Rational(1,3)))
+ assert_not_match(/Rational/, Marshal.dump(Time.at(0, Rational(1,3))))
+ end
+
def test_marshal_ivar
t = Time.at(123456789, 987654.321)
t.instance_eval { @var = 135 }
@@ -198,6 +220,20 @@ class TestTime < Test::Unit::TestCase
assert_marshal_roundtrip(Marshal.load(Marshal.dump(t)))
end
+ def test_marshal_timezone
+ bug = '[ruby-dev:40063]'
+
+ t1 = Time.gm(2000)
+ m = Marshal.dump(t1.getlocal("-02:00"))
+ t2 = Marshal.load(m)
+ assert_equal(t1, t2)
+ assert_equal(-7200, t2.utc_offset, bug)
+ m = Marshal.dump(t1.getlocal("+08:15"))
+ t2 = Marshal.load(m)
+ assert_equal(t1, t2)
+ assert_equal(29700, t2.utc_offset, bug)
+ end
+
# Sat Jan 01 00:00:00 UTC 2000
T2000 = Time.at(946684800).gmtime
@@ -351,6 +387,26 @@ class TestTime < Test::Unit::TestCase
assert_equal(T2000 + 1, T2000.succ)
end
+ def test_plus_type
+ t0 = Time.utc(2000,1,1)
+ n0 = t0.to_i
+ n1 = n0+1
+ t1 = Time.at(n1)
+ assert_equal(t1, t0 + 1)
+ assert_equal(t1, t0 + 1.0)
+ assert_equal(t1, t0 + Rational(1,1))
+ assert_equal(t1, t0 + SimpleDelegator.new(1))
+ assert_equal(t1, t0 + SimpleDelegator.new(1.0))
+ assert_equal(t1, t0 + SimpleDelegator.new(Rational(1,1)))
+ assert_raise(TypeError) { t0 + nil }
+ assert_raise(TypeError) { t0 + "1" }
+ assert_raise(TypeError) { t0 + SimpleDelegator.new("1") }
+ assert_equal(0.5, (t0 + 1.5).subsec)
+ assert_equal(Rational(1,3), (t0 + Rational(4,3)).subsec)
+ assert_equal(0.5, (t0 + SimpleDelegator.new(1.5)).subsec)
+ assert_equal(Rational(1,3), (t0 + SimpleDelegator.new(Rational(4,3))).subsec)
+ end
+
def test_readers
assert_equal(0, T2000.sec)
assert_equal(0, T2000.min)
@@ -515,4 +571,9 @@ class TestTime < Test::Unit::TestCase
assert_equal(-1, d1 <=> d2)
assert_equal(1, d2 <=> d1)
end
+
+ def test_to_r
+ assert_kind_of(Rational, Time.new(2000,1,1,0,0,Rational(4,3)).to_r)
+ assert_kind_of(Rational, Time.utc(1970).to_r)
+ end
end
diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb
index cd956e134b..bca51ba251 100644
--- a/test/ruby/test_transcode.rb
+++ b/test/ruby/test_transcode.rb
@@ -909,7 +909,7 @@ class TestTranscode < Test::Unit::TestCase
assert_raise(Encoding::UndefinedConversionError) { "\xFF".encode("utf-8", 'TIS-620') }
end
- def test_CP850
+ def test_CP850
check_both_ways("\u00C7", "\x80", 'CP850') # Ç
check_both_ways("\u00C5", "\x8F", 'CP850') # Ã…
check_both_ways("\u00C9", "\x90", 'CP850') # É
@@ -1578,7 +1578,13 @@ class TestTranscode < Test::Unit::TestCase
end
def test_gb18030
- # test from GBK
+ # overall roundtrip test
+ all_unicode = (0x0..0xD7FF).to_a.pack 'U*' #追加
+ all_unicode << (0xE000..0xFFFF).to_a.pack("U*") #追加
+
+ assert_equal(all_unicode, all_unicode.encode("gb18030").encode("UTF-8")) #追加
+
+ # tests from GBK
check_both_ways("\u4E02", "\x81\x40", 'GB18030') #
check_both_ways("\u4E8A", "\x81\x7E", 'GB18030') #
check_both_ways("\u4E90", "\x81\x80", 'GB18030') #
@@ -1691,7 +1697,7 @@ class TestTranscode < Test::Unit::TestCase
check_both_ways("\u9752\u5C71\u5B66\u9662\u5927\u5B66", "\xC7\xE0\xC9\xBD\xD1\xA7\xD4\xBA\xB4\xF3\xD1\xA7", 'GB18030') # é’山学院大学
check_both_ways("\u795E\u6797\u7FA9\u535A", "\xC9\xF1\xC1\xD6\xC1\x78\xB2\xA9", 'GB18030') # 神林義
- # new tests for GB18030
+ # new tests for GB18030
check_both_ways("\u9FA6", "\x82\x35\x8F\x33", 'GB18030') # 龦
check_both_ways("\uD7FF", "\x83\x36\xC7\x38", 'GB18030') # No name ()
@@ -1867,7 +1873,12 @@ class TestTranscode < Test::Unit::TestCase
#assert_raise(Encoding::UndefinedConversionError) { "\xF9\xD6".encode("utf-8", 'Big5-HKSCS') }
check_both_ways("\u795E\u6797\u7FA9\u535A", "\xAF\xAB\xAA\x4C\xB8\x71\xB3\xD5", 'Big5-HKSCS') # 神林義åš
end
-
+
+ def
+ test_Big5_UAO
+ check_both_ways("\u4e17", "\x81\x40", 'Big5-UAO') # 丗
+ end
+
def test_nothing_changed
a = "James".force_encoding("US-ASCII")
b = a.encode("Shift_JIS")
diff --git a/test/ruby/test_undef.rb b/test/ruby/test_undef.rb
new file mode 100644
index 0000000000..e1c98076c0
--- /dev/null
+++ b/test/ruby/test_undef.rb
@@ -0,0 +1,37 @@
+require 'test/unit'
+
+class TestUndef < Test::Unit::TestCase
+ class Undef0
+ def foo
+ "foo"
+ end
+ undef foo
+ end
+
+ class Undef1
+ def bar
+ "bar"
+ end
+ end
+
+ class Undef2 < Undef1
+ undef bar
+ end
+
+ def test_undef
+ x = Undef0.new
+ assert_raise(NoMethodError) { x.foo }
+ y = Undef1.new
+ assert_equal "bar", y.bar
+ z = Undef2.new
+ assert_raise(NoMethodError) { z.foo }
+ end
+
+ def test_special_const_undef
+ assert_raise(TypeError) do
+ 1.instance_eval do
+ undef to_s
+ end
+ end
+ end
+end
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb
index a842c31c3f..53e00301dc 100644
--- a/test/ruby/test_variable.rb
+++ b/test/ruby/test_variable.rb
@@ -81,4 +81,12 @@ class TestVariable < Test::Unit::TestCase
def test_global_variable_0
assert_in_out_err(["-e", "$0='t'*1000;print $0"], "", /\At+\z/, [])
end
+
+ def test_global_variable_poped
+ assert_nothing_raised { eval("$foo; 1") }
+ end
+
+ def test_constant_poped
+ assert_nothing_raised { eval("TestVariable::Gods; 1") }
+ end
end
diff --git a/test/ruby/test_yield.rb b/test/ruby/test_yield.rb
index 2a2c6ae80f..3337aea078 100644
--- a/test/ruby/test_yield.rb
+++ b/test/ruby/test_yield.rb
@@ -1,4 +1,5 @@
require 'test/unit'
+require 'stringio'
class TestRubyYield < Test::Unit::TestCase
@@ -209,8 +210,8 @@ class TestRubyYieldGen < Test::Unit::TestCase
if args.last == []
args = args[0...-1]
end
- code = "emu_return_args #{args.map {|a| a.join('') }.join(",")}"
- eval code
+ code = "emu_return_args(#{args.map {|a| a.join('') }.join(",")})"
+ eval code, nil, 'generated_code_in_emu_eval_args'
end
def emu_bind_single(arg, param, result_binding)
@@ -324,6 +325,16 @@ class TestRubyYieldGen < Test::Unit::TestCase
}
end
+ def disable_stderr
+ begin
+ save_stderr = $stderr
+ $stderr = StringIO.new
+ yield
+ ensure
+ $stderr = save_stderr
+ end
+ end
+
def check_nofork(t, islambda=false)
t, vars = rename_var(t)
t = t.subst('vars') { " [#{vars.join(",")}]" }
@@ -331,11 +342,13 @@ class TestRubyYieldGen < Test::Unit::TestCase
s = t.to_s
#print "#{s}\t\t"
#STDOUT.flush
- begin
- eval_values = eval(s)
- rescue ArgumentError
- eval_values = ArgumentError
- end
+ eval_values = disable_stderr {
+ begin
+ eval(s, nil, 'generated_code_in_check_nofork')
+ rescue ArgumentError
+ ArgumentError
+ end
+ }
#success = emu_values == eval_values ? 'succ' : 'fail'
#puts "eval:#{vs_ev.inspect[1...-1].delete(' ')}\temu:#{vs_emu.inspect[1...-1].delete(' ')}\t#{success}"
assert_equal(emu_values, eval_values, s)
@@ -358,7 +371,10 @@ class TestRubyYieldGen < Test::Unit::TestCase
def test_yield_enum
syntax = Sentence.expand_syntax(Syntax)
Sentence.each(syntax, :test_enum, 4) {|t|
- r1, r2 = eval(t.to_s)
+ code = t.to_s
+ r1, r2 = disable_stderr {
+ eval(code, nil, 'generated_code_in_test_yield_enum')
+ }
assert_equal(r1, r2, "#{t}")
}
end
diff --git a/test/rubygems/gem_package_tar_test_case.rb b/test/rubygems/gem_package_tar_test_case.rb
index 462fa08848..f671693cc0 100644
--- a/test/rubygems/gem_package_tar_test_case.rb
+++ b/test/rubygems/gem_package_tar_test_case.rb
@@ -35,7 +35,7 @@ class TarTestCase < RubyGemTestCase
linkname 100
magic 6
version 2
- uname 32
+ uname 32
gname 32
devmajor 8
devminor 8
@@ -54,7 +54,7 @@ class TarTestCase < RubyGemTestCase
next
end
- assert_equal expected[offset, length], actual[offset, length],
+ assert_equal expected[offset, length], actual[offset, length],
"Field #{name} of the tar header differs."
offset += length
diff --git a/test/rubygems/insure_session.rb b/test/rubygems/insure_session.rb
index e56f9abcb8..4ae706494a 100644
--- a/test/rubygems/insure_session.rb
+++ b/test/rubygems/insure_session.rb
@@ -23,7 +23,7 @@ def install_session
puts
puts "with the appropriate admin privileges."
puts "*****************************************************************"
- puts
+ puts
exit
end
gem 'session'
diff --git a/test/rubygems/simple_gem.rb b/test/rubygems/simple_gem.rb
index a6f14bc3c7..4667a08749 100644
--- a/test/rubygems/simple_gem.rb
+++ b/test/rubygems/simple_gem.rb
@@ -5,10 +5,10 @@
#++
SIMPLE_GEM = <<-GEMDATA
- MD5SUM = "e3701f9db765a2358aef94c40ded71c8"
+ MD5SUM = "b12a4d48febeb2289c539c2574c4b6f8"
if $0 == __FILE__
require 'optparse'
-
+
options = {}
ARGV.options do |opts|
opts.on_tail("--help", "show this message") {puts opts; exit}
@@ -19,45 +19,45 @@
end
require 'rubygems'
- @directory = options[:directory] || Gem.dir
+ @directory = options[:directory] || Gem.dir
@force = options[:force]
-
- gem = Gem::Installer.new(__FILE__).install(@force, @directory)
+
+ gem = Gem::Installer.new(__FILE__).install(@force, @directory)
if options[:gen_rdoc]
Gem::DocManager.new(gem).generate_rdoc
end
end
__END__
---- !ruby/object:Gem::Specification
+--- !ruby/object:Gem::Specification
rubygems_version: "1.0"
name: testing
-version: !ruby/object:Gem::Version
+version: !ruby/object:Gem::Version
version: 1.2.3
date: 2004-03-18 22:01:52.859121 -05:00
-platform:
+platform:
summary: This exercise the gem testing stuff.
-require_paths:
+require_paths:
- lib
-files:
+files:
- lib/foo.rb
- lib/test
- lib/test.rb
- lib/test/wow.rb
autorequire: test
test_suite_file: foo
-requirements:
+requirements:
- a computer processor
----
--
+---
+-
size: 109
mode: 420
path: lib/foo.rb
--
+-
size: 0
mode: 420
path: lib/test.rb
--
+-
size: 15
mode: 420
path: lib/test/wow.rb
diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
index e18004c4ea..e6d3f896b4 100644
--- a/test/rubygems/test_gem.rb
+++ b/test/rubygems/test_gem.rb
@@ -78,14 +78,6 @@ class TestGem < RubyGemTestCase
end
end
- def test_self_bin_path_with_spaces
- quick_gem 'sp ace', '3' do |s|
- s.executables = ['exec']
- end
- path = Gem.bin_path('sp ace', 'exec')
- assert_equal %w(" "), [path[0,1], path[-1,1]], "Path should be escaped"
- end
-
def test_self_bin_path_not_found
assert_raises(Gem::GemNotFoundException) do
Gem.bin_path('non-existent')
@@ -449,7 +441,7 @@ class TestGem < RubyGemTestCase
def test_self_refresh
util_make_gems
- a1_spec = File.join @gemhome, "specifications", "#{@a1.full_name}.gemspec"
+ a1_spec = File.join @gemhome, "specifications", "#{@a1.full_name}.gemspec"
FileUtils.mv a1_spec, @tempdir
diff --git a/test/rubygems/test_gem_commands_dependency_command.rb b/test/rubygems/test_gem_commands_dependency_command.rb
index 2452189d72..66e9d86d52 100644
--- a/test/rubygems/test_gem_commands_dependency_command.rb
+++ b/test/rubygems/test_gem_commands_dependency_command.rb
@@ -43,6 +43,8 @@ Gem a-1
Gem a-2
+Gem a-3.a
+
Gem a_evil-9
Gem b-2
@@ -100,6 +102,8 @@ Gem a-1
Gem a-2
+Gem a-3.a
+
Gem a_evil-9
Gem b-2
diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb
index a6ac23812b..092a9072c0 100644
--- a/test/rubygems/test_gem_commands_uninstall_command.rb
+++ b/test/rubygems/test_gem_commands_uninstall_command.rb
@@ -57,5 +57,25 @@ class TestGemCommandsUninstallCommand < GemInstallerTestCase
assert_empty output, "UI output should be empty after an uninstall error"
end
+ def test_execute_prerelease
+ @spec = quick_gem "pre", "2.b"
+ @gem = File.join @tempdir, "#{@spec.full_name}.gem"
+ FileUtils.touch @gem
+
+ util_setup_gem
+
+ use_ui @ui do
+ @installer.install
+ end
+
+ @cmd.options[:args] = ["pre"]
+
+ use_ui @ui do
+ @cmd.execute
+ end
+
+ output = @ui.output
+ assert_match(/Successfully uninstalled/, output)
+ end
end
diff --git a/test/rubygems/test_gem_digest.rb b/test/rubygems/test_gem_digest.rb
index 6bce4e4537..6bce4e4537 100755..100644
--- a/test/rubygems/test_gem_digest.rb
+++ b/test/rubygems/test_gem_digest.rb
diff --git a/test/rubygems/test_gem_doc_manager.rb b/test/rubygems/test_gem_doc_manager.rb
index 051c926307..e3928ed2bc 100644
--- a/test/rubygems/test_gem_doc_manager.rb
+++ b/test/rubygems/test_gem_doc_manager.rb
@@ -18,7 +18,7 @@ class TestGemDocManager < RubyGemTestCase
def test_uninstall_doc_unwritable
orig_mode = File.stat(@spec.installation_path).mode
-
+
# File.chmod has no effect on MS Windows directories (it needs ACL).
if win_platform?
skip("test_uninstall_doc_unwritable skipped on MS Windows")
diff --git a/test/rubygems/test_gem_indexer.rb b/test/rubygems/test_gem_indexer.rb
index 7d721d028d..e612a71d55 100644
--- a/test/rubygems/test_gem_indexer.rb
+++ b/test/rubygems/test_gem_indexer.rb
@@ -9,7 +9,7 @@ require_relative 'gemutilities'
require 'rubygems/indexer'
unless ''.respond_to? :to_xs then
- warn "Gem::Indexer tests are being skipped. Install builder gem."
+ warn "Gem::Indexer tests are being skipped. Install builder gem." if $VERBOSE
end
class TestGemIndexer < RubyGemTestCase
@@ -118,10 +118,13 @@ class TestGemIndexer < RubyGemTestCase
expected = <<-EOF
a-1
a-2
+a-3.a
a_evil-9
b-2
c-1.2
d-2.0
+d-2.0.a
+d-2.0.b
pl-1-i386-linux
EOF
@@ -163,13 +166,13 @@ pl-1-i386-linux
assert_indexed @tempdir, "latest_specs.#{@marshal_version}.gz"
expected = <<-EOF
-<?xml version="1.0"?>
-<rss version="2.0">
+<?xml version=\"1.0\"?>
+<rss version=\"2.0\">
<channel>
<title>ExampleForge gems</title>
<link>http://example.com</link>
<description>Recently released gems from http://example.com</description>
- <generator>RubyGems v#{Gem::RubyGemsVersion}</generator>
+ <generator>RubyGems v1.3.4</generator>
<docs>http://cyber.law.harvard.edu/rss/rss.html</docs>
<item>
<title>a-2</title>
@@ -178,9 +181,21 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>a-2</guid>
- <enclosure url="http://gems.example.com/gems/a-2.gem"
- length="3072" type="application/octet-stream" />
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
+ <enclosure url=\"http://gems.example.com/gems/a-2.gem\"
+ length=\"3072\" type=\"application/octet-stream\" />
+ <pubDate>#{@a2.date.rfc2822}</pubDate>
+ <link>http://example.com</link>
+ </item>
+ <item>
+ <title>a-3.a</title>
+ <description>
+&lt;pre&gt;This is a test description&lt;/pre&gt;
+ </description>
+ <author>example@example.com (A User)</author>
+ <guid>a-3.a</guid>
+ <enclosure url=\"http://gems.example.com/gems/a-3.a.gem\"
+ length=\"3072\" type=\"application/octet-stream\" />
+ <pubDate>#{@a3a.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@@ -190,9 +205,9 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>a_evil-9</guid>
- <enclosure url="http://gems.example.com/gems/a_evil-9.gem"
- length="3072" type="application/octet-stream" />
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
+ <enclosure url=\"http://gems.example.com/gems/a_evil-9.gem\"
+ length=\"3072\" type=\"application/octet-stream\" />
+ <pubDate>#{@a_evil9.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@@ -202,9 +217,9 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>b-2</guid>
- <enclosure url="http://gems.example.com/gems/b-2.gem"
- length="3072" type="application/octet-stream" />
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
+ <enclosure url=\"http://gems.example.com/gems/b-2.gem\"
+ length=\"3072\" type=\"application/octet-stream\" />
+ <pubDate>#{@b2.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@@ -214,9 +229,33 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>c-1.2</guid>
- <enclosure url="http://gems.example.com/gems/c-1.2.gem"
- length="3072" type="application/octet-stream" />
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
+ <enclosure url=\"http://gems.example.com/gems/c-1.2.gem\"
+ length=\"3072\" type=\"application/octet-stream\" />
+ <pubDate>#{@c1_2.date.rfc2822}</pubDate>
+ <link>http://example.com</link>
+ </item>
+ <item>
+ <title>d-2.0.a</title>
+ <description>
+&lt;pre&gt;This is a test description&lt;/pre&gt;
+ </description>
+ <author>example@example.com (A User)</author>
+ <guid>d-2.0.a</guid>
+ <enclosure url=\"http://gems.example.com/gems/d-2.0.a.gem\"
+ length=\"3072\" type=\"application/octet-stream\" />
+ <pubDate>#{@d2_0_a.date.rfc2822}</pubDate>
+ <link>http://example.com</link>
+ </item>
+ <item>
+ <title>d-2.0.b</title>
+ <description>
+&lt;pre&gt;This is a test description&lt;/pre&gt;
+ </description>
+ <author>example@example.com (A User)</author>
+ <guid>d-2.0.b</guid>
+ <enclosure url=\"http://gems.example.com/gems/d-2.0.b.gem\"
+ length=\"3072\" type=\"application/octet-stream\" />
+ <pubDate>#{@d2_0_b.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@@ -226,9 +265,9 @@ pl-1-i386-linux
</description>
<author>example@example.com (A User)</author>
<guid>pl-1-x86-linux</guid>
- <enclosure url="http://gems.example.com/gems/pl-1-x86-linux.gem"
- length="3072" type="application/octet-stream" />
- <pubDate>#{Gem::Specification::TODAY.rfc2822}</pubDate>
+ <enclosure url=\"http://gems.example.com/gems/pl-1-x86-linux.gem\"
+ length=\"3072\" type=\"application/octet-stream\" />
+ <pubDate>#{@pl1.date.rfc2822}</pubDate>
<link>http://example.com</link>
</item>
<item>
@@ -247,9 +286,9 @@ eighty characters.&lt;/pre&gt;
</description>
<author>example@example.com (Example), example2@example.com (Example2)</author>
<guid>a-1</guid>
- <enclosure url="http://gems.example.com/gems/a-1.gem"
- length="3584" type="application/octet-stream" />
- <pubDate>#{(Gem::Specification::TODAY - 86400).rfc2822}</pubDate>
+ <enclosure url=\"http://gems.example.com/gems/a-1.gem\"
+ length=\"3584\" type=\"application/octet-stream\" />
+ <pubDate>#{@a1.date.rfc2822}</pubDate>
<link>http://a.example.com</link>
</item>
</channel>
@@ -462,9 +501,9 @@ eighty characters.&lt;/pre&gt;
@ui.output
assert_match %r%^\.\.\.\.\.\.\.\.\.\.$%, @ui.output
assert_match %r%^Loaded all gems$%, @ui.output
- assert_match %r%^Generating Marshal quick index gemspecs for 7 gems$%,
+ assert_match %r%^Generating Marshal quick index gemspecs for 10 gems$%,
@ui.output
- assert_match %r%^Generating YAML quick index gemspecs for 7 gems$%,
+ assert_match %r%^Generating YAML quick index gemspecs for 10 gems$%,
@ui.output
assert_match %r%^Complete$%, @ui.output
assert_match %r%^Generating specs index$%, @ui.output
@@ -473,7 +512,7 @@ eighty characters.&lt;/pre&gt;
assert_match %r%^Generating latest index$%, @ui.output
assert_match %r%^Generating prerelease specs index$%, @ui.output
assert_match %r%^Generating Marshal master index$%, @ui.output
- assert_match %r%^Generating YAML master index for 7 gems \(this may take a while\)$%, @ui.output
+ assert_match %r%^Generating YAML master index for 10 gems \(this may take a while\)$%, @ui.output
assert_match %r%^Complete$%, @ui.output
assert_match %r%^Compressing indicies$%, @ui.output
diff --git a/test/rubygems/test_gem_package_tar_input.rb b/test/rubygems/test_gem_package_tar_input.rb
index 2459802b12..7eea1826e0 100644
--- a/test/rubygems/test_gem_package_tar_input.rb
+++ b/test/rubygems/test_gem_package_tar_input.rb
@@ -47,7 +47,7 @@ class TestGemPackageTarInput < TarTestCase
meta = @spec.to_yaml
f.write tar_file_header("metadata", "", 0644, meta.size)
- f.write meta + "\0" * (1024 - meta.size)
+ f.write meta + "\0" * (1024 - meta.size)
f.write "\0" * 1024
end
diff --git a/test/rubygems/test_gem_package_tar_writer.rb b/test/rubygems/test_gem_package_tar_writer.rb
index 0adc595ad0..0d691e45cd 100644
--- a/test/rubygems/test_gem_package_tar_writer.rb
+++ b/test/rubygems/test_gem_package_tar_writer.rb
@@ -45,7 +45,7 @@ class TestTarWriter < TarTestCase
def test_add_file_simple_padding
@tar_writer.add_file_simple 'x', 0, 100
- assert_headers_equal tar_file_header('x', '', 0, 100),
+ assert_headers_equal tar_file_header('x', '', 0, 100),
@io.string[0, 512]
assert_equal "\0" * 512, @io.string[512, 512]
@@ -60,7 +60,7 @@ class TestTarWriter < TarTestCase
end
def test_add_file_simple_size
- assert_raises Gem::Package::TarWriter::FileOverflow do
+ assert_raises Gem::Package::TarWriter::FileOverflow do
@tar_writer.add_file_simple("lib/foo/bar", 0, 10) do |io|
io.write "1" * 11
end
@@ -68,7 +68,7 @@ class TestTarWriter < TarTestCase
end
def test_add_file_unseekable
- assert_raises Gem::Package::NonSeekableIO do
+ assert_raises Gem::Package::NonSeekableIO do
Gem::Package::TarWriter.new(Object.new).add_file 'x', 0
end
end
diff --git a/test/rubygems/test_gem_source_index.rb b/test/rubygems/test_gem_source_index.rb
index 9cfde0b0a9..40a9a85b27 100644
--- a/test/rubygems/test_gem_source_index.rb
+++ b/test/rubygems/test_gem_source_index.rb
@@ -335,14 +335,12 @@ WARNING: Invalid .gemspec format in '#{spec_file}'
@source_index.add_spec gem_a1_alpha
refute @source_index.latest_specs.include?(gem_a1_alpha)
- assert_nil @source_index.specification(gem_a1_alpha.full_name)
+ assert @source_index.find_name(gem_a1_alpha.full_name).empty?
assert @source_index.prerelease_specs.include?(gem_a1_alpha)
-
- # TODO: don't think this tests writing prerelease index to disk
end
def test_refresh_bang
- a1_spec = File.join @gemhome, "specifications", "#{@a1.full_name}.gemspec"
+ a1_spec = File.join @gemhome, "specifications", "#{@a1.full_name}.gemspec"
FileUtils.mv a1_spec, @tempdir
diff --git a/test/rubygems/test_gem_spec_fetcher.rb b/test/rubygems/test_gem_spec_fetcher.rb
index 42bf6926c2..4a6f22bafd 100644
--- a/test/rubygems/test_gem_spec_fetcher.rb
+++ b/test/rubygems/test_gem_spec_fetcher.rb
@@ -45,6 +45,8 @@ class TestGemSpecFetcher < RubyGemTestCase
util_zip(Marshal.dump(@a2))
@fetcher.data["#{@gem_repo}#{Gem::MARSHAL_SPEC_DIR}#{@a_pre.full_name}.gemspec.rz"] =
util_zip(Marshal.dump(@a_pre))
+ @fetcher.data["#{@gem_repo}#{Gem::MARSHAL_SPEC_DIR}#{@a3a.full_name}.gemspec.rz"] =
+ util_zip(Marshal.dump(@a3a))
dep = Gem::Dependency.new 'a', 1
specs_and_sources = @sf.fetch dep, true
@@ -273,7 +275,12 @@ RubyGems will revert to legacy indexes degrading performance.
assert_equal [@uri], specs.keys
- assert_equal @specs, specs[@uri].sort
+ assert_equal([["a", Gem::Version.new("1"), "ruby"],
+ ["a", Gem::Version.new("2"), "ruby"],
+ ["a_evil", Gem::Version.new("9"), "ruby"],
+ ["c", Gem::Version.new("1.2"), "ruby"],
+ ["pl", Gem::Version.new("1"), "i386-linux"]],
+ specs[@uri].sort)
end
def test_list_cache
@@ -307,7 +314,12 @@ RubyGems will revert to legacy indexes degrading performance.
specs = @sf.list true
- assert_equal [@specs], specs.values, 'specs file not loaded'
+ assert_equal([[["a", Gem::Version.new("1"), "ruby"],
+ ["a", Gem::Version.new("2"), "ruby"],
+ ["a_evil", Gem::Version.new("9"), "ruby"],
+ ["c", Gem::Version.new("1.2"), "ruby"],
+ ["pl", Gem::Version.new("1"), "i386-linux"]]],
+ specs.values, 'specs file not loaded')
end
def test_list_prerelease
@@ -320,8 +332,10 @@ RubyGems will revert to legacy indexes degrading performance.
specs = @sf.load_specs @uri, 'specs'
expected = [
+ ['a', Gem::Version.new('1.a'), Gem::Platform::RUBY],
['a', Gem::Version.new(1), Gem::Platform::RUBY],
['a', Gem::Version.new(2), Gem::Platform::RUBY],
+ ['a', Gem::Version.new('3.a'), Gem::Platform::RUBY],
['a_evil', Gem::Version.new(9), Gem::Platform::RUBY],
['c', Gem::Version.new('1.2'), Gem::Platform::RUBY],
['pl', Gem::Version.new(1), 'i386-linux'],
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 332e812791..fb5cf67461 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -566,7 +566,7 @@ end
'i386-mswin32_80' => 'a-1-x86-mswin32-80',
'i386-mingw32' => 'a-1-x86-mingw32'
}
-
+
test_cases.each do |arch, expected|
util_set_arch arch
@a1.platform = 'current'
diff --git a/test/rubygems/test_gem_version.rb b/test/rubygems/test_gem_version.rb
index dfd3845e42..f2b0280f3d 100644
--- a/test/rubygems/test_gem_version.rb
+++ b/test/rubygems/test_gem_version.rb
@@ -199,7 +199,7 @@ class TestGemVersion < RubyGemTestCase
refute Gem::Version.new('2.9').prerelease?
refute Gem::Version.new('22.1.50.0').prerelease?
end
-
+
def test_release
assert_equal Gem::Version.new('1.2.0'), Gem::Version.new('1.2.0.a').release
assert_equal Gem::Version.new('1.1'), Gem::Version.new('1.1.rc10').release
@@ -219,7 +219,7 @@ class TestGemVersion < RubyGemTestCase
assert_adequate( "1.4.5", "~> 1.4.4")
assert_inadequate("1.5", "~> 1.4.4")
assert_inadequate("2.0", "~> 1.4.4")
-
+
assert_inadequate("1.1.pre", "~> 1.0.0")
assert_adequate( "1.1.pre", "~> 1.1")
assert_inadequate("2.0.a", "~> 1.0")
diff --git a/test/socket/test_unix.rb b/test/socket/test_unix.rb
index e18f5d6e95..d8cf7139e9 100644
--- a/test/socket/test_unix.rb
+++ b/test/socket/test_unix.rb
@@ -43,7 +43,7 @@ class TestSocket_UNIXSocket < Test::Unit::TestCase
UNIXSocket.pair {|s1, s2|
begin
ret = s1.sendmsg("\0", 0, nil, [Socket::SOL_SOCKET, Socket::SCM_RIGHTS,
- send_io_ary.map {|io| io.fileno }.pack("i!*")])
+ send_io_ary.map {|io2| io2.fileno }.pack("i!*")])
rescue NotImplementedError
return
end
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 63647683ca..30284faee2 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -327,7 +327,7 @@ class TestStringIO < Test::Unit::TestCase
s = "1234"
f = StringIO.new(s, "r")
assert_nothing_raised { f.ungetc("x") }
- assert_equal("x", f.getc) # bug?
+ assert_equal("x", f.getc) # bug? -> it's a feature from 1.9.
assert_equal("1", f.getc)
s = "1234"
diff --git a/test/strscan/test_stringscanner.rb b/test/strscan/test_stringscanner.rb
index ec6c6994ce..f8b5836919 100644
--- a/test/strscan/test_stringscanner.rb
+++ b/test/strscan/test_stringscanner.rb
@@ -685,7 +685,7 @@ class TestStringScanner < Test::Unit::TestCase
s.scan(/ string/)
end
- def test_inspect
+ def test_inspect2
s = StringScanner.new('test string test')
s.scan(/test strin/)
assert_equal('#<StringScanner 10/16 "...strin" @ "g tes...">', s.inspect)
diff --git a/test/test_delegate.rb b/test/test_delegate.rb
index aecabe147d..dc12aa35f9 100644
--- a/test/test_delegate.rb
+++ b/test/test_delegate.rb
@@ -23,32 +23,107 @@ class TestDelegateClass < Test::Unit::TestCase
def test_delegateclass_class
myclass=Myclass.new([])
assert_equal(Myclass,myclass.class)
+ assert_equal(Myclass,myclass.dup.class,'[ruby-dev:40313]')
+ assert_equal(Myclass,myclass.clone.class,'[ruby-dev:40313]')
end
def test_simpledelegator_class
simple=SimpleDelegator.new([])
assert_equal(SimpleDelegator,simple.class)
+ assert_equal(SimpleDelegator,simple.dup.class)
+ assert_equal(SimpleDelegator,simple.clone.class)
end
class Object
def m
:o
end
+ private
+ def delegate_test_m
+ :o
+ end
end
class Foo
def m
:m
end
+ def delegate_test_m
+ :m
+ end
end
class Bar < DelegateClass(Foo)
end
def test_override
+ foo = Foo.new
+ foo2 = SimpleDelegator.new(foo)
+ bar = Bar.new(foo)
assert_equal(:o, Object.new.m)
- assert_equal(:m, Foo.new.m)
- assert_equal(:m, SimpleDelegator.new(Foo.new).m)
- assert_equal(:m, Bar.new(Foo.new).m)
+ assert_equal(:m, foo.m)
+ assert_equal(:m, foo2.m)
+ assert_equal(:m, bar.m)
+ bug = '[ruby-dev:39154]'
+ assert_equal(:m, foo2.send(:delegate_test_m), bug)
+ assert_equal(:m, bar.send(:delegate_test_m), bug)
+ end
+
+ class IV < DelegateClass(Integer)
+ attr_accessor :var
+
+ def initialize
+ @var = 1
+ super(0)
+ end
+ end
+
+ def test_marshal
+ bug1744 = '[ruby-core:24211]'
+ c = IV.new
+ assert_equal(1, c.var)
+ d = Marshal.load(Marshal.dump(c))
+ assert_equal(1, d.var, bug1744)
+ end
+
+ def test_copy_frozen
+ bug2679 = '[ruby-dev:40242]'
+ a = [42, :hello].freeze
+ d = SimpleDelegator.new(a)
+ assert_nothing_raised(bug2679) {d.dup[0] += 1}
+ assert_raise(RuntimeError) {d.clone[0] += 1}
+ d.freeze
+ assert(d.clone.frozen?)
+ assert(!d.dup.frozen?)
+ end
+
+ def test_frozen
+ d = SimpleDelegator.new([1, :foo])
+ d.freeze
+ assert_raise(RuntimeError, '[ruby-dev:40314]#1') {d.__setobj__("foo")}
+ assert_equal([1, :foo], d)
+ end
+
+ def test_instance_method
+ s = SimpleDelegator.new("foo")
+ m = s.method("upcase")
+ s.__setobj__([1,2,3])
+ assert_raise(NoMethodError, '[ruby-dev:40314]#3') {m.call}
+ end
+
+ class Foo
+ private
+ def delegate_test_private
+ :m
+ end
+ end
+
+ def test_private_method
+ foo = Foo.new
+ d = SimpleDelegator.new(foo)
+ assert_raise(NoMethodError) {foo.delegate_test_private}
+ assert_equal(:m, foo.send(:delegate_test_private))
+ assert_raise(NoMethodError, '[ruby-dev:40314]#4') {d.delegate_test_private}
+ assert_raise(NoMethodError, '[ruby-dev:40314]#5') {d.send(:delegate_test_private)}
end
end
diff --git a/test/test_find.rb b/test/test_find.rb
new file mode 100644
index 0000000000..677a7e14bb
--- /dev/null
+++ b/test/test_find.rb
@@ -0,0 +1,224 @@
+require 'test/unit'
+require 'find'
+require 'tmpdir'
+
+class TestFind < Test::Unit::TestCase
+ def test_empty
+ Dir.mktmpdir {|d|
+ a = []
+ Find.find(d) {|f| a << f }
+ assert_equal([d], a)
+ }
+ end
+
+ def test_rec
+ Dir.mktmpdir {|d|
+ File.open("#{d}/a", "w"){}
+ Dir.mkdir("#{d}/b")
+ File.open("#{d}/b/a", "w"){}
+ File.open("#{d}/b/b", "w"){}
+ Dir.mkdir("#{d}/c")
+ a = []
+ Find.find(d) {|f| a << f }
+ assert_equal([d, "#{d}/a", "#{d}/b", "#{d}/b/a", "#{d}/b/b", "#{d}/c"], a)
+ }
+ end
+
+ def test_relative
+ Dir.mktmpdir {|d|
+ File.open("#{d}/a", "w"){}
+ Dir.mkdir("#{d}/b")
+ File.open("#{d}/b/a", "w"){}
+ File.open("#{d}/b/b", "w"){}
+ Dir.mkdir("#{d}/c")
+ a = []
+ Dir.chdir(d) {
+ Find.find(".") {|f| a << f }
+ }
+ assert_equal([".", "./a", "./b", "./b/a", "./b/b", "./c"], a)
+ }
+ end
+
+ def test_dont_follow_symlink
+ Dir.mktmpdir {|d|
+ File.open("#{d}/a", "w"){}
+ Dir.mkdir("#{d}/b")
+ File.open("#{d}/b/a", "w"){}
+ File.open("#{d}/b/b", "w"){}
+ begin
+ File.symlink("#{d}/b", "#{d}/c")
+ rescue NotImplementedError
+ skip "symlink is not supported."
+ end
+ a = []
+ Find.find(d) {|f| a << f }
+ assert_equal([d, "#{d}/a", "#{d}/b", "#{d}/b/a", "#{d}/b/b", "#{d}/c"], a)
+ }
+ end
+
+ def test_prune
+ Dir.mktmpdir {|d|
+ File.open("#{d}/a", "w"){}
+ Dir.mkdir("#{d}/b")
+ File.open("#{d}/b/a", "w"){}
+ File.open("#{d}/b/b", "w"){}
+ Dir.mkdir("#{d}/c")
+ a = []
+ Find.find(d) {|f|
+ a << f
+ Find.prune if f == "#{d}/b"
+ }
+ assert_equal([d, "#{d}/a", "#{d}/b", "#{d}/c"], a)
+ }
+ end
+
+ def test_countup3
+ Dir.mktmpdir {|d|
+ 1.upto(3) {|n| File.open("#{d}/#{n}", "w"){} }
+ a = []
+ Find.find(d) {|f| a << f }
+ assert_equal([d, "#{d}/1", "#{d}/2", "#{d}/3"], a)
+ }
+ end
+
+ def test_countdown3
+ Dir.mktmpdir {|d|
+ 3.downto(1) {|n| File.open("#{d}/#{n}", "w"){} }
+ a = []
+ Find.find(d) {|f| a << f }
+ assert_equal([d, "#{d}/1", "#{d}/2", "#{d}/3"], a)
+ }
+ end
+
+ def test_unreadable_dir
+ Dir.mktmpdir {|d|
+ Dir.mkdir(dir = "#{d}/dir")
+ File.open(file = "#{dir}/foo", "w"){}
+ begin
+ File.chmod(0300, dir)
+ a = []
+ Find.find(d) {|f| a << f }
+ assert_equal([d, dir], a)
+ ensure
+ File.chmod(0700, dir)
+ end
+ }
+ end
+
+ def test_unsearchable_dir
+ Dir.mktmpdir {|d|
+ Dir.mkdir(dir = "#{d}/dir")
+ File.open(file = "#{dir}/foo", "w"){}
+ begin
+ File.chmod(0600, dir)
+ a = []
+ Find.find(d) {|f| a << f }
+ assert_equal([d, dir, file], a)
+ assert_raise(Errno::EACCES) { File.lstat(file) }
+ ensure
+ File.chmod(0700, dir)
+ end
+ }
+ end
+
+ def test_dangling_symlink
+ Dir.mktmpdir {|d|
+ begin
+ File.symlink("foo", "#{d}/bar")
+ rescue NotImplementedError
+ skip "symlink is not supported."
+ end
+ a = []
+ Find.find(d) {|f| a << f }
+ assert_equal([d, "#{d}/bar"], a)
+ assert_raise(Errno::ENOENT) { File.stat("#{d}/bar") }
+ }
+ end
+
+ def test_dangling_symlink_stat_error
+ Dir.mktmpdir {|d|
+ begin
+ File.symlink("foo", "#{d}/bar")
+ rescue NotImplementedError
+ skip "symlink is not supported."
+ end
+ assert_raise(Errno::ENOENT) {
+ Find.find(d) {|f| File.stat(f) }
+ }
+ }
+ end
+
+ def test_change_dir_to_file
+ Dir.mktmpdir {|d|
+ Dir.mkdir(dir_1 = "#{d}/d1")
+ File.open(file_a = "#{dir_1}/a", "w"){}
+ File.open(file_b = "#{dir_1}/b", "w"){}
+ File.open(file_c = "#{dir_1}/c", "w"){}
+ Dir.mkdir(dir_d = "#{dir_1}/d")
+ File.open(file_de = "#{dir_d}/e", "w"){}
+ dir_2 = "#{d}/d2"
+ a = []
+ Find.find(d) {|f|
+ a << f
+ if f == file_b
+ File.rename(dir_1, dir_2)
+ File.open(dir_1, "w") {}
+ end
+ }
+ assert_equal([d, dir_1, file_a, file_b, file_c, dir_d], a)
+ }
+ end
+
+ def test_change_dir_to_symlink_loop
+ Dir.mktmpdir {|d|
+ Dir.mkdir(dir_1 = "#{d}/d1")
+ File.open(file_a = "#{dir_1}/a", "w"){}
+ File.open(file_b = "#{dir_1}/b", "w"){}
+ File.open(file_c = "#{dir_1}/c", "w"){}
+ Dir.mkdir(dir_d = "#{dir_1}/d")
+ File.open(file_de = "#{dir_d}/e", "w"){}
+ dir_2 = "#{d}/d2"
+ a = []
+ Find.find(d) {|f|
+ a << f
+ if f == file_b
+ File.rename(dir_1, dir_2)
+ begin
+ File.symlink("d1", dir_1)
+ rescue NotImplementedError
+ skip "symlink is not supported."
+ end
+ end
+ }
+ assert_equal([d, dir_1, file_a, file_b, file_c, dir_d], a)
+ }
+ end
+
+ def test_enumerator
+ Dir.mktmpdir {|d|
+ File.open("#{d}/a", "w"){}
+ Dir.mkdir("#{d}/b")
+ File.open("#{d}/b/a", "w"){}
+ File.open("#{d}/b/b", "w"){}
+ Dir.mkdir("#{d}/c")
+ e = Find.find(d)
+ a = []
+ e.each {|f| a << f }
+ assert_equal([d, "#{d}/a", "#{d}/b", "#{d}/b/a", "#{d}/b/b", "#{d}/c"], a)
+ }
+ end
+
+ class TestInclude < Test::Unit::TestCase
+ include Find
+
+ def test_functional_call
+ Dir.mktmpdir {|d|
+ File.open("#{d}/a", "w"){}
+ a = []
+ find(d) {|f| a << f }
+ assert_equal([d, "#{d}/a"], a)
+ }
+ end
+ end
+
+end
diff --git a/test/test_ipaddr.rb b/test/test_ipaddr.rb
index 604ce93caa..dd4b4af348 100644
--- a/test/test_ipaddr.rb
+++ b/test/test_ipaddr.rb
@@ -1,4 +1,3 @@
-require 'pathname'
-require Pathname.new(__FILE__).dirname.join('inlinetest.rb')
+require_relative 'inlinetest.rb'
target = __FILE__[/test_(.*\.rb)$/, 1]
InlineTest.loadtest__END__part(target)
diff --git a/test/test_mathn.rb b/test/test_mathn.rb
new file mode 100644
index 0000000000..7083568525
--- /dev/null
+++ b/test/test_mathn.rb
@@ -0,0 +1,10 @@
+require 'test/unit'
+require_relative 'ruby/envutil'
+
+# mathn redefines too much. It must be isolated to child processes.
+class TestMathn < Test::Unit::TestCase
+ def test_power
+ assert_in_out_err ['-r', 'mathn', '-e', '1**2'], "", [], [], '[ruby-core:25740]'
+ assert_in_out_err ['-r', 'mathn', '-e', '(1<<126)**2'], "", [], [], '[ruby-core:25740]'
+ end
+end
diff --git a/test/test_open3.rb b/test/test_open3.rb
index 8f355ccb76..406f39b50d 100644
--- a/test/test_open3.rb
+++ b/test/test_open3.rb
@@ -190,8 +190,8 @@ class TestOpen3 < Test::Unit::TestCase
ts.each {|t| assert_kind_of(Thread, t) }
i.print str
i.close
- ts.each_with_index {|t, i|
- assert_equal(str[i] == ?t, t.value.success?)
+ ts.each_with_index {|t, ii|
+ assert_equal(str[ii] == ?t, t.value.success?)
}
}
end
diff --git a/test/test_prime.rb b/test/test_prime.rb
index b4962bafcf..e095a29722 100644
--- a/test/test_prime.rb
+++ b/test/test_prime.rb
@@ -107,7 +107,7 @@ class TestPrime < Test::Unit::TestCase
def test_from_prime_division
assert_equal PRIMES.inject(&:*), Integer.from_prime_division(PRIMES.map{|p| [p,1]})
- assert_equal -PRIMES.inject(&:*), Integer.from_prime_division([[-1, 1]] + PRIMES.map{|p| [p,1]})
+ assert_equal(-PRIMES.inject(&:*), Integer.from_prime_division([[-1, 1]] + PRIMES.map{|p| [p,1]}))
end
def test_prime?
@@ -124,11 +124,11 @@ class TestPrime < Test::Unit::TestCase
assert !9.prime?
# mersenne numbers
- assert (2**31-1).prime?
+ assert((2**31-1).prime?)
assert !(2**32-1).prime?
# fermat numbers
- assert (2**(2**4)+1).prime?
+ assert((2**(2**4)+1).prime?)
assert !(2**(2**5)+1).prime? # Euler!
# large composite
@@ -139,8 +139,8 @@ class TestPrime < Test::Unit::TestCase
# negative
assert !-1.prime?
- assert -2.prime?
- assert -3.prime?
+ assert(-2.prime?)
+ assert(-3.prime?)
assert !-4.prime?
end
end
diff --git a/test/test_set.rb b/test/test_set.rb
index 604ce93caa..dd4b4af348 100644
--- a/test/test_set.rb
+++ b/test/test_set.rb
@@ -1,4 +1,3 @@
-require 'pathname'
-require Pathname.new(__FILE__).dirname.join('inlinetest.rb')
+require_relative 'inlinetest.rb'
target = __FILE__[/test_(.*\.rb)$/, 1]
InlineTest.loadtest__END__part(target)
diff --git a/test/test_time.rb b/test/test_time.rb
index 2a22c6069f..7cb75ab6c8 100644
--- a/test/test_time.rb
+++ b/test/test_time.rb
@@ -188,6 +188,15 @@ class TestTimeExtension < Test::Unit::TestCase # :nodoc:
end
assert_equal(249, Time.xmlschema("2008-06-05T23:49:23.000249+09:00").usec)
+
+ assert_equal("10000-01-01T00:00:00Z", Time.utc(10000).xmlschema)
+ assert_equal("9999-01-01T00:00:00Z", Time.utc(9999).xmlschema)
+ assert_equal("0001-01-01T00:00:00Z", Time.utc(1).xmlschema) # 1 AD
+ assert_equal("0000-01-01T00:00:00Z", Time.utc(0).xmlschema) # 1 BC
+ assert_equal("-0001-01-01T00:00:00Z", Time.utc(-1).xmlschema) # 2 BC
+ assert_equal("-0004-01-01T00:00:00Z", Time.utc(-4).xmlschema) # 5 BC
+ assert_equal("-9999-01-01T00:00:00Z", Time.utc(-9999).xmlschema)
+ assert_equal("-10000-01-01T00:00:00Z", Time.utc(-10000).xmlschema)
end
def test_completion
diff --git a/test/uri/test_ldap.rb b/test/uri/test_ldap.rb
index 14ef39242e..c96a067804 100644
--- a/test/uri/test_ldap.rb
+++ b/test/uri/test_ldap.rb
@@ -81,8 +81,8 @@ class TestLDAP < Test::Unit::TestCase
['ldap', nil, URI::LDAP::DEFAULT_PORT,
'',
nil, 'sub', nil, '!bindname=cn=Manager%2co=Foo'],
- }.each do |url, ary|
- u = URI.parse(url)
+ }.each do |url2, ary|
+ u = URI.parse(url2)
assert_equal(ary, uri_to_ary(u))
end
end
diff --git a/test/webrick/test_cgi.rb b/test/webrick/test_cgi.rb
index ff83919902..4bfb3df388 100644
--- a/test/webrick/test_cgi.rb
+++ b/test/webrick/test_cgi.rb
@@ -1,5 +1,5 @@
+require_relative "utils"
require "webrick"
-require File.join(File.dirname(__FILE__), "utils.rb")
require "test/unit"
class TestWEBrickCGI < Test::Unit::TestCase
@@ -98,4 +98,36 @@ class TestWEBrickCGI < Test::Unit::TestCase
end
}
end
+
+ CtrlSeq = [0x7f, *(1..31)].pack("C*").gsub(/\s+/, '')
+ CtrlPat = /#{Regexp.quote(CtrlSeq)}/o
+ DumpPat = /#{Regexp.quote(CtrlSeq.dump[1...-1])}/o
+
+ def test_bad_uri
+ start_cgi_server{|server, addr, port, log|
+ res = TCPSocket.open(addr, port) {|sock|
+ sock << "GET /#{CtrlSeq}#{CRLF}#{CRLF}"
+ sock.close_write
+ sock.read
+ }
+ assert_match(%r{\AHTTP/\d.\d 400 Bad Request}, res)
+ s = log.call.each_line.grep(/ERROR bad URI/)[0]
+ assert_match(DumpPat, s)
+ assert_not_match(CtrlPat, s)
+ }
+ end
+
+ def test_bad_header
+ start_cgi_server{|server, addr, port, log|
+ res = TCPSocket.open(addr, port) {|sock|
+ sock << "GET / HTTP/1.0#{CRLF}#{CtrlSeq}#{CRLF}#{CRLF}"
+ sock.close_write
+ sock.read
+ }
+ assert_match(%r{\AHTTP/\d.\d 400 Bad Request}, res)
+ s = log.call.each_line.grep(/ERROR bad header/)[0]
+ assert_match(DumpPat, s)
+ assert_not_match(CtrlPat, s)
+ }
+ end
end
diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index 712ff7b1cd..9dfd9c28ff 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -1,7 +1,7 @@
require "test/unit"
+require_relative "utils.rb"
require "webrick"
require "stringio"
-require File.join(File.dirname(__FILE__), "utils.rb")
class WEBrick::TestFileHandler < Test::Unit::TestCase
def default_file_handler(filename)
@@ -75,6 +75,11 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
def test_filehandler
config = { :DocumentRoot => File.dirname(__FILE__), }
this_file = File.basename(__FILE__)
+ filesize = File.size(__FILE__)
+ this_data = File.open(__FILE__, "rb") {|f| f.read}
+ range = nil
+ bug2593 = '[ruby-dev:40030]'
+
TestWEBrick.start_httpserver(config) do |server, addr, port, log|
http = Net::HTTP.new(addr, port)
req = Net::HTTP::Get.new("/")
@@ -89,6 +94,67 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
assert_equal("text/plain", res.content_type, log.call)
assert_equal(File.read(__FILE__), res.body, log.call)
}
+
+ req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=#{filesize-100}-")
+ http.request(req){|res|
+ assert_equal("206", res.code, log.call)
+ assert_equal("text/plain", res.content_type, log.call)
+ assert_nothing_raised(bug2593) {range = res.content_range}
+ assert_equal((filesize-100)..(filesize-1), range, log.call)
+ assert_equal(this_data[-100..-1], res.body, log.call)
+ }
+
+ req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=-100")
+ http.request(req){|res|
+ assert_equal("206", res.code, log.call)
+ assert_equal("text/plain", res.content_type, log.call)
+ assert_nothing_raised(bug2593) {range = res.content_range}
+ assert_equal((filesize-100)..(filesize-1), range, log.call)
+ assert_equal(this_data[-100..-1], res.body, log.call)
+ }
+
+ req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=0-99")
+ http.request(req){|res|
+ assert_equal("206", res.code, log.call)
+ assert_equal("text/plain", res.content_type, log.call)
+ assert_nothing_raised(bug2593) {range = res.content_range}
+ assert_equal(0..99, range, log.call)
+ assert_equal(this_data[0..99], res.body, log.call)
+ }
+
+ req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=100-199")
+ http.request(req){|res|
+ assert_equal("206", res.code, log.call)
+ assert_equal("text/plain", res.content_type, log.call)
+ assert_nothing_raised(bug2593) {range = res.content_range}
+ assert_equal(100..199, range, log.call)
+ assert_equal(this_data[100..199], res.body, log.call)
+ }
+
+ req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=0-0")
+ http.request(req){|res|
+ assert_equal("206", res.code, log.call)
+ assert_equal("text/plain", res.content_type, log.call)
+ assert_nothing_raised(bug2593) {range = res.content_range}
+ assert_equal(0..0, range, log.call)
+ assert_equal(this_data[0..0], res.body, log.call)
+ }
+
+ req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=-1")
+ http.request(req){|res|
+ assert_equal("206", res.code, log.call)
+ assert_equal("text/plain", res.content_type, log.call)
+ assert_nothing_raised(bug2593) {range = res.content_range}
+ assert_equal((filesize-1)..(filesize-1), range, log.call)
+ assert_equal(this_data[-1, 1], res.body, log.call)
+ }
+
+ req = Net::HTTP::Get.new("/#{this_file}", "range"=>"bytes=0-0, -2")
+ http.request(req){|res|
+ assert_equal("206", res.code, log.call)
+ assert_equal("multipart/byteranges", res.content_type, log.call)
+ }
+
end
end
diff --git a/test/webrick/test_httpauth.rb b/test/webrick/test_httpauth.rb
index 56f96235f1..a6066908c1 100644
--- a/test/webrick/test_httpauth.rb
+++ b/test/webrick/test_httpauth.rb
@@ -3,7 +3,7 @@ require "net/http"
require "tempfile"
require "webrick"
require "webrick/httpauth/basicauth"
-require File.join(File.dirname(__FILE__), "utils.rb")
+require_relative "utils"
class TestWEBrickHTTPAuth < Test::Unit::TestCase
def test_basic_auth
diff --git a/test/webrick/test_httpproxy.rb b/test/webrick/test_httpproxy.rb
index ab82ed8cd7..d37fd70a7a 100644
--- a/test/webrick/test_httpproxy.rb
+++ b/test/webrick/test_httpproxy.rb
@@ -254,8 +254,8 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase
:SSLPrivateKey => key,
}
TestWEBrick.start_httpserver(s_config){|s_server, s_addr, s_port, s_log|
- s_server.mount_proc("/"){|req, res|
- res.body = "SSL #{req.request_method} #{req.path} #{req.body}"
+ s_server.mount_proc("/"){|req2, res|
+ res.body = "SSL #{req2.request_method} #{req2.path} #{req2.body}"
}
http = Net::HTTP.new("127.0.0.1", s_port, addr, port, up_log.call + log.call + s_log.call)
http.use_ssl = true
@@ -263,14 +263,14 @@ class TestWEBrickHTTPProxy < Test::Unit::TestCase
store_ctx.current_cert.to_der == cert.to_der
end
- req = Net::HTTP::Get.new("/")
- http.request(req){|res|
+ req2 = Net::HTTP::Get.new("/")
+ http.request(req2){|res|
assert_equal("SSL GET / ", res.body, up_log.call + log.call + s_log.call)
}
- req = Net::HTTP::Post.new("/")
- req.body = "post-data"
- http.request(req){|res|
+ req2 = Net::HTTP::Post.new("/")
+ req2.body = "post-data"
+ http.request(req2){|res|
assert_equal("SSL POST / post-data", res.body, up_log.call + log.call + s_log.call)
}
}
diff --git a/test/webrick/test_httpserver.rb b/test/webrick/test_httpserver.rb
index 6b0c419ad7..e0c2ae33ad 100644
--- a/test/webrick/test_httpserver.rb
+++ b/test/webrick/test_httpserver.rb
@@ -1,7 +1,7 @@
require "test/unit"
require "net/http"
require "webrick"
-require File.join(File.dirname(__FILE__), "utils.rb")
+require_relative "utils"
class TestWEBrickHTTPServer < Test::Unit::TestCase
def test_mount
diff --git a/test/webrick/test_server.rb b/test/webrick/test_server.rb
index 4c064fdb4b..b688d52018 100644
--- a/test/webrick/test_server.rb
+++ b/test/webrick/test_server.rb
@@ -1,7 +1,7 @@
require "test/unit"
require "tempfile"
require "webrick"
-require File.join(File.dirname(__FILE__), "utils.rb")
+require_relative "utils"
class TestWEBrickServer < Test::Unit::TestCase
class Echo < WEBrick::GenericServer
@@ -46,19 +46,13 @@ class TestWEBrickServer < Test::Unit::TestCase
def test_daemon
begin
- r, w = IO.pipe
- Process.fork{
- r.close
+ pid = Process.fork{
WEBrick::Daemon.start
- w.puts(Process.pid)
sleep
}
- assert(Process.kill(:KILL, r.gets.to_i))
+ assert(Process.kill(:KILL, pid))
rescue NotImplementedError
# snip this test
- ensure
- r.close
- w.close
end
end
end
diff --git a/test/win32ole/test_win32ole_param.rb b/test/win32ole/test_win32ole_param.rb
index 3b831c3937..1a4eeff301 100644
--- a/test/win32ole/test_win32ole_param.rb
+++ b/test/win32ole/test_win32ole_param.rb
@@ -33,9 +33,24 @@ if defined?(WIN32OLE_PARAM)
assert_raise(ArgumentError) {
WIN32OLE_PARAM.new("hoge")
}
+ ole_type = WIN32OLE_TYPE.new("Microsoft Scripting Runtime", "FileSystemObject")
+ m_copyfile = WIN32OLE_METHOD.new(ole_type, "CopyFile")
+ assert_raise(IndexError) {
+ WIN32OLE_PARAM.new(m_copyfile, 4);
+ }
+ assert_raise(IndexError) {
+ WIN32OLE_PARAM.new(m_copyfile, 0);
+ }
+ assert_raise(IndexError) {
+ WIN32OLE_PARAM.new(m_copyfile, 0);
+ }
+ param = WIN32OLE_PARAM.new(m_copyfile, 3)
+ assert_equal("OverWriteFiles", param.name)
+ assert_equal(WIN32OLE_PARAM, param.class)
+ assert_equal(true, param.default)
+ assert_equal("#<WIN32OLE_PARAM:OverWriteFiles=true>", param.inspect)
end
-
def test_name
assert_equal('URL', @param_url.name)
assert_equal('Flags', @param_flags.name)
diff --git a/test/xmlrpc/test_cookie.rb b/test/xmlrpc/test_cookie.rb
index c1be5c5577..472027e3af 100644
--- a/test/xmlrpc/test_cookie.rb
+++ b/test/xmlrpc/test_cookie.rb
@@ -1,7 +1,7 @@
require 'test/unit'
require 'time'
require 'webrick'
-require File.join(File.dirname(__FILE__), 'webrick_testing')
+require_relative 'webrick_testing'
require "xmlrpc/server"
require 'xmlrpc/client'
diff --git a/test/xmlrpc/test_webrick_server.rb b/test/xmlrpc/test_webrick_server.rb
index 47fa5487c3..8a37cdec91 100644
--- a/test/xmlrpc/test_webrick_server.rb
+++ b/test/xmlrpc/test_webrick_server.rb
@@ -1,6 +1,6 @@
require 'test/unit'
require 'webrick'
-require File.join(File.dirname(__FILE__), 'webrick_testing')
+require_relative 'webrick_testing'
require "xmlrpc/server"
require 'xmlrpc/client'
@@ -88,11 +88,11 @@ class Test_Webrick < Test::Unit::TestCase
# default handler (missing handler)
ok, param = @s.call2('test.nonexisting')
assert_equal false, ok
- assert_equal -99, param.faultCode
+ assert_equal(-99, param.faultCode)
# default handler (wrong number of arguments)
ok, param = @s.call2('test.add', 1, 2, 3)
assert_equal false, ok
- assert_equal -99, param.faultCode
+ assert_equal(-99, param.faultCode)
end
end
diff --git a/test/xmlrpc/webrick_testing.rb b/test/xmlrpc/webrick_testing.rb
index 05c334045e..4c0cf89f1a 100644
--- a/test/xmlrpc/webrick_testing.rb
+++ b/test/xmlrpc/webrick_testing.rb
@@ -7,7 +7,7 @@ module WEBrick_Testing
end
def start_server(config={})
- raise "already started" if @__server
+ raise "already started" if defined?(@__server) && @__server
@__started = false
@__server_thread = Thread.new {
diff --git a/test/yaml/test_array.rb b/test/yaml/test_array.rb
new file mode 100644
index 0000000000..95ff94b959
--- /dev/null
+++ b/test/yaml/test_array.rb
@@ -0,0 +1,18 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestArray < Test::Unit::TestCase
+ def setup
+ @list = [{ :a => 'b' }, 'foo']
+ end
+
+ def test_to_yaml
+ assert_equal @list, YAML.load(@list.to_yaml)
+ end
+
+ def test_dump
+ assert_equal @list, YAML.load(YAML.dump(@list))
+ end
+ end
+end
diff --git a/test/yaml/test_boolean.rb b/test/yaml/test_boolean.rb
new file mode 100644
index 0000000000..1c75c3a390
--- /dev/null
+++ b/test/yaml/test_boolean.rb
@@ -0,0 +1,37 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ ###
+ # Test booleans from YAML spec:
+ # http://yaml.org/type/bool.html
+ class TestBoolean < Test::Unit::TestCase
+ %w{ yes Yes YES true True TRUE on On ON }.each do |truth|
+ define_method(:"test_#{truth}") do
+ assert_equal true, YAML.load("--- #{truth}")
+ end
+ end
+
+ %w{ no No NO false False FALSE off Off OFF }.each do |truth|
+ define_method(:"test_#{truth}") do
+ assert_equal false, YAML.load("--- #{truth}")
+ end
+ end
+
+ ###
+ # YAML spec says "y" and "Y" may be used as true, but Syck treats them
+ # as literal strings
+ def test_y
+ assert_equal "y", YAML.load("--- y")
+ assert_equal "Y", YAML.load("--- Y")
+ end
+
+ ###
+ # YAML spec says "n" and "N" may be used as false, but Syck treats them
+ # as literal strings
+ def test_n
+ assert_equal "n", YAML.load("--- n")
+ assert_equal "N", YAML.load("--- N")
+ end
+ end
+end
diff --git a/test/yaml/test_class.rb b/test/yaml/test_class.rb
new file mode 100644
index 0000000000..9ea9db3096
--- /dev/null
+++ b/test/yaml/test_class.rb
@@ -0,0 +1,18 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestClass < Test::Unit::TestCase
+ def test_to_yaml
+ assert_raises(::TypeError) do
+ TestClass.to_yaml
+ end
+ end
+
+ def test_dump
+ assert_raises(::TypeError) do
+ YAML.dump TestClass
+ end
+ end
+ end
+end
diff --git a/test/yaml/test_exception.rb b/test/yaml/test_exception.rb
new file mode 100644
index 0000000000..f9354ffe2b
--- /dev/null
+++ b/test/yaml/test_exception.rb
@@ -0,0 +1,46 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestException < Test::Unit::TestCase
+ class Wups < Exception
+ attr_reader :foo, :bar
+ def initialize *args
+ super
+ @foo = 1
+ @bar = 2
+ end
+ end
+
+ def setup
+ @wups = Wups.new
+ end
+
+ def test_to_yaml
+ w = YAML.load(@wups.to_yaml)
+ assert_equal @wups, w
+ assert_equal 1, w.foo
+ assert_equal 2, w.bar
+ end
+
+ def test_dump
+ w = YAML.load(@wups.to_yaml)
+ assert_equal @wups, w
+ assert_equal 1, w.foo
+ assert_equal 2, w.bar
+ end
+
+ def test_to_yaml_properties
+ class << @wups
+ def to_yaml_properties
+ [:@foo]
+ end
+ end
+
+ w = YAML.load(YAML.dump(@wups))
+ assert_equal @wups, w
+ assert_equal 1, w.foo
+ assert_nil w.bar
+ end
+ end
+end
diff --git a/test/yaml/test_hash.rb b/test/yaml/test_hash.rb
new file mode 100644
index 0000000000..afcdcaca7b
--- /dev/null
+++ b/test/yaml/test_hash.rb
@@ -0,0 +1,18 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestHash < Test::Unit::TestCase
+ def setup
+ @hash = { :a => 'b' }
+ end
+
+ def test_to_yaml
+ assert_equal @hash, YAML.load(@hash.to_yaml)
+ end
+
+ def test_dump
+ assert_equal @hash, YAML.load(YAML.dump(@hash))
+ end
+ end
+end
diff --git a/test/yaml/test_null.rb b/test/yaml/test_null.rb
new file mode 100644
index 0000000000..e6b29550e4
--- /dev/null
+++ b/test/yaml/test_null.rb
@@ -0,0 +1,20 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ ###
+ # Test null from YAML spec:
+ # http://yaml.org/type/null.html
+ class TestNull < Test::Unit::TestCase
+ def test_null_list
+ assert_equal [nil] * 5, YAML.load(<<-eoyml)
+---
+- ~
+- null
+-
+- Null
+- NULL
+ eoyml
+ end
+ end
+end
diff --git a/test/yaml/test_omap.rb b/test/yaml/test_omap.rb
new file mode 100644
index 0000000000..d1d30e9e93
--- /dev/null
+++ b/test/yaml/test_omap.rb
@@ -0,0 +1,56 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestOmap < Test::Unit::TestCase
+ def test_keys
+ map = YAML::Omap.new
+ map['foo'] = 'bar'
+ assert_equal 'bar', map['foo']
+ end
+
+ def test_order
+ map = YAML::Omap.new
+ map['a'] = 'b'
+ map['b'] = 'c'
+ assert_equal [%w{a b}, %w{b c}], map.to_a
+ end
+
+ def test_square
+ list = [["a", "b"], ["b", "c"]]
+ map = YAML::Omap[*list.flatten]
+ assert_equal list, map.to_a
+ assert_equal 'b', map['a']
+ assert_equal 'c', map['b']
+ end
+
+ def test_to_yaml
+ map = YAML::Omap['a', 'b', 'c', 'd']
+ yaml = map.to_yaml
+ assert_match('!omap', yaml)
+ assert_match('- a: b', yaml)
+ assert_match('- c: d', yaml)
+ end
+
+ def test_round_trip
+ list = [["a", "b"], ["b", "c"]]
+ map = YAML::Omap[*list.flatten]
+ loaded = YAML.load(YAML.dump(map))
+
+ assert_equal map, loaded
+ assert_equal list, loaded.to_a
+ end
+
+ ###
+ # FIXME: Syck should also support !!omap as shorthand
+ def test_load
+ list = [["a", "b"], ["c", "d"]]
+ map = YAML.load(<<-eoyml)
+--- !omap
+- a: b
+- c: d
+ eoyml
+ assert_equal list, map.to_a
+ end
+ end
+end
diff --git a/test/yaml/test_set.rb b/test/yaml/test_set.rb
new file mode 100644
index 0000000000..a3368769d1
--- /dev/null
+++ b/test/yaml/test_set.rb
@@ -0,0 +1,31 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestSet < Test::Unit::TestCase
+ def setup
+ @set = YAML::Set.new
+ @set['foo'] = 'bar'
+ @set['bar'] = 'baz'
+ end
+
+ def test_to_yaml
+ assert_match(/!set/, @set.to_yaml)
+ end
+
+ def test_roundtrip
+ assert_equal(@set, YAML.load(YAML.dump(@set)))
+ end
+
+ ###
+ # FIXME: Syck should also support !!set as shorthand
+ def test_load_from_yaml
+ loaded = YAML.load(<<-eoyml)
+--- !set
+foo: bar
+bar: baz
+ eoyml
+ assert_equal(@set, loaded)
+ end
+ end
+end
diff --git a/test/yaml/test_string.rb b/test/yaml/test_string.rb
new file mode 100644
index 0000000000..26229a62f5
--- /dev/null
+++ b/test/yaml/test_string.rb
@@ -0,0 +1,45 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestString < Test::Unit::TestCase
+ def test_binary_string_null
+ string = "\x00"
+ yml = YAML.dump string
+ assert_match(/binary/, yml)
+ assert_equal string, YAML.load(yml)
+ end
+
+ def test_binary_string
+ string = binary_string
+ yml = YAML.dump string
+ assert_match(/binary/, yml)
+ assert_equal string, YAML.load(yml)
+ end
+
+ def test_non_binary_string
+ string = binary_string(0.29)
+ yml = YAML.dump string
+ refute_match(/binary/, yml)
+ assert_equal string, YAML.load(yml)
+ end
+
+ def test_string_with_ivars
+ food = "is delicious"
+ ivar = "on rock and roll"
+ food.instance_variable_set(:@we_built_this_city, ivar)
+
+ str = YAML.load YAML.dump food
+ assert_equal ivar, food.instance_variable_get(:@we_built_this_city)
+ end
+
+ def binary_string percentage = 0.31, length = 100
+ string = ''
+ (percentage * length).to_i.times do |i|
+ string << "\b"
+ end
+ string << 'a' * (length - string.length)
+ string
+ end
+ end
+end
diff --git a/test/yaml/test_struct.rb b/test/yaml/test_struct.rb
new file mode 100644
index 0000000000..b5f944c788
--- /dev/null
+++ b/test/yaml/test_struct.rb
@@ -0,0 +1,33 @@
+require 'test/unit'
+require 'yaml'
+
+class StructWithIvar < Struct.new(:foo)
+ attr_reader :bar
+ def initialize *args
+ super
+ @bar = 'hello'
+ end
+end
+
+module YAML
+ class TestStruct < MiniTest::Unit::TestCase
+ def test_roundtrip
+ thing = StructWithIvar.new('bar')
+ struct = YAML.load(YAML.dump(thing))
+
+ assert_equal 'hello', struct.bar
+ assert_equal 'bar', struct.foo
+ end
+
+ def test_load
+ obj = YAML.load(<<-eoyml)
+--- !ruby/struct:StructWithIvar
+foo: bar
+@bar: hello
+ eoyml
+
+ assert_equal 'hello', obj.bar
+ assert_equal 'bar', obj.foo
+ end
+ end
+end
diff --git a/test/yaml/test_symbol.rb b/test/yaml/test_symbol.rb
new file mode 100644
index 0000000000..c5358aa19d
--- /dev/null
+++ b/test/yaml/test_symbol.rb
@@ -0,0 +1,22 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestSymbol < Test::Unit::TestCase
+ def test_to_yaml
+ assert_equal :a, YAML.load(:a.to_yaml)
+ end
+
+ def test_dump
+ assert_equal :a, YAML.load(YAML.dump(:a))
+ end
+
+ def test_stringy
+ assert_equal :"1", YAML.load(YAML.dump(:"1"))
+ end
+
+ def test_load_quoted
+ assert_equal :"1", YAML.load("--- :'1'\n")
+ end
+ end
+end
diff --git a/test/yaml/test_yaml.rb b/test/yaml/test_yaml.rb
index 8c7aef3dcd..7274b602af 100644
--- a/test/yaml/test_yaml.rb
+++ b/test/yaml/test_yaml.rb
@@ -1082,27 +1082,27 @@ EOY
book_struct.new( "This should be the ISBN", "but I have another struct here", 2002, "None" )
) ], <<EOY
- !ruby/struct:BookStruct
- :author: Yukihiro Matsumoto
- :title: Ruby in a Nutshell
- :year: 2002
- :isbn: 0-596-00214-9
+ author: Yukihiro Matsumoto
+ title: Ruby in a Nutshell
+ year: 2002
+ isbn: 0-596-00214-9
- !ruby/struct:BookStruct
- :author:
+ author:
- Dave Thomas
- Andy Hunt
- :title: The Pickaxe
- :year: 2002
- :isbn: !ruby/struct:BookStruct
- :author: This should be the ISBN
- :title: but I have another struct here
- :year: 2002
- :isbn: None
+ title: The Pickaxe
+ year: 2002
+ isbn: !ruby/struct:BookStruct
+ author: This should be the ISBN
+ title: but I have another struct here
+ year: 2002
+ isbn: None
EOY
)
assert_to_yaml( YAML_Tests::StructTest.new( 123 ), <<EOY )
--- !ruby/struct:YAML_Tests::StructTest
-:c: 123
+c: 123
EOY
end
diff --git a/test/yaml/test_yaml_properties.rb b/test/yaml/test_yaml_properties.rb
new file mode 100644
index 0000000000..48bb878a01
--- /dev/null
+++ b/test/yaml/test_yaml_properties.rb
@@ -0,0 +1,64 @@
+require 'test/unit'
+require 'yaml'
+
+module YAML
+ class TestYamlProperties < Test::Unit::TestCase
+ class Foo
+ attr_reader :a, :b, :c
+ def initialize
+ @a = 1
+ @b = 2
+ @c = 3
+ end
+
+ def to_yaml_properties
+ [:@a, :@b]
+ end
+ end
+
+ def test_object_dump_yaml_properties
+ foo = YAML.load(YAML.dump(Foo.new))
+ assert_equal 1, foo.a
+ assert_equal 2, foo.b
+ assert_nil foo.c
+ end
+
+ class Bar < Struct.new(:foo, :bar)
+ attr_reader :baz
+ def initialize *args
+ super
+ @baz = 'hello'
+ end
+
+ def to_yaml_properties
+ []
+ end
+ end
+
+ def test_struct_dump_yaml_properties
+ bar = YAML.load(YAML.dump(Bar.new('a', 'b')))
+ assert_equal 'a', bar.foo
+ assert_equal 'b', bar.bar
+ assert_nil bar.baz
+ end
+
+ def test_string_dump
+ string = "okonomiyaki"
+ class << string
+ def to_yaml_properties
+ [:@tastes]
+ end
+ end
+
+ string.instance_variable_set(:@tastes, 'delicious')
+ v = YAML.load YAML.dump string
+ assert_equal 'delicious', v.instance_variable_get(:@tastes)
+ end
+
+ def test_string_load
+ str = YAML.load("--- !str \nstr: okonomiyaki\n:@tastes: delicious\n")
+ assert_equal 'okonomiyaki', str
+ assert_equal 'delicious', str.instance_variable_get(:@tastes)
+ end
+ end
+end
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index abb3ea32b3..1aaf3fac8c 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -535,7 +535,7 @@ if defined? Zlib
assert_equal("foobar".each_byte.to_a, a)
end
- def test_gets
+ def test_gets2
t = Tempfile.new("test_zlib_gzip_reader")
t.close
Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo\nbar\nbaz\n") }
@@ -662,6 +662,12 @@ if defined? Zlib
assert_equal(0x8a62c964, Zlib.adler32("abc\x01\x02\x03" * 10000))
end
+ def test_adler32_combine
+ one = Zlib.adler32("fo")
+ two = Zlib.adler32("o")
+ assert_equal(0x02820145, Zlib.adler32_combine(one, two, 1))
+ end
+
def test_crc32
assert_equal(0x00000000, Zlib.crc32)
assert_equal(0x8c736521, Zlib.crc32("foo"))
@@ -669,6 +675,12 @@ if defined? Zlib
assert_equal(0x07f0d68f, Zlib.crc32("abc\x01\x02\x03" * 10000))
end
+ def test_crc32_combine
+ one = Zlib.crc32("fo")
+ two = Zlib.crc32("o")
+ assert_equal(0x8c736521, Zlib.crc32_combine(one, two, 1))
+ end
+
def test_crc_table
t = Zlib.crc_table
assert_instance_of(Array, t)
diff --git a/thread.c b/thread.c
index 3fc4fabf51..8b2aee5b18 100644
--- a/thread.c
+++ b/thread.c
@@ -261,6 +261,17 @@ rb_thread_debug(
}
#endif
+void
+rb_thread_lock_unlock(rb_thread_lock_t *lock)
+{
+ native_mutex_unlock(lock);
+}
+
+void
+rb_thread_lock_destroy(rb_thread_lock_t *lock)
+{
+ native_mutex_destroy(lock);
+}
static void
set_unblock_function(rb_thread_t *th, rb_unblock_function_t *func, void *arg,
@@ -333,6 +344,7 @@ typedef struct rb_mutex_struct
} mutex_t;
static void rb_mutex_unlock_all(mutex_t *mutex, rb_thread_t *th);
+static void rb_mutex_abandon_all(mutex_t *mutexes);
void
rb_thread_terminate_all(void)
@@ -383,6 +395,15 @@ ruby_system_alone(void)
}
static void
+thread_unlock_all_locking_mutexes(rb_thread_t *th)
+{
+ if (th->keeping_mutexes) {
+ rb_mutex_unlock_all(th->keeping_mutexes, th);
+ th->keeping_mutexes = NULL;
+ }
+}
+
+static void
thread_cleanup_func_before_exec(void *th_ptr)
{
rb_thread_t *th = th_ptr;
@@ -398,11 +419,7 @@ thread_cleanup_func(void *th_ptr)
{
rb_thread_t *th = th_ptr;
- /* unlock all locking mutexes */
- if (th->keeping_mutexes) {
- rb_mutex_unlock_all(th->keeping_mutexes, th);
- th->keeping_mutexes = NULL;
- }
+ th->locking_mutex = Qfalse;
thread_cleanup_func_before_exec(th_ptr);
native_thread_destroy(th);
}
@@ -536,7 +553,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
th->stack = 0;
}
}
- thread_cleanup_func(th);
+ thread_unlock_all_locking_mutexes(th);
if (th != main_th) rb_check_deadlock(th->vm);
if (th->vm->main_thread == th) {
int signo = 0;
@@ -546,6 +563,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
if (signo) ruby_default_signal(signo);
}
else {
+ thread_cleanup_func(th);
native_mutex_unlock(&th->vm->global_vm_lock);
}
@@ -2606,7 +2624,7 @@ do_select(int n, fd_set *read, fd_set *write, fd_set *except,
wait_100ms.tv_usec = 100 * 1000; /* 100 ms */
do {
- wait = (timeout == 0 || cmp_tv(&wait_100ms, timeout) > 0) ? &wait_100ms : timeout;
+ wait = (timeout == 0 || cmp_tv(&wait_100ms, timeout) < 0) ? &wait_100ms : timeout;
BLOCKING_REGION({
do {
result = select(n, read, write, except, wait);
@@ -2616,16 +2634,16 @@ do_select(int n, fd_set *read, fd_set *write, fd_set *except,
if (read) *read = orig_read;
if (write) *write = orig_write;
if (except) *except = orig_except;
- wait = &wait_100ms;
if (timeout) {
struct timeval elapsed;
gettimeofday(&elapsed, NULL);
subtract_tv(&elapsed, &start_time);
+ gettimeofday(&start_time, NULL);
if (!subtract_tv(timeout, &elapsed)) {
finish = 1;
break;
}
- if (cmp_tv(&wait_100ms, timeout) < 0) wait = timeout;
+ if (cmp_tv(&wait_100ms, timeout) > 0) wait = timeout;
}
} while (__th->interrupt_flag == 0);
}, 0, 0);
@@ -2912,6 +2930,7 @@ rb_thread_atfork_internal(int (*atfork)(st_data_t, st_data_t, st_data_t))
VALUE thval = th->self;
vm->main_thread = th;
+ native_mutex_reinitialize_atfork(&th->vm->global_vm_lock);
st_foreach(vm->living_threads, atfork, (st_data_t)th);
st_clear(vm->living_threads);
st_insert(vm->living_threads, thval, (st_data_t)th->thread_id);
@@ -2927,6 +2946,10 @@ terminate_atfork_i(st_data_t key, st_data_t val, st_data_t current_th)
GetThreadPtr(thval, th);
if (th != (rb_thread_t *)current_th) {
+ if (th->keeping_mutexes) {
+ rb_mutex_abandon_all(th->keeping_mutexes);
+ }
+ th->keeping_mutexes = NULL;
thread_cleanup_func(th);
}
return ST_CONTINUE;
@@ -2936,6 +2959,7 @@ void
rb_thread_atfork(void)
{
rb_thread_atfork_internal(terminate_atfork_i);
+ GET_THREAD()->join_list_head = 0;
rb_reset_random_seed();
}
@@ -3349,7 +3373,7 @@ lock_interrupt(void *ptr)
/*
* call-seq:
- * mutex.lock => true or false
+ * mutex.lock => self
*
* Attempts to grab the lock and waits if it isn't available.
* Raises +ThreadError+ if +mutex+ was locked by the current thread.
@@ -3492,6 +3516,19 @@ rb_mutex_unlock_all(mutex_t *mutexes, rb_thread_t *th)
}
}
+static void
+rb_mutex_abandon_all(mutex_t *mutexes)
+{
+ mutex_t *mutex;
+
+ while (mutexes) {
+ mutex = mutexes;
+ mutexes = mutex->next_mutex;
+ mutex->th = 0;
+ mutex->next_mutex = 0;
+ }
+}
+
static VALUE
rb_mutex_sleep_forever(VALUE time)
{
diff --git a/thread_pthread.c b/thread_pthread.c
index 2fa8604403..542d7a1344 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -33,7 +33,7 @@ ruby_native_thread_lock(pthread_mutex_t *lock)
{
int r;
if ((r = pthread_mutex_lock(lock)) != 0) {
- rb_bug("pthread_mutex_lock: %d", r);
+ rb_bug_errno("pthread_mutex_lock", r);
}
}
@@ -42,7 +42,7 @@ ruby_native_thread_unlock(pthread_mutex_t *lock)
{
int r;
if ((r = pthread_mutex_unlock(lock)) != 0) {
- rb_bug("native_mutex_unlock return non-zero: %d", r);
+ rb_bug_errno("pthread_mutex_unlock", r);
}
}
@@ -55,7 +55,7 @@ native_mutex_trylock(pthread_mutex_t *lock)
return EBUSY;
}
else {
- rb_bug("native_mutex_trylock return non-zero: %d", r);
+ rb_bug_errno("pthread_mutex_trylock", r);
}
}
return 0;
@@ -66,16 +66,21 @@ ruby_native_thread_lock_initialize(pthread_mutex_t *lock)
{
int r = pthread_mutex_init(lock, 0);
if (r != 0) {
- rb_bug("native_mutex_initialize return non-zero: %d", r);
+ rb_bug_errno("pthread_mutex_init", r);
}
}
+#define native_mutex_reinitialize_atfork(lock) (\
+ native_mutex_unlock(lock), \
+ native_mutex_initialize(lock), \
+ native_mutex_lock(lock))
+
void
ruby_native_thread_lock_destroy(pthread_mutex_t *lock)
{
int r = pthread_mutex_destroy(lock);
if (r != 0) {
- rb_bug("native_mutex_destroy return non-zero: %d", r);
+ rb_bug_errno("pthread_mutex_destroy", r);
}
}
@@ -84,7 +89,7 @@ ruby_native_cond_initialize(pthread_cond_t *cond)
{
int r = pthread_cond_init(cond, 0);
if (r != 0) {
- rb_bug("native_cond_initialize return non-zero: %d", r);
+ rb_bug_errno("pthread_cond_init", r);
}
}
@@ -93,7 +98,7 @@ native_cond_destroy(pthread_cond_t *cond)
{
int r = pthread_cond_destroy(cond);
if (r != 0) {
- rb_bug("native_cond_destroy return non-zero: %d", r);
+ rb_bug_errno("pthread_cond_destroy", r);
}
}
@@ -246,6 +251,7 @@ get_stack(void **addr, size_t *size)
*size -= guard;
}
STACK_DIR_UPPER((void)0, *addr = (char *)*addr + *size);
+ *size -= guard;
# ifndef HAVE_PTHREAD_GETATTR_NP
pthread_attr_destroy(&attr);
# endif
@@ -306,35 +312,46 @@ ruby_init_stack(volatile void *addr
native_main_thread.register_stack_start = (VALUE*)bsp;
}
#endif
-#ifdef HAVE_GETRLIMIT
{
+ size_t size = 0;
+ size_t space = 0;
+#if defined(HAVE_PTHREAD_ATTR_GET_NP)
+ void* addr;
+ get_stack(&addr, &size);
+#elif defined(HAVE_GETRLIMIT)
struct rlimit rlim;
-
if (getrlimit(RLIMIT_STACK, &rlim) == 0) {
- size_t space = (size_t)(rlim.rlim_cur/5);
-
- if (space > 1024*1024) space = 1024*1024;
- native_main_thread.stack_maxsize = (size_t)rlim.rlim_cur - space;
+ size = (size_t)rlim.rlim_cur;
}
- }
#endif
+ space = size > 5 * 1024 * 1024 ? 1024 * 1024 : size / 5;
+ native_main_thread.stack_maxsize = size - space;
+ }
}
#define CHECK_ERR(expr) \
- {int err = (expr); if (err) {rb_bug("err: %d - %s", err, #expr);}}
+ {int err = (expr); if (err) {rb_bug_errno(#expr, err);}}
static int
native_thread_init_stack(rb_thread_t *th)
{
+ rb_thread_id_t curr = pthread_self();
+
+ if (pthread_equal(curr, native_main_thread.id)) {
+ th->machine_stack_start = native_main_thread.stack_start;
+ th->machine_stack_maxsize = native_main_thread.stack_maxsize;
+ }
+ else {
#ifdef STACKADDR_AVAILABLE
- void *addr;
- size_t size;
- int err = get_stack(&addr, &size);
- STACK_GROW_DIR_DETECTION;
- if (err) return err;
- size -= sizeof(VALUE);
- th->machine_stack_start = (VALUE*)addr - STACK_DIR_UPPER(0, 1);
- th->machine_stack_maxsize = size;
+ void *start;
+ size_t size;
+
+ if (get_stack(&start, &size) == 0) {
+ STACK_GROW_DIR_DETECTION;
+ size -= sizeof(VALUE);
+ th->machine_stack_start = start;
+ th->machine_stack_maxsize = size;
+ }
#else
th->machine_stack_start = native_main_thread.stack_start;
th->machine_stack_maxsize = native_main_thread.stack_maxsize;
@@ -491,15 +508,17 @@ enum {
#else
RUBY_STACK_MIN_LIMIT = 512 * 1024, /* 512KB */
#endif
- RUBY_STACK_MIN = (
+ RUBY_STACK_SPACE_LIMIT = 1024 * 1024
+};
+
#ifdef PTHREAD_STACK_MIN
- (RUBY_STACK_MIN_LIMIT < PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN * 2 :
+#define RUBY_STACK_MIN ((RUBY_STACK_MIN_LIMIT < PTHREAD_STACK_MIN) ? \
+ PTHREAD_STACK_MIN * 2 : RUBY_STACK_MIN_LIMIT)
+#else
+#define RUBY_STACK_MIN (RUBY_STACK_MIN_LIMIT)
#endif
- RUBY_STACK_MIN_LIMIT),
- RUBY_STACK_SPACE_LIMIT = 1024 * 1024,
- RUBY_STACK_SPACE = (RUBY_STACK_MIN/5 > RUBY_STACK_SPACE_LIMIT ?
- RUBY_STACK_SPACE_LIMIT : RUBY_STACK_MIN/5)
-};
+#define RUBY_STACK_SPACE (RUBY_STACK_MIN/5 > RUBY_STACK_SPACE_LIMIT ? \
+ RUBY_STACK_SPACE_LIMIT : RUBY_STACK_MIN/5)
static int
native_thread_create(rb_thread_t *th)
@@ -647,7 +666,7 @@ native_sleep(rb_thread_t *th, struct timeval *tv)
thread_debug("native_sleep: pthread_cond_wait start\n");
r = pthread_cond_wait(&th->native_thread_data.sleep_cond,
&th->interrupt_lock);
- if (r) rb_bug("pthread_cond_wait: %d", r);
+ if (r) rb_bug_errno("pthread_cond_wait", r);
thread_debug("native_sleep: pthread_cond_wait end\n");
}
else {
@@ -656,7 +675,7 @@ native_sleep(rb_thread_t *th, struct timeval *tv)
(unsigned long)ts.tv_sec, ts.tv_nsec);
r = pthread_cond_timedwait(&th->native_thread_data.sleep_cond,
&th->interrupt_lock, &ts);
- if (r && r != ETIMEDOUT) rb_bug("pthread_cond_timedwait: %d", r);
+ if (r && r != ETIMEDOUT) rb_bug_errno("pthread_cond_timedwait", r);
thread_debug("native_sleep: pthread_cond_timedwait end (%d)\n", r);
}
@@ -789,7 +808,7 @@ thread_timer(void *dummy)
else if (err == 0 || err == EINTR) {
if (rb_signal_buff_size() == 0) break;
}
- else rb_bug("thread_timer/timedwait: %d", err);
+ else rb_bug_errno("thread_timer/timedwait", err);
#if !defined(__CYGWIN__) && !defined(__SYMBIAN32__)
if (signal_thread_list_anchor.next) {
diff --git a/thread_pthread.h b/thread_pthread.h
index 04254d7312..94658d4e0c 100644
--- a/thread_pthread.h
+++ b/thread_pthread.h
@@ -12,6 +12,9 @@
#define RUBY_THREAD_PTHREAD_H
#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
typedef pthread_t rb_thread_id_t;
typedef pthread_mutex_t rb_thread_lock_t;
typedef pthread_cond_t rb_thread_cond_t;
diff --git a/thread_win32.c b/thread_win32.c
index 71f6d30085..992bb578c8 100644
--- a/thread_win32.c
+++ b/thread_win32.c
@@ -75,7 +75,7 @@ InitVM_native_thread(void)
}
static void
-w32_error(void)
+w32_error(const char *func)
{
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
@@ -85,14 +85,14 @@ w32_error(void)
GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) & lpMsgBuf, 0, NULL);
- rb_bug("%s", (char*)lpMsgBuf);
+ rb_bug("%s: %s", func, (char*)lpMsgBuf);
}
static void
w32_set_event(HANDLE handle)
{
if (SetEvent(handle) == 0) {
- w32_error();
+ w32_error("w32_set_event");
}
}
@@ -100,7 +100,7 @@ static void
w32_reset_event(HANDLE handle)
{
if (ResetEvent(handle) == 0) {
- w32_error();
+ w32_error("w32_reset_event");
}
}
@@ -167,7 +167,7 @@ static void
w32_close_handle(HANDLE handle)
{
if (CloseHandle(handle) == 0) {
- w32_error();
+ w32_error("w32_close_handle");
}
}
@@ -175,7 +175,7 @@ static void
w32_resume_thread(HANDLE handle)
{
if (ResumeThread(handle) == -1) {
- w32_error();
+ w32_error("w32_resume_thread");
}
}
@@ -329,7 +329,7 @@ ruby_native_thread_lock_initialize(rb_thread_lock_t *lock)
#if USE_WIN32_MUTEX
*lock = CreateMutex(NULL, FALSE, NULL);
if (*lock == NULL) {
- w32_error();
+ w32_error("native_mutex_initialize");
}
/* thread_debug("initialize mutex: %p\n", *lock); */
#else
@@ -337,6 +337,8 @@ ruby_native_thread_lock_initialize(rb_thread_lock_t *lock)
#endif
}
+#define native_mutex_reinitialize_atfork(lock) (void)(lock)
+
void
ruby_native_thread_lock_destroy(rb_thread_lock_t *lock)
{
@@ -481,13 +483,16 @@ native_thread_init_stack(rb_thread_t *th)
th->machine_stack_maxsize = size - space;
}
+#ifndef InterlockedExchangePointer
+#define InterlockedExchangePointer(t, v) \
+ (void *)InterlockedExchange((long *)(t), (long)(v))
+#endif
static void
native_thread_destroy(rb_thread_t *th)
{
- HANDLE intr = th->native_thread_data.interrupt_event;
+ HANDLE intr = InterlockedExchangePointer(&th->native_thread_data.interrupt_event, 0);
native_mutex_destroy(&th->interrupt_lock);
thread_debug("close handle - intr: %p, thid: %p\n", intr, th->thread_id);
- th->native_thread_data.interrupt_event = 0;
w32_close_handle(intr);
}
diff --git a/time.c b/time.c
index 89dc7cb501..a62ca63576 100644
--- a/time.c
+++ b/time.c
@@ -102,7 +102,7 @@ rb_localtime(const time_t *tm, struct tm *result)
}
#endif
-static ID id_divmod, id_mul, id_submicro, id_subnano;
+static ID id_divmod, id_mul, id_submicro, id_nano_num, id_nano_den, id_offset;
static ID id_eq, id_ne, id_quo, id_div, id_cmp, id_lshift;
#define eq(x,y) (RTEST(rb_funcall((x), id_eq, 1, (y))))
@@ -178,8 +178,8 @@ quo(VALUE x, VALUE y)
VALUE ret;
ret = rb_funcall((x), id_quo, 1, (y));
if (TYPE(ret) == T_RATIONAL &&
- ((struct RRational *)ret)->den == INT2FIX(1)) {
- ret = ((struct RRational *)ret)->num;
+ RRATIONAL(ret)->den == INT2FIX(1)) {
+ ret = RRATIONAL(ret)->num;
}
return ret;
}
@@ -213,19 +213,22 @@ num_exact(VALUE v)
v = rb_convert_type(v, T_RATIONAL, "Rational", "to_r");
break;
+ case T_STRING:
case T_NIL:
goto typeerror;
default: {
VALUE tmp;
- if (!NIL_P(tmp = rb_check_convert_type(v, T_RATIONAL, "Rational", "to_r")))
+ if (!NIL_P(tmp = rb_check_convert_type(v, T_RATIONAL, "Rational", "to_r"))) {
+ if (rb_respond_to(v, rb_intern("to_str"))) goto typeerror;
v = tmp;
+ }
else if (!NIL_P(tmp = rb_check_to_integer(v, "to_int")))
v = tmp;
else {
typeerror:
rb_raise(rb_eTypeError, "can't convert %s into an exact number",
- rb_obj_classname(v));
+ NIL_P(v) ? "nil" : rb_obj_classname(v));
}
break;
}
@@ -1036,7 +1039,7 @@ localtimexv(VALUE timexv, struct vtm *result)
}
struct time_object {
- VALUE timexv;
+ VALUE timexv; /* time_t value * TIME_SCALE. possibly Rational. */
struct vtm vtm;
int gmt;
int tm_got;
@@ -1449,6 +1452,20 @@ time_init_1(int argc, VALUE *argv, VALUE time)
*
* Time.new(2008,6,21, 13,30,0, "+09:00") #=> 2008-06-21 13:30:00 +0900
*
+ * # A trip for RubyConf 2007
+ * t1 = Time.new(2007,11,1,15,25,0, "+09:00") # JST (Narita)
+ * t2 = Time.new(2007,11,1,12, 5,0, "-05:00") # CDT (Minneapolis)
+ * t3 = Time.new(2007,11,1,13,25,0, "-05:00") # CDT (Minneapolis)
+ * t4 = Time.new(2007,11,1,16,53,0, "-04:00") # EDT (Charlotte)
+ * t5 = Time.new(2007,11,5, 9,24,0, "-05:00") # EST (Charlotte)
+ * t6 = Time.new(2007,11,5,11,21,0, "-05:00") # EST (Detroit)
+ * t7 = Time.new(2007,11,5,13,45,0, "-05:00") # EST (Detroit)
+ * t8 = Time.new(2007,11,6,17,10,0, "+09:00") # JST (Narita)
+ * p((t2-t1)/3600.0) #=> 10.666666666666666
+ * p((t4-t3)/3600.0) #=> 2.466666666666667
+ * p((t6-t5)/3600.0) #=> 1.95
+ * p((t8-t7)/3600.0) #=> 13.416666666666666
+ *
*/
static VALUE
@@ -2407,9 +2424,14 @@ static VALUE
time_to_r(VALUE time)
{
struct time_object *tobj;
+ VALUE v;
GetTimeval(time, tobj);
- return rb_time_unmagnify(tobj->timexv);
+ v = rb_time_unmagnify(tobj->timexv);
+ if (TYPE(v) != T_RATIONAL) {
+ v = rb_convert_type(v, T_RATIONAL, "Rational", "to_r");
+ }
+ return v;
}
/*
@@ -2886,6 +2908,11 @@ time_add(struct time_object *tobj, VALUE offset, int sign)
GetTimeval(result, tobj);
TIME_SET_UTC(tobj);
}
+ else if (TIME_FIXOFF_P(tobj)) {
+ VALUE off = tobj->vtm.utc_offset;
+ GetTimeval(result, tobj);
+ TIME_SET_FIXOFF(tobj, off);
+ }
return result;
}
@@ -3553,7 +3580,7 @@ time_strftime(VALUE time, VALUE format)
}
else {
len = rb_strftime_alloc(&buf, RSTRING_PTR(format),
- &tobj->vtm, rb_time_unmagnify(tobj->timexv), TIME_UTC_P(tobj));
+ &tobj->vtm, rb_time_unmagnify(tobj->timexv), TIME_UTC_P(tobj));
}
str = rb_str_new(buf, len);
if (buf != buffer) xfree(buf);
@@ -3600,6 +3627,8 @@ time_mdump(VALUE time)
usec = nsec / 1000;
nsec = nsec % 1000;
+ nano = add(LONG2FIX(nsec), subnano);
+
p = 0x1UL << 31 | /* 1 */
TIME_UTC_P(tobj) << 30 | /* 1 */
(year-1900) << 14 | /* 16 */
@@ -3621,7 +3650,17 @@ time_mdump(VALUE time)
str = rb_str_new(buf, 8);
rb_copy_generic_ivar(str, time);
- if (nsec) {
+ if (!rb_equal(nano, INT2FIX(0))) {
+ if (TYPE(nano) == T_RATIONAL) {
+ rb_ivar_set(str, id_nano_num, RRATIONAL(nano)->num);
+ rb_ivar_set(str, id_nano_den, RRATIONAL(nano)->den);
+ }
+ else {
+ rb_ivar_set(str, id_nano_num, nano);
+ rb_ivar_set(str, id_nano_den, INT2FIX(1));
+ }
+ }
+ if (nsec) { /* submicro is only for Ruby 1.9.1 compatibility */
/*
* submicro is formatted in fixed-point packed BCD (without sign).
* It represent digits under microsecond.
@@ -3640,8 +3679,12 @@ time_mdump(VALUE time)
len = 1;
rb_ivar_set(str, id_submicro, rb_str_new(buf, len));
}
- if (!rb_equal(subnano, INT2FIX(0))) {
- rb_ivar_set(str, id_subnano, subnano);
+ if (!TIME_UTC_P(tobj)) {
+ VALUE off = time_utc_offset(time), div, mod;
+ divmodv(off, INT2FIX(1), &div, &mod);
+ if (rb_equal(mod, INT2FIX(0)))
+ off = rb_Integer(div);
+ rb_ivar_set(str, id_offset, off);
}
return str;
}
@@ -3679,17 +3722,26 @@ time_mload(VALUE time, VALUE str)
struct vtm vtm;
int i, gmt;
long nsec;
- VALUE timexv, submicro, subnano;
+ VALUE timexv, submicro, nano_num, nano_den, offset;
time_modify(time);
+ nano_num = rb_attr_get(str, id_nano_num);
+ if (nano_num != Qnil) {
+ st_delete(rb_generic_ivar_table(str), (st_data_t*)&id_nano_num, 0);
+ }
+ nano_den = rb_attr_get(str, id_nano_den);
+ if (nano_den != Qnil) {
+ st_delete(rb_generic_ivar_table(str), (st_data_t*)&id_nano_den, 0);
+ }
submicro = rb_attr_get(str, id_submicro);
if (submicro != Qnil) {
st_delete(rb_generic_ivar_table(str), (st_data_t*)&id_submicro, 0);
}
- subnano = rb_attr_get(str, id_subnano);
- if (subnano != Qnil) {
- st_delete(rb_generic_ivar_table(str), (st_data_t*)&id_subnano, 0);
+ offset = rb_attr_get(str, id_offset);
+ if (offset != Qnil) {
+ validate_utc_offset(offset);
+ st_delete(rb_generic_ivar_table(str), (st_data_t*)&id_offset, 0);
}
rb_copy_generic_ivar(time, str);
@@ -3709,6 +3761,7 @@ time_mload(VALUE time, VALUE str)
if ((p & (1UL<<31)) == 0) {
gmt = 0;
+ offset = Qnil;
sec = p;
usec = s;
nsec = usec * 1000;
@@ -3732,12 +3785,19 @@ time_mload(VALUE time, VALUE str)
usec = (long)(s & 0xfffff);
nsec = usec * 1000;
- if (submicro != Qnil) {
+
+ vtm.subsecx = mulquo(LONG2FIX(nsec), INT2FIX(TIME_SCALE), LONG2FIX(1000000000));
+ if (nano_num != Qnil) {
+ VALUE nano = quo(num_exact(nano_num), num_exact(nano_den));
+ vtm.subsecx = add(vtm.subsecx, mulquo(nano, INT2FIX(TIME_SCALE), LONG2FIX(1000000000)));
+ }
+ else if (submicro != Qnil) { /* for Ruby 1.9.1 compatibility */
unsigned char *ptr;
long len;
int digit;
ptr = (unsigned char*)StringValuePtr(submicro);
len = RSTRING_LEN(submicro);
+ nsec = 0;
if (0 < len) {
if (10 <= (digit = ptr[0] >> 4)) goto end_submicro;
nsec += digit * 100;
@@ -3748,21 +3808,22 @@ time_mload(VALUE time, VALUE str)
if (10 <= (digit = ptr[1] >> 4)) goto end_submicro;
nsec += digit;
}
+ vtm.subsecx = add(vtm.subsecx, mulquo(LONG2FIX(nsec), INT2FIX(TIME_SCALE), LONG2FIX(1000000000)));
end_submicro: ;
}
-
- vtm.subsecx = mulquo(LONG2FIX(nsec), INT2FIX(TIME_SCALE), LONG2FIX(1000000000));
- if (subnano != Qnil) {
- subnano = num_exact(subnano);
- vtm.subsecx = add(vtm.subsecx, mulquo(subnano, INT2FIX(TIME_SCALE), LONG2FIX(1000000000)));
- }
timexv = timegmxv(&vtm);
}
GetTimeval(time, tobj);
tobj->tm_got = 0;
- if (gmt) TIME_SET_UTC(tobj);
tobj->timexv = timexv;
+ if (gmt) {
+ TIME_SET_UTC(tobj);
+ }
+ else if (!NIL_P(offset)) {
+ time_set_utc_offset(time, offset);
+ time_fixoff(time);
+ }
return time;
}
@@ -3815,7 +3876,9 @@ Init_Time(void)
id_divmod = rb_intern("divmod");
id_mul = rb_intern("*");
id_submicro = rb_intern("submicro");
- id_subnano = rb_intern("subnano");
+ id_nano_num = rb_intern("nano_num");
+ id_nano_den = rb_intern("nano_den");
+ id_offset = rb_intern("offset");
}
void
diff --git a/tool/compile_prelude.rb b/tool/compile_prelude.rb
index 17b00f955a..7476e3910f 100755
--- a/tool/compile_prelude.rb
+++ b/tool/compile_prelude.rb
@@ -38,7 +38,7 @@ lines_list = preludes.map {|filename|
line.gsub!(/RbConfig::CONFIG\["(\w+)"\]/) {
key = $1
unless mkconf
- require 'rbconfig'
+ require './rbconfig'
mkconf = RbConfig::MAKEFILE_CONFIG.merge('prefix'=>'#{TMP_RUBY_PREFIX}')
setup_ruby_prefix = "TMP_RUBY_PREFIX = $:.reverse.find{|e|e!=\".\"}.sub(%r{(.*)/lib/.*}m, \"\\\\1\")\n"
teardown_ruby_prefix = 'Object.class_eval { remove_const "TMP_RUBY_PREFIX" }'
diff --git a/tool/eval.rb b/tool/eval.rb
index db6d11cddd..ced244a4da 100755
--- a/tool/eval.rb
+++ b/tool/eval.rb
@@ -1,11 +1,9 @@
-require 'rbconfig'
+require './rbconfig'
require 'fileutils'
require 'pp'
-Ruby = ENV['RUBY'] ||
- File.join(RbConfig::CONFIG["bindir"],
- RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"])
+Ruby = ENV['RUBY'] || RbConfig.ruby
#
OPTIONS = %w{
diff --git a/tool/install-sh b/tool/install-sh
index e69de29bb2..427d38dfed 100755..100644
--- a/tool/install-sh
+++ b/tool/install-sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Just only for using AC_PROG_INSTALL in configure.in.
+# See autoconf.info for more detail.
+
+cat <<EOF >&2
+Ruby uses a BSD-compatible install(1) if possible. If not, Ruby
+provides its own install(1) alternative.
+
+This script a place holder for AC_PROG_INSTALL in configure.in.
+
+Please report a bug in Ruby to http://redmine.ruby-lang.org if you see
+this message.
+
+Thank you.
+EOF
+exit 1
diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb
index ca1f46713a..df3c35fb80 100755
--- a/tool/mkconfig.rb
+++ b/tool/mkconfig.rb
@@ -201,6 +201,14 @@ print <<EOS
CONFIG.each_value do |val|
RbConfig::expand(val)
end
+
+ # returns the absolute pathname of the ruby command.
+ def RbConfig.ruby
+ File.join(
+ RbConfig::CONFIG["bindir"],
+ RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
+ )
+ end
end
Config = RbConfig # compatibility for ruby-1.8.4 and older.
CROSS_COMPILING = nil unless defined? CROSS_COMPILING
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 4263cdaced..cf5827e6e2 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -424,18 +424,18 @@ install?(:local, :comm, :bin, :'bin-comm') do
open_for_install(cmd, $script_mode) do
case $cmdtype
when "bat"
- "#{<<EOH}#{shebang}#{body}#{<<EOF}".gsub(/$/, "\r")
-@echo off
-@if not "%~d0" == "~d0" goto WinNT
-#{ruby_bin} -x "#{cmd}" %1 %2 %3 %4 %5 %6 %7 %8 %9
-@goto endofruby
-:WinNT
-"%~dp0#{ruby_install_name}" -x "%~f0" %*
-@goto endofruby
-EOH
-__END__
-:endofruby
-EOF
+ [<<-"EOH".gsub(/^\s+/, ''), shebang, body, <<-"EOF".gsub(/^\s+/, '')].join.gsub(/$/, "\r")
+ @echo off
+ @if not "%~d0" == "~d0" goto WinNT
+ #{ruby_bin} -x "#{cmd}" %1 %2 %3 %4 %5 %6 %7 %8 %9
+ @goto endofruby
+ :WinNT
+ "%~dp0#{ruby_install_name}" -x "%~f0" %*
+ @goto endofruby
+ EOH
+ __END__
+ :endofruby
+ EOF
when "cmd"
"#{<<"/EOH"}#{shebang}#{body}"
@"%~dp0#{ruby_install_name}" -x "%~f0" %*
diff --git a/tool/transcode-tblgen.rb b/tool/transcode-tblgen.rb
index 19d4fe0927..4f505379b7 100755
--- a/tool/transcode-tblgen.rb
+++ b/tool/transcode-tblgen.rb
@@ -339,6 +339,8 @@ class ActionMap
"o2(0x#$1,0x#$2)"
when /\A([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])\z/i
"o3(0x#$1,0x#$2,0x#$3)"
+ when /funsio\((\d+)\)/
+ "funsio(#{$1})"
when /\A([0-9a-f][0-9a-f])(3[0-9])([0-9a-f][0-9a-f])(3[0-9])\z/i
"g4(0x#$1,0x#$2,0x#$3,0x#$4)"
when /\A(f[0-7])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])\z/i
diff --git a/transcode.c b/transcode.c
index a8b6c8287a..109f54e379 100644
--- a/transcode.c
+++ b/transcode.c
@@ -508,6 +508,8 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
case 30: goto resume_label30;
case 31: goto resume_label31;
case 32: goto resume_label32;
+ case 33: goto resume_label33;
+ case 34: goto resume_label34;
}
while (1) {
@@ -652,6 +654,30 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
}
break;
}
+ case FUNsio:
+ {
+ const unsigned char *char_start;
+ size_t char_len;
+ SUSPEND_OBUF(33);
+ if (tr->max_output <= out_stop - out_p) {
+ char_start = transcode_char_start(tc, *in_pos, inchar_start, in_p, &char_len);
+ out_p += tr->func_sio(TRANSCODING_STATE(tc),
+ char_start, (size_t)char_len, next_info,
+ out_p, out_stop - out_p);
+ }
+ else {
+ char_start = transcode_char_start(tc, *in_pos, inchar_start, in_p, &char_len);
+ writebuf_len = tr->func_sio(TRANSCODING_STATE(tc),
+ char_start, (size_t)char_len, next_info,
+ TRANSCODING_WRITEBUF(tc), TRANSCODING_WRITEBUF_SIZE(tc));
+ writebuf_off = 0;
+ while (writebuf_off < writebuf_len) {
+ SUSPEND_OBUF(34);
+ *out_p++ = TRANSCODING_WRITEBUF(tc)[writebuf_off++];
+ }
+ }
+ break;
+ }
case INVALID:
if (tc->recognized_len + (in_p - inchar_start) <= unitlen) {
if (tc->recognized_len + (in_p - inchar_start) < unitlen)
@@ -677,6 +703,8 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
goto invalid;
case UNDEF:
goto undef;
+ default:
+ rb_raise(rb_eRuntimeError, "unknown transcoding instruction");
}
continue;
diff --git a/transcode_data.h b/transcode_data.h
index 7362275cbe..61146d2c83 100644
--- a/transcode_data.h
+++ b/transcode_data.h
@@ -36,6 +36,7 @@
#define FUNso (PType 0x0F) /* function from start to output */
#define STR1 (PType 0x11) /* string 4 <= len <= 259 bytes: 1byte length + content */
#define GB4bt (PType 0x12) /* GB18030 four bytes payload */
+#define FUNsio (PType 0x13) /* function from start and info to output */
#define STR1_LENGTH(byte_addr) (unsigned int)(*(byte_addr) + 4)
#define STR1_BYTEINDEX(w) ((w) >> 6)
@@ -47,6 +48,7 @@
#define o3(b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned int)(unsigned char)(b3))<<24)|THREEbt)&0xffffffffU))
#define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU))
#define g4(b0,b1,b2,b3) (PType(((((unsigned char)(b0))<<8)|(((unsigned char)(b2))<<16)|((((unsigned char)(b1))&0x0f)<<24)|((((unsigned int)(unsigned char)(b3))&0x0f)<<28)|GB4bt)&0xffffffffU))
+#define funsio(diff) (PType((((unsigned int)(diff))<<8)|FUNsio))
#define getBT1(a) ((unsigned char)((a)>> 8))
#define getBT2(a) ((unsigned char)((a)>>16))
@@ -98,6 +100,7 @@ struct rb_transcoder {
ssize_t (*finish_func)(void*, unsigned char*, size_t); /* -> output */
ssize_t (*resetsize_func)(void*); /* -> len */
ssize_t (*resetstate_func)(void*, unsigned char*, size_t); /* -> output */
+ ssize_t (*func_sio)(void*, const unsigned char*, size_t, VALUE, unsigned char*, size_t); /* start -> output */
};
void rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib);
diff --git a/util.c b/util.c
index bc68476b99..62cbf761f0 100644
--- a/util.c
+++ b/util.c
@@ -291,7 +291,7 @@ ruby_add_suffix(VALUE str, const char *suffix)
while ((*t = *s) && *s != '.') {
baselen++;
if (*s == '\\' || *s == '/') baselen = 0;
- s++; t++;
+ s++; t++;
}
p = t;
@@ -309,7 +309,7 @@ ruby_add_suffix(VALUE str, const char *suffix)
ext[++extlen] = '\0';
}
else if (baselen < 8) {
- *p++ = *suffix;
+ *p++ = *suffix;
}
else if (ext[3] != *suffix) {
ext[3] = *suffix;
diff --git a/variable.c b/variable.c
index f23d1a4ff8..a1173e9da9 100644
--- a/variable.c
+++ b/variable.c
@@ -855,7 +855,7 @@ rb_alias_variable(ID name1, ID name2)
entry2 = rb_global_entry(name2);
if (!st_lookup(rb_global_tbl, (st_data_t)name1, &data1)) {
- entry1 = ALLOC(struct global_entry);
+ entry1 = ALLOC(struct global_entry);
entry1->id = name1;
st_add_direct(rb_global_tbl, name1, (st_data_t)entry1);
}
@@ -1251,12 +1251,13 @@ struct obj_ivar_tag {
};
static int
-obj_ivar_i(ID key, VALUE index, struct obj_ivar_tag *data)
+obj_ivar_i(st_data_t key, st_data_t index, st_data_t arg)
{
+ struct obj_ivar_tag *data = (struct obj_ivar_tag *)arg;
if ((long)index < ROBJECT_NUMIV(data->obj)) {
- VALUE val = ROBJECT_IVPTR(data->obj)[index];
+ VALUE val = ROBJECT_IVPTR(data->obj)[(long)index];
if (val != Qundef) {
- return (data->func)(key, val, data->arg);
+ return (data->func)((ID)key, val, data->arg);
}
}
return ST_CONTINUE;
@@ -1279,7 +1280,8 @@ obj_ivar_each(VALUE obj, int (*func)(ANYARGS), st_data_t arg)
st_foreach_safe(tbl, obj_ivar_i, (st_data_t)&data);
}
-void rb_ivar_foreach(VALUE obj, int (*func)(ANYARGS), st_data_t arg)
+void
+rb_ivar_foreach(VALUE obj, int (*func)(ANYARGS), st_data_t arg)
{
VALUE generic_iv = rb_generic_iv_tbl;
@@ -1306,6 +1308,44 @@ void rb_ivar_foreach(VALUE obj, int (*func)(ANYARGS), st_data_t arg)
}
}
+st_index_t
+rb_ivar_count(VALUE obj)
+{
+ st_table *tbl;
+ switch (TYPE(obj)) {
+ case T_OBJECT:
+ if ((tbl = ROBJECT_IV_INDEX_TBL(obj)) != 0) {
+ st_index_t i, num = tbl->num_entries, count = 0;
+ const VALUE *const ivptr = ROBJECT_IVPTR(obj);
+ for (i = count = 0; i < num; ++i) {
+ if (ivptr[i] != Qundef) {
+ count++;
+ }
+ }
+ return count;
+ }
+ break;
+ case T_CLASS:
+ case T_MODULE:
+ if ((tbl = RCLASS_IV_TBL(obj)) != 0) {
+ return tbl->num_entries;
+ }
+ break;
+ default:
+ if (!generic_iv_tbl) break;
+ if (FL_TEST(obj, FL_EXIVAR) || rb_special_const_p(obj)) {
+ st_data_t data;
+
+ if (st_lookup(generic_iv_tbl, (st_data_t)obj, &data) &&
+ (tbl = (st_table *)data) != 0) {
+ return tbl->num_entries;
+ }
+ }
+ break;
+ }
+ return 0;
+}
+
static int
ivar_i(ID key, VALUE val, VALUE ary)
{
diff --git a/version.c b/version.c
index ffdf20a90e..1d16148f8b 100644
--- a/version.c
+++ b/version.c
@@ -22,6 +22,30 @@
#ifndef RUBY_SITEARCH
#define RUBY_SITEARCH RUBY_ARCH
#endif
+#ifdef RUBY_PLATFORM_CPU
+#define RUBY_THINARCH RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
+#endif
+#ifndef RUBY_LIB_PREFIX
+#error RUBY_LIB_PREFIX must be defined
+#endif
+#ifndef RUBY_SITE_LIB
+#define RUBY_SITE_LIB RUBY_LIB_PREFIX"/site_ruby"
+#endif
+#ifndef RUBY_VENDOR_LIB
+#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
+#endif
+
+#define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION
+#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
+#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
+#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
+#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
+#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
+#ifdef RUBY_THINARCH
+#define RUBY_THIN_ARCHLIB RUBY_LIB "/"RUBY_THINARCH
+#define RUBY_SITE_THIN_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_THINARCH
+#define RUBY_VENDOR_THIN_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_THINARCH
+#endif
const char ruby_version[] = RUBY_VERSION;
const char ruby_release_date[] = RUBY_RELEASE_DATE;
@@ -32,6 +56,7 @@ const char ruby_copyright[] = RUBY_COPYRIGHT;
const char ruby_engine[] = "ruby";
const char ruby_initial_load_paths[] =
+#ifndef NO_INITIAL_LOAD_PATH
#ifdef RUBY_SEARCH_PATH
RUBY_SEARCH_PATH "\0"
#endif
@@ -54,6 +79,7 @@ const char ruby_initial_load_paths[] =
RUBY_THIN_ARCHLIB "\0"
#endif
RUBY_ARCHLIB "\0"
+#endif
"";
void
diff --git a/version.h b/version.h
index c39c465f3e..85b7e79838 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2010-02-13"
+#define RUBY_RELEASE_DATE "2010-02-16"
#define RUBY_PATCHLEVEL -1
#define RUBY_BRANCH_NAME "mvm"
@@ -8,7 +8,7 @@
#define RUBY_VERSION_TEENY 1
#define RUBY_RELEASE_YEAR 2010
#define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 13
+#define RUBY_RELEASE_DAY 16
#include "ruby/version.h"
diff --git a/vm.c b/vm.c
index 361d53d98f..ff2551b26a 100644
--- a/vm.c
+++ b/vm.c
@@ -585,7 +585,6 @@ rb_vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, VALUE self,
VALUE val = Qundef;
int state;
volatile int stored_safe = th->safe_level;
- rb_control_frame_t * volatile cfp = th->cfp;
TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) {
@@ -601,21 +600,6 @@ rb_vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, VALUE self,
}
if (state) {
- if (state == TAG_RETURN && proc->is_lambda) {
- VALUE err = th->errinfo;
- VALUE *escape_dfp = GET_THROWOBJ_CATCH_POINT(err);
-
- if (escape_dfp == cfp->dfp) {
- printf("ok\n");
- state = 0;
- th->errinfo = Qnil;
- th->cfp = cfp;
- val = GET_THROWOBJ_VAL(err);
- }
- }
- }
-
- if (state) {
JUMP_TAG(state);
}
return val;
@@ -995,6 +979,27 @@ vm_init_redefined_flag(rb_vm_t *vm)
#undef OP
}
+/* for vm development */
+
+static const char *
+vm_frametype_name(const rb_control_frame_t *cfp)
+{
+ switch (VM_FRAME_TYPE(cfp)) {
+ case VM_FRAME_MAGIC_METHOD: return "method";
+ case VM_FRAME_MAGIC_BLOCK: return "block";
+ case VM_FRAME_MAGIC_CLASS: return "class";
+ case VM_FRAME_MAGIC_TOP: return "top";
+ case VM_FRAME_MAGIC_FINISH: return "finish";
+ case VM_FRAME_MAGIC_CFUNC: return "cfunc";
+ case VM_FRAME_MAGIC_PROC: return "proc";
+ case VM_FRAME_MAGIC_IFUNC: return "ifunc";
+ case VM_FRAME_MAGIC_EVAL: return "eval";
+ case VM_FRAME_MAGIC_LAMBDA: return "lambda";
+ default:
+ rb_bug("unknown frame");
+ }
+}
+
/* evaluator body */
/* finish
@@ -1131,7 +1136,11 @@ vm_exec(rb_thread_t *th)
cont_pc = cont_sp = catch_iseqval = 0;
while (th->cfp->pc == 0 || th->cfp->iseq == 0) {
- th->cfp++;
+ if (UNLIKELY(VM_FRAME_TYPE(th->cfp) == VM_FRAME_MAGIC_CFUNC)) {
+ const rb_method_entry_t *me = th->cfp->me;
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, th->cfp->self, me->called_id, me->klass);
+ }
+ th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
}
cfp = th->cfp;
@@ -1288,12 +1297,25 @@ vm_exec(rb_thread_t *th)
cfp->sp + 1 /* push value */, cfp->lfp, catch_iseq->local_size - 1);
state = 0;
+ th->state = 0;
th->errinfo = Qnil;
goto vm_loop_start;
}
else {
- th->cfp++;
- if (th->cfp->pc != &finish_insn_seq[0]) {
+ /* skip frame */
+
+ switch (VM_FRAME_TYPE(th->cfp)) {
+ case VM_FRAME_MAGIC_METHOD:
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_RETURN, th->cfp->self, 0, 0);
+ break;
+ case VM_FRAME_MAGIC_CLASS:
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_END, th->cfp->self, 0, 0);
+ break;
+ }
+
+ th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
+
+ if (VM_FRAME_TYPE(th->cfp) != VM_FRAME_MAGIC_FINISH) {
goto exception_handler;
}
else {
@@ -1688,7 +1710,7 @@ thread_free(void *ptr)
rb_bug("thread_free: locking_mutex must be NULL (%p:%ld)", (void *)th, th->locking_mutex);
}
if (th->keeping_mutexes != NULL) {
- rb_bug("thread_free: keeping_mutexes must be NULL (%p:%ld)", (void *)th, th->locking_mutex);
+ rb_bug("thread_free: keeping_mutexes must be NULL (%p:%p)", (void *)th, th->keeping_mutexes);
}
if (th->local_storage) {
@@ -1723,8 +1745,6 @@ thread_free(void *ptr)
static size_t
thread_memsize(const void *ptr)
{
- RUBY_FREE_ENTER("thread");
-
if (ptr) {
const rb_thread_t *th = ptr;
size_t size = sizeof(rb_thread_t);
@@ -2201,6 +2221,7 @@ InitVM_VM(void)
rb_define_method(rb_cRubyVM, "parent", rb_vm_parent, 0);
rb_define_singleton_method(rb_cRubyVM, "current", rb_vm_s_current, 0);
rb_define_singleton_method(rb_cRubyVM, "parent", rb_vm_s_parent, 0);
+ rb_undef_method(CLASS_OF(rb_cRubyVM), "new");
/* ::VM::FrozenCore */
fcore = rb_class_new(rb_cBasicObject);
@@ -2219,6 +2240,7 @@ InitVM_VM(void)
/* ::VM::Env */
rb_cEnv = rb_define_class_under(rb_cRubyVM, "Env", rb_cObject);
rb_undef_alloc_func(rb_cEnv);
+ rb_undef_method(CLASS_OF(rb_cEnv), "new");
/* ::Thread */
rb_cThread = rb_define_class("Thread", rb_cObject);
diff --git a/vm_core.h b/vm_core.h
index fd68050756..f0e83eb9bb 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -392,8 +392,8 @@ struct rb_vm_tag {
struct rb_vm_tag *prev;
};
-struct rb_vm_trap_tag {
- struct rb_vm_trap_tag *prev;
+struct rb_vm_protect_tag {
+ struct rb_vm_protect_tag *prev;
};
#define RUBY_VM_VALUE_CACHE_SIZE 0x1000
@@ -479,7 +479,7 @@ typedef struct rb_thread_struct
int transition_for_lock;
struct rb_vm_tag *tag;
- struct rb_vm_trap_tag *trap_tag;
+ struct rb_vm_protect_tag *protect_tag;
int parse_in_eval;
int mild_compile_error;
@@ -592,8 +592,9 @@ typedef struct {
#define VM_CALL_SUPER_BIT (0x01 << 7)
#define VM_CALL_OPT_SEND_BIT (0x01 << 8)
-#define VM_SPECIAL_OBJECT_VMCORE 0x01
-#define VM_SPECIAL_OBJECT_CBASE 0x02
+#define VM_SPECIAL_OBJECT_VMCORE 0x01
+#define VM_SPECIAL_OBJECT_CBASE 0x02
+#define VM_SPECIAL_OBJECT_CONST_BASE 0x03
#define VM_FRAME_MAGIC_METHOD 0x11
#define VM_FRAME_MAGIC_BLOCK 0x21
@@ -750,6 +751,9 @@ void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
void rb_threadptr_signal_exit(rb_thread_t *th);
void rb_threadptr_execute_interrupts(rb_thread_t *);
+void rb_thread_lock_unlock(rb_thread_lock_t *);
+void rb_thread_lock_destroy(rb_thread_lock_t *);
+
#define RUBY_VM_CHECK_INTS_TH(th) do { \
if (UNLIKELY(th->interrupt_flag)) { \
rb_threadptr_execute_interrupts(th); \
diff --git a/vm_dump.c b/vm_dump.c
index c9c621fe0e..0aa8dae570 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -571,8 +571,8 @@ static int
bugreport_backtrace(void *arg, VALUE file, int line, VALUE method)
{
if (!*(int *)arg) {
- fprintf(stderr, "-- Ruby level backtrace information"
- "-----------------------------------------\n");
+ fprintf(stderr, "-- Ruby level backtrace information "
+ "----------------------------------------\n");
*(int *)arg = 1;
}
fprintf(stderr, "%s:%d:in `%s'\n", RSTRING_PTR(file), line, RSTRING_PTR(method));
@@ -586,7 +586,7 @@ void
rb_vm_bugreport(void)
{
if (GET_THREAD()->vm) {
- int i;
+ int i = 0;
SDR();
if (rb_backtrace_each(bugreport_backtrace, &i)) {
diff --git a/vm_eval.c b/vm_eval.c
index 737fd04510..e3c4efcb74 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -17,7 +17,7 @@ static inline VALUE vm_yield_with_cref(rb_thread_t *th, int argc, const VALUE *a
static inline VALUE vm_yield(rb_thread_t *th, int argc, const VALUE *argv);
static inline VALUE vm_backtrace(rb_thread_t *th, int lev);
static int vm_backtrace_each(rb_thread_t *th, int lev, rb_backtrace_iter_func *iter, void *arg);
-static NODE *vm_cref_push(rb_thread_t *th, VALUE klass, int noex);
+static NODE *vm_cref_push(rb_thread_t *th, VALUE klass, int noex, rb_block_t *blockptr);
static VALUE vm_exec(rb_thread_t *th);
static void vm_set_eval_stack(rb_thread_t * th, VALUE iseqval, const NODE *cref);
static int vm_collect_local_variables_in_heap(rb_thread_t *th, VALUE *dfp, VALUE ary);
@@ -257,10 +257,9 @@ check_funcall_exec(struct rescue_funcall_args *args)
static VALUE
check_funcall_failed(struct rescue_funcall_args *args, VALUE e)
{
- VALUE sym = rb_funcall(e, rb_intern("name"), 0, 0);
-
- if (args->sym != sym)
+ if (rb_respond_to(args->recv, SYM2ID(args->sym))) {
rb_exc_raise(e);
+ }
return Qundef;
}
@@ -278,6 +277,7 @@ check_funcall(VALUE recv, ID mid, int argc, VALUE *argv)
else {
struct rescue_funcall_args args;
+ th->method_missing_reason = 0;
args.recv = recv;
args.sym = ID2SYM(mid);
args.argc = argc;
@@ -297,18 +297,80 @@ rb_check_funcall(VALUE recv, ID mid, int argc, VALUE *argv)
return check_funcall(recv, mid, argc, argv);
}
+static const char *
+rb_type_str(enum ruby_value_type type)
+{
+#define type_case(t) case t: return #t;
+ switch (type) {
+ type_case(T_NONE)
+ type_case(T_OBJECT)
+ type_case(T_CLASS)
+ type_case(T_MODULE)
+ type_case(T_FLOAT)
+ type_case(T_STRING)
+ type_case(T_REGEXP)
+ type_case(T_ARRAY)
+ type_case(T_HASH)
+ type_case(T_STRUCT)
+ type_case(T_BIGNUM)
+ type_case(T_FILE)
+ type_case(T_DATA)
+ type_case(T_MATCH)
+ type_case(T_COMPLEX)
+ type_case(T_RATIONAL)
+ type_case(T_NIL)
+ type_case(T_TRUE)
+ type_case(T_FALSE)
+ type_case(T_SYMBOL)
+ type_case(T_FIXNUM)
+ type_case(T_UNDEF)
+ type_case(T_NODE)
+ type_case(T_ICLASS)
+ type_case(T_ZOMBIE)
+ default: return NULL;
+ }
+#undef type_case
+}
+
static inline rb_method_entry_t *
rb_search_method_entry(VALUE recv, ID mid)
{
VALUE klass = CLASS_OF(recv);
if (!klass) {
- const char *adj = "terminated";
- if (!IMMEDIATE_P(recv) && RBASIC(recv)->flags != 0)
- adj = "hidden";
- rb_raise(rb_eNotImpError,
- "method `%s' called on %s object (%p)",
- rb_id2name(mid), adj, (void *)recv);
+ VALUE flags, klass;
+ if (IMMEDIATE_P(recv)) {
+ rb_raise(rb_eNotImpError,
+ "method `%s' called on unexpected immediate object (%p)",
+ rb_id2name(mid), (void *)recv);
+ }
+ flags = RBASIC(recv)->flags;
+ klass = RBASIC(recv)->klass;
+ if (flags == 0) {
+ rb_raise(rb_eNotImpError,
+ "method `%s' called on terminated object"
+ " (%p flags=0x%"PRIxVALUE" klass=0x%"PRIxVALUE")",
+ rb_id2name(mid), (void *)recv, flags, klass);
+ }
+ else {
+ int type = BUILTIN_TYPE(recv);
+ const char *typestr = rb_type_str(type);
+ if (typestr && T_OBJECT <= type && type < T_NIL)
+ rb_raise(rb_eNotImpError,
+ "method `%s' called on hidden %s object"
+ " (%p flags=0x%"PRIxVALUE" klass=0x%"PRIxVALUE")",
+ rb_id2name(mid), typestr, (void *)recv, flags, klass);
+ if (typestr)
+ rb_raise(rb_eNotImpError,
+ "method `%s' called on unexpected %s object"
+ " (%p flags=0x%"PRIxVALUE" klass=0x%"PRIxVALUE")",
+ rb_id2name(mid), typestr, (void *)recv, flags, klass);
+ else
+ rb_raise(rb_eNotImpError,
+ "method `%s' called on broken T_???" "(0x%02x) object"
+ " (%p flags=0x%"PRIxVALUE" klass=0x%"PRIxVALUE")",
+ rb_id2name(mid), type, (void *)recv, flags, klass);
+ }
}
return rb_method_entry(klass, mid);
}
@@ -345,7 +407,7 @@ rb_method_call_status(rb_thread_t *th, rb_method_entry_t *me, call_type scope, V
if (self == Qundef) {
self = th->cfp->self;
}
- if (!rb_obj_is_kind_of(self, rb_class_real(defined_class))) {
+ if (!rb_obj_is_kind_of(self, defined_class)) {
return NOEX_PROTECTED;
}
}
@@ -754,6 +816,9 @@ rb_f_loop(VALUE self)
return Qnil; /* dummy */
}
+static const char *
+vm_frametype_name(const rb_control_frame_t *cfp);
+
VALUE
rb_iterate(VALUE (* it_proc) (VALUE), VALUE data1,
VALUE (* bl_proc) (ANYARGS), VALUE data2)
@@ -769,9 +834,15 @@ rb_iterate(VALUE (* it_proc) (VALUE), VALUE data1,
if (state == 0) {
iter_retry:
{
- rb_block_t *blockptr = RUBY_VM_GET_BLOCK_PTR_IN_CFP(th->cfp);
- blockptr->iseq = (void *)node;
- blockptr->proc = 0;
+ rb_block_t *blockptr;
+ if (bl_proc) {
+ blockptr = RUBY_VM_GET_BLOCK_PTR_IN_CFP(th->cfp);
+ blockptr->iseq = (void *)node;
+ blockptr->proc = 0;
+ }
+ else {
+ blockptr = GC_GUARDED_PTR_REF(th->cfp->lfp[0]);
+ }
th->passed_block = blockptr;
}
retval = (*it_proc) (data1);
@@ -786,7 +857,17 @@ rb_iterate(VALUE (* it_proc) (VALUE), VALUE data1,
state = 0;
th->state = 0;
th->errinfo = Qnil;
- th->cfp = cfp;
+
+ /* check skipped frame */
+ while (th->cfp != cfp) {
+ /* printf("skipped frame: %s\n", vm_frametype_name(th->cfp)); */
+ if (UNLIKELY(VM_FRAME_TYPE(th->cfp) == VM_FRAME_MAGIC_CFUNC)) {
+ const rb_method_entry_t *me = th->cfp->me;
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, th->cfp->self, me->called_id, me->klass);
+ }
+
+ th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
+ }
}
else{
/* SDR(); printf("%p, %p\n", cdfp, escape_dfp); */
@@ -1102,16 +1183,18 @@ yield_under(VALUE under, VALUE self, VALUE values)
{
rb_thread_t *th = GET_THREAD();
rb_block_t block, *blockptr;
- NODE *cref = vm_cref_push(th, under, NOEX_PUBLIC);
+ NODE *cref;
if ((blockptr = GC_GUARDED_PTR_REF(th->cfp->lfp[0])) != 0) {
block = *blockptr;
block.self = self;
th->cfp->lfp[0] = GC_GUARDED_PTR(&block);
}
+ cref = vm_cref_push(th, under, NOEX_PUBLIC, blockptr);
+ cref->flags |= NODE_FL_CREF_PUSHED_BY_EVAL;
if (values == Qundef) {
- return vm_yield_with_cref(th, 0, 0, cref);
+ return vm_yield_with_cref(th, 1, &self, cref);
}
else {
return vm_yield_with_cref(th, RARRAY_LENINT(values), RARRAY_PTR(values), cref);
@@ -1122,7 +1205,7 @@ yield_under(VALUE under, VALUE self, VALUE values)
static VALUE
eval_under(VALUE under, VALUE self, VALUE src, const char *file, int line)
{
- NODE *cref = vm_cref_push(GET_THREAD(), under, NOEX_PUBLIC);
+ NODE *cref = vm_cref_push(GET_THREAD(), under, NOEX_PUBLIC, NULL);
if (rb_safe_level() >= 4) {
StringValue(src);
@@ -1496,7 +1579,7 @@ print_backtrace(void *arg, VALUE file, int line, VALUE method)
void
rb_backtrace(void)
{
- vm_backtrace_each(GET_THREAD(), -1, print_backtrace, stdout);
+ vm_backtrace_each(GET_THREAD(), -1, print_backtrace, stderr);
}
VALUE
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 0660c7dd03..ae1d86d97b 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -360,44 +360,30 @@ call_cfunc(VALUE (*func)(), VALUE recv,
static inline VALUE
vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp,
- int num, VALUE recv, const rb_block_t *blockptr, VALUE flag,
+ int num, VALUE recv, const rb_block_t *blockptr,
const rb_method_entry_t *me)
{
VALUE val = 0;
int state = 0;
const rb_method_definition_t *def = me->def;
- VALUE klass = me->klass;
- ID id = me->called_id;
+ rb_control_frame_t *cfp;
- EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, id, klass);
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, me->called_id, me->klass);
- TH_PUSH_TAG(th);
- /* TODO: fix me. separate event */
- if (th->event_flags & (RUBY_EVENT_C_RETURN | RUBY_EVENT_VM)) {
- state = TH_EXEC_TAG();
- }
- else {
- _th->tag = _tag.prev;
- }
- if (state == 0) {
- rb_control_frame_t *cfp =
- vm_push_frame(th, 0, VM_FRAME_MAGIC_CFUNC,
- recv, (VALUE) blockptr, 0, reg_cfp->sp, 0, 1);
+ cfp = vm_push_frame(th, 0, VM_FRAME_MAGIC_CFUNC,
+ recv, (VALUE) blockptr, 0, reg_cfp->sp, 0, 1);
+ cfp->me = me;
+ reg_cfp->sp -= num + 1;
- cfp->me = me;
- reg_cfp->sp -= num + 1;
+ val = call_cfunc(def->body.cfunc.func, recv, (int)def->body.cfunc.argc, num, reg_cfp->sp + 1);
- val = call_cfunc(def->body.cfunc.func, recv, (int)def->body.cfunc.argc, num, reg_cfp->sp + 1);
+ if (reg_cfp != th->cfp + 1) {
+ rb_bug("cfp consistency error - send");
+ }
- if (reg_cfp != th->cfp + 1) {
- rb_bug("cfp consistency error - send");
- }
+ vm_pop_frame(th);
- vm_pop_frame(th);
- }
- TH_POP_TAG();
- EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, recv, id, klass);
- if (state) TH_JUMP_TAG(th, state);
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, recv, me->called_id, me->klass);
return val;
}
@@ -512,7 +498,7 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp,
}
case VM_METHOD_TYPE_NOTIMPLEMENTED:
case VM_METHOD_TYPE_CFUNC:{
- val = vm_call_cfunc(th, cfp, num, recv, blockptr, flag, me);
+ val = vm_call_cfunc(th, cfp, num, recv, blockptr, me);
break;
}
case VM_METHOD_TYPE_ATTRSET:{
@@ -623,7 +609,7 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp,
defined_class = RBASIC(defined_class)->klass;
}
- if (!rb_obj_is_kind_of(cfp->self, rb_class_real(defined_class))) {
+ if (!rb_obj_is_kind_of(cfp->self, defined_class)) {
val = vm_method_missing(th, id, recv, num, blockptr, NOEX_PROTECTED);
}
else {
@@ -1066,14 +1052,17 @@ vm_get_cref(const rb_iseq_t *iseq, const VALUE *lfp, const VALUE *dfp)
}
static NODE *
-vm_cref_push(rb_thread_t *th, VALUE klass, int noex)
+vm_cref_push(rb_thread_t *th, VALUE klass, int noex, rb_block_t *blockptr)
{
rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(th, th->cfp);
NODE *cref = NEW_BLOCK(klass);
cref->nd_file = 0;
cref->nd_visi = noex;
- if (cfp) {
+ if (blockptr) {
+ cref->nd_next = vm_get_cref(blockptr->iseq, blockptr->lfp, blockptr->dfp);
+ }
+ else if (cfp) {
cref->nd_next = vm_get_cref(cfp->iseq, cfp->lfp, cfp->dfp);
}
@@ -1096,6 +1085,23 @@ vm_get_cbase(const rb_iseq_t *iseq, const VALUE *lfp, const VALUE *dfp)
return klass;
}
+static inline VALUE
+vm_get_const_base(const rb_iseq_t *iseq, const VALUE *lfp, const VALUE *dfp)
+{
+ NODE *cref = vm_get_cref(iseq, lfp, dfp);
+ VALUE klass = Qundef;
+
+ while (cref) {
+ if (!(cref->flags & NODE_FL_CREF_PUSHED_BY_EVAL) &&
+ (klass = cref->nd_clss) != 0) {
+ break;
+ }
+ cref = cref->nd_next;
+ }
+
+ return klass;
+}
+
static inline void
vm_check_if_namespace(VALUE klass)
{
@@ -1117,12 +1123,16 @@ vm_get_ev_const(rb_thread_t *th, const rb_iseq_t *iseq,
if (orig_klass == Qnil) {
/* in current lexical scope */
- const NODE *root_cref = vm_get_cref(iseq, th->cfp->lfp, th->cfp->dfp);
- const NODE *cref = root_cref;
+ const NODE *cref = vm_get_cref(iseq, th->cfp->lfp, th->cfp->dfp);
+ const NODE *root_cref = NULL;
VALUE klass = orig_klass;
while (cref && cref->nd_next) {
- klass = cref->nd_clss;
+ if (!(cref->flags & NODE_FL_CREF_PUSHED_BY_EVAL)) {
+ klass = cref->nd_clss;
+ if (root_cref == NULL)
+ root_cref = cref;
+ }
cref = cref->nd_next;
if (!NIL_P(klass)) {
@@ -1149,8 +1159,10 @@ vm_get_ev_const(rb_thread_t *th, const rb_iseq_t *iseq,
}
/* search self */
- klass = root_cref->nd_clss;
- if (NIL_P(klass)) {
+ if (root_cref && !NIL_P(root_cref->nd_clss)) {
+ klass = root_cref->nd_clss;
+ }
+ else {
klass = CLASS_OF(th->cfp->self);
}
@@ -1178,7 +1190,8 @@ vm_get_cvar_base(NODE *cref)
VALUE klass;
while (cref && cref->nd_next &&
- (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON))) {
+ (NIL_P(cref->nd_clss) || FL_TEST(cref->nd_clss, FL_SINGLETON) ||
+ (cref->flags & NODE_FL_CREF_PUSHED_BY_EVAL))) {
cref = cref->nd_next;
if (!cref->nd_next) {
@@ -1478,7 +1491,7 @@ vm_throw(rb_thread_t *th, rb_control_frame_t *reg_cfp,
dfp = cfp->dfp;
goto valid_return;
}
- tdfp = GC_GUARDED_PTR_REF((VALUE *)*dfp);
+ tdfp = GC_GUARDED_PTR_REF((VALUE *)*tdfp);
}
}
}
@@ -1645,9 +1658,9 @@ struct opt_case_dispatch_i_arg {
};
static int
-opt_case_dispatch_i(st_data_t key, st_data_t data, void *p)
+opt_case_dispatch_i(st_data_t key, st_data_t data, st_data_t p)
{
- struct opt_case_dispatch_i_arg *arg = p;
+ struct opt_case_dispatch_i_arg *arg = (void *)p;
if (RTEST(rb_funcall((VALUE)key, idEqq, 1, arg->obj))) {
arg->label = FIX2INT((VALUE)data);
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index f08c8d8ec4..4ecd7577b4 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -168,7 +168,8 @@ enum {
} while (0)
#define GET_BLOCK_PTR() \
- ((rb_block_t *)(GC_GUARDED_PTR_REF(GET_LFP()[0])))
+ ((rb_block_t *)(GC_GUARDED_PTR_REF(GET_LFP()[0] & \
+ ((GET_LFP()[0] & 0x02) - 0x02))))
/**********************************************************/
/* deal with control flow 3: exception */
diff --git a/vm_method.c b/vm_method.c
index ce63d5a370..88a873ea2f 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -119,9 +119,9 @@ void
rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex)
{
if (func != rb_f_notimplement) {
- rb_method_cfunc_t opt = {
- func, argc,
- };
+ rb_method_cfunc_t opt;
+ opt.func = func;
+ opt.argc = argc;
rb_add_method(klass, mid, VM_METHOD_TYPE_CFUNC, &opt, noex);
}
else {
@@ -157,7 +157,7 @@ rb_add_method_def(VALUE klass, ID mid, rb_method_type_t type, rb_method_definiti
klass = rb_cObject;
}
if (rb_safe_level() >= 4 &&
- (klass == rb_cObject || !OBJ_UNTRUSTED(klass))) {
+ (klass == rb_cObject || !OBJ_UNTRUSTED(klass))) {
rb_raise(rb_eSecurityError, "Insecure: can't define method");
}
if (!FL_TEST(klass, FL_SINGLETON) &&
@@ -578,6 +578,9 @@ rb_undef(VALUE klass, ID id)
{
rb_method_entry_t *me;
+ if (NIL_P(klass)) {
+ rb_raise(rb_eTypeError, "no class to undef method");
+ }
if (rb_vm_cbase() == rb_cObject && klass == rb_cObject) {
rb_secure(4);
}
@@ -859,13 +862,20 @@ rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_defini
void
rb_alias(VALUE klass, ID name, ID def)
{
+ VALUE target_klass = klass;
rb_method_entry_t *orig_me;
+ rb_method_flag_t flag = NOEX_UNDEF;
+
+ if (NIL_P(klass)) {
+ rb_raise(rb_eTypeError, "no class to make alias");
+ }
rb_frozen_class_p(klass);
if (klass == rb_cObject) {
rb_secure(4);
}
+ again:
orig_me = search_method(klass, def);
if (UNDEFINED_METHOD_ENTRY_P(orig_me)) {
@@ -874,8 +884,15 @@ rb_alias(VALUE klass, ID name, ID def)
rb_print_undef(klass, def, 0);
}
}
+ if (orig_me->def->type == VM_METHOD_TYPE_ZSUPER) {
+ klass = RCLASS_SUPER(klass);
+ def = orig_me->def->original_id;
+ flag = orig_me->flag;
+ goto again;
+ }
- rb_add_method_me(klass, name, orig_me, orig_me->flag);
+ if (flag == NOEX_UNDEF) flag = orig_me->flag;
+ rb_add_method_me(target_klass, name, orig_me, flag);
}
/*
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 6f0414449c..1da70ee7ce 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -116,6 +116,9 @@ PLATFORM = mswin32
!if !defined(RT)
!error RT not defined. Retry from configure pass.
!endif
+!ifdef NTVER
+ARCHDEFS = -D_WIN32_WINNT=$(NTVER) $(ARCHDEFS)
+!endif
arch = $(ARCH)-$(PLATFORM)
sitearch = $(ARCH)-$(RT)
@@ -239,6 +242,7 @@ LIBRUBY_LDSHARED = $(LDSHARED)
LIBRUBY_DLDFLAGS = $(EXTLDFLAGS) -implib:dummy.lib -def:$(RUBYDEF)
EXEEXT = .exe
+EXECUTABLE_EXTS = ".exe",".com",".cmd",".bat"
!if !defined(PROGRAM)
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
!endif
@@ -561,19 +565,12 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#define DEFAULT_KCODE KCODE_NONE
#define LOAD_RELATIVE 1
#define DLEXT ".so"
+#define EXECUTABLE_EXTS $(EXECUTABLE_EXTS)
#define RUBY_LIB_VERSION_STYLE 3 /* full */
#define RUBY_LIB_PREFIX "/lib/$(RUBY_BASE_NAME)"
-#define RUBY_LIB RUBY_LIB_PREFIX"/"RUBY_LIB_VERSION
-#define RUBY_SITE_LIB RUBY_LIB_PREFIX"/site_ruby"
-#define RUBY_SITE_LIB2 RUBY_SITE_LIB"/"RUBY_LIB_VERSION
-#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
-#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB"/"RUBY_LIB_VERSION
#define RUBY_PLATFORM "$(arch)"
#define RUBY_SITEARCH "$(sitearch)"
#define RUBY_COREDLL "$(RT)"
-#define RUBY_ARCHLIB RUBY_LIB"/"RUBY_ARCH
-#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2"/"RUBY_SITEARCH
-#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2"/"RUBY_SITEARCH
#define LIBRUBY_SO "$(LIBRUBY_SO)"
#if 0
$(BANG)if "$(RUBY_SO_NAME)"!="$$(RUBY_SO_NAME)" || "$(ARCH)-$(PLATFORM)"!="$$(ARCH)-$$(PLATFORM)"
@@ -597,6 +594,9 @@ $(BANG)endif
# @ren $(RUBY_CONFIG_H:.h=_h).bak $(RUBY_CONFIG_H)
#!endif
+EXECUTABLE_EXTS = $(EXECUTABLE_EXTS:"=) # "
+EXECUTABLE_EXTS = $(EXECUTABLE_EXTS:,= )
+
config.status: $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub $(srcdir)/common.mk
@echo Creating $@
@exit <<$@
@@ -660,6 +660,7 @@ s,@LIBOBJS@,$(LIBOBJS),;t t
s,@ALLOCA@,$(ALLOCA),;t t
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
s,@EXEEXT@,.exe,;t t
+s,@EXECUTABLE_EXTS@,$(EXECUTABLE_EXTS),;t t
s,@OBJEXT@,$(OBJEXT),;t t
s,@XCFLAGS@,$(XCFLAGS),;t t
s,@XLDFLAGS@,$(XLDFLAGS),;t t
@@ -739,7 +740,7 @@ s,@try_header@,try_compile,;t t
miniruby: miniruby$(EXEEXT)
miniruby$(EXEEXT):
- @echo. $(LIBS)
+ @echo $(LIBS)
$(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) -Fe$@ -link $(LDFLAGS)
@$(RM) miniruby.lib miniruby.exp
miniruby.exe -v
@@ -775,7 +776,7 @@ $(LIBRUBY): $(RUBYDEF)
$(AR) $(ARFLAGS)$@ -def:$(RUBYDEF)
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
- @echo. $(DLDOBJS)
+ @echo $(DLDOBJS)
@-$(PRE_LIBRUBY_UPDATE)
$(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
$(RUBY_SO_NAME).res $(LIBS) -Fe$@ -link $(LDFLAGS) \
diff --git a/win32/configure.bat b/win32/configure.bat
index 4cac13e08c..0401b61dfd 100755
--- a/win32/configure.bat
+++ b/win32/configure.bat
@@ -5,7 +5,7 @@
echo> ~tmp~.mak ####
echo>> ~tmp~.mak conf = %0
-echo>> ~tmp~.mak $(conf:\=/): nul
+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
@@ -30,6 +30,13 @@ if "%1" == "--disable-win95" goto :disable-win95
if "%1" == "--extout" goto :extout
if "%1" == "--path" goto :path
if "%1" == "--with-baseruby" goto :baseruby
+if "%1" == "--with-ntver" goto :ntver
+echo %1| findstr "^--with-.*-dir$" > nul
+if not errorlevel 1 goto :withdir
+echo %1| findstr "^--with-.*-include$" > nul
+if not errorlevel 1 goto :withdir
+echo %1| findstr "^--with-.*-lib$" > nul
+if not errorlevel 1 goto :withdir
if "%1" == "-h" goto :help
if "%1" == "--help" goto :help
echo>>confargs.tmp %1 \
@@ -107,6 +114,12 @@ goto :loop
echo>>confargs.tmp %1 \
shift
goto :loop
+:ntver
+ echo>> ~tmp~.mak "NTVER=%2" \
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
:extout
echo>> ~tmp~.mak "EXTOUT=%2" \
echo>>confargs.tmp %1=%2 \
@@ -125,6 +138,11 @@ goto :loop
shift
shift
goto :loop
+:withdir
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
:help
echo Configuration:
echo --help display this help
@@ -137,12 +155,13 @@ goto :loop
echo --with-baseruby=RUBY use RUBY as baseruby [ruby]
echo --with-static-linked-ext link external modules statically
echo --disable-install-doc do not install rdoc indexes during install
- echo --enable-win95 enable win95 support
+ echo --disable-win95 disable win95 support
+ echo --with-ntver=0xXXXX target NT version (shouldn't use with old SDK)
del *.tmp
del ~tmp~.mak
goto :exit
:end
-echo>> ~tmp~.mak WIN32DIR=$(@D)
+echo>> ~tmp~.mak WIN32DIR=$(@D:\=/)
echo.>>confargs.tmp
echo>confargs.c #define $ $$
echo>>confargs.c !ifndef CONFIGURE_ARGS
diff --git a/win32/mkexports.rb b/win32/mkexports.rb
index 6ef20eab69..951429e35a 100755
--- a/win32/mkexports.rb
+++ b/win32/mkexports.rb
@@ -3,7 +3,7 @@
$name = $library = $description = nil
module RbConfig
- autoload :CONFIG, "rbconfig"
+ autoload :CONFIG, "./rbconfig"
end
class Exports
diff --git a/win32/resource.rb b/win32/resource.rb
index eda450952b..786edb0dd6 100755
--- a/win32/resource.rb
+++ b/win32/resource.rb
@@ -1,6 +1,6 @@
#!./miniruby -sI.
-require 'rbconfig'
+require './rbconfig'
CONFIG = RbConfig::MAKEFILE_CONFIG
diff --git a/win32/setup.mak b/win32/setup.mak
index 3216ac70e9..f463fb26ec 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -53,7 +53,10 @@ RDOCTARGET = $(RDOCTARGET)
EXTOUT = $(EXTOUT)
!endif
!if defined(BASERUBY)
-BASERUBY = $(BASERUBY)
+BASERUBY = $(BASERUBY:/=\)
+!endif
+!if defined(NTVER)
+NTVER = $(NTVER)
!endif
<<
!if !defined(BASERUBY)
diff --git a/win32/win32.c b/win32/win32.c
index 7a81550632..215752210d 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -435,6 +435,7 @@ init_env(void)
{
static const WCHAR TMPDIR[] = L"TMPDIR";
WCHAR env[_MAX_PATH];
+ WCHAR *buf;
DWORD len;
BOOL f;
@@ -458,7 +459,9 @@ init_env(void)
}
if (f) {
regulate_path(env);
- SetEnvironmentVariableW(L"HOME", env);
+ buf = ALLOCA_N(WCHAR, 5 + lstrlenW(env) + 1);
+ wsprintfW(buf, L"HOME=%s", env);
+ _wputenv(buf);
}
}
@@ -468,7 +471,9 @@ init_env(void)
NTLoginName = "<Unknown>";
return;
}
- SetEnvironmentVariableW(L"USER", env);
+ buf = ALLOCA_N(WCHAR, 5 + lstrlenW(env) + 1);
+ wsprintfW(buf, L"USER=%s", env);
+ _wputenv(buf);
}
NTLoginName = strdup(rb_w32_getenv("USER"));
@@ -482,7 +487,9 @@ init_env(void)
if (*(p - 1) != L'/') *p++ = L'/';
if (p - env + numberof(temp) < numberof(env)) {
memcpy(p, temp, sizeof(temp));
- SetEnvironmentVariableW(TMPDIR, env);
+ buf = ALLOCA_N(WCHAR, lstrlenW(TMPDIR) + 1 + lstrlenW(env) + 1);
+ wsprintfW(buf, L"%s=%s", TMPDIR, env);
+ _wputenv(buf);
}
}
}
@@ -956,26 +963,24 @@ CreateChild(const char *cmd, const char *prog, SECURITY_ATTRIBUTES *psa,
memset(&aStartupInfo, 0, sizeof (STARTUPINFO));
memset(&aProcessInformation, 0, sizeof (PROCESS_INFORMATION));
aStartupInfo.cb = sizeof (STARTUPINFO);
- if (hInput || hOutput || hError) {
- aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
- if (hInput) {
- aStartupInfo.hStdInput = hInput;
- }
- else {
- aStartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
- }
- if (hOutput) {
- aStartupInfo.hStdOutput = hOutput;
- }
- else {
- aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
- }
- if (hError) {
- aStartupInfo.hStdError = hError;
- }
- else {
- aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
- }
+ aStartupInfo.dwFlags = STARTF_USESTDHANDLES;
+ if (hInput) {
+ aStartupInfo.hStdInput = hInput;
+ }
+ else {
+ aStartupInfo.hStdInput = GetStdHandle(STD_INPUT_HANDLE);
+ }
+ if (hOutput) {
+ aStartupInfo.hStdOutput = hOutput;
+ }
+ else {
+ aStartupInfo.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE);
+ }
+ if (hError) {
+ aStartupInfo.hStdError = hError;
+ }
+ else {
+ aStartupInfo.hStdError = GetStdHandle(STD_ERROR_HANDLE);
}
dwCreationFlags = (NORMAL_PRIORITY_CLASS);