summaryrefslogtreecommitdiff
path: root/ext
AgeCommit message (Collapse)Author
2012-11-08merge revision(s) 37527: [Backport #7293]usa
* ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger. [ruby-core:44979] [Feature #6421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-08merge revision(s) 37406: [Backport #7176]usa
* ext/bigdecimal/bigdecimal.c (BigDecimal_add), test/bigdecimal/test_bigdecimal.rb: need to specify precision for converting Rational and Float. [ruby-core:48045] [Bug #7176] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-26merge revision(s) 32826,34732: [Backport #6681]usa
* file.c (rb_enc_path_next, rb_enc_path_skip_prefix) (rb_enc_path_last_separator, rb_enc_path_end) (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware path handling functions. * file.c (rb_home_dir, file_expand_path, rb_realpath_internal) (rb_file_s_basename, rb_file_dirname, rb_file_s_extname) (rb_file_join): should respect the encodings of arguments than file system encoding. [ruby-dev:45145] [Bug #5919] * dir.c (check_dirname, ruby_glob0): ditto. * ext/pathname/pathname.c (path_sub_ext): ditto. * util.c, include/ruby/util.h (ruby_add_suffix): remove the function. [Bug #5153] [ruby-core:38736] * io.c (argf_next_argv): remove the call of above function. * ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test extension module because this is only for testsing ruby_add_suffix(). * LEGAL: remove the mention about a part of util.c, because now we removed the part. * io.c (argf_next_argv): now the new filename is not guranteed to use, so should check the return value of rename(2). * test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible): now we expect same result with other platforms on no_safe_rename platforms (=Windows). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-26merge revision(s) 35488:usa
* ext/-test-/win32/dln/extconf.rb: remove test DLL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-21merge revision(s) 35485: [Backport #7013]naruse
* ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to unsigned long long on Win64. [ruby-core:44636][Bug #6364] reported by raylinn@gmail.com (ray linn) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-09merge revision(s) 35496:naruse
* ext/zlib/extconf.rb: detect z_crc_t type which will be defined since zlib-1.2.7. * ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-09merge revision(s) 35687:35691:kosaki
* ext/zlib/extconf.rb: Use an exception instaed of bare puts. * ext/psych/extconf.rb: Use an exception instaed of bare abort. * ext/fiddle/extconf.rb: Use an exception instaed of bare abort. * ext/readline/extconf.rb: Use an exception instead of bare exit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-09merge revision(s) 35685kosaki
* ext/extmk.rb: Show a message when extconf.rb raised an exception. * ext/openssl/extconf.rb: Use exception raising instead of message and/or abort. We want to display error message to console _and_ logging into mkmf.log. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07merge revision(s) r36583, r36458, r36414, r36103, r35690, r35681, r35658, ↵tenderlove
r35657, r35655, r35492: [Backport #6815] * ext/psych/lib/psych.rb: updated to released version. * ext/psych/psych.gemspec: ditto * ext/psych/emitter.c (initialize): allow a configuration object to be passed to the constructor so that mutation isn't required after instantiation. * ext/psych/lib/psych/handler.rb: add configuration object * ext/psych/lib/psych/visitors/emitter.rb: use configuration object if extra configuration is present. * ext/psych/lib/psych/visitors/to_ruby.rb: strings with YAML anchors are properly referenced. Patched by Joe Rafaniello via Github: https://github.com/tenderlove/psych/pull/69 * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * test/psych/test_alias_and_anchor.rb: test for change * ext/psych/lib/psych.rb: bumping psych to 1.3.3 * ext/psych/psych.gemspec: ditto * ext/psych/extconf.rb: Use an exception instaed of bare abort. * ext/psych/parser.c (transcode_string): fix encoding index names. Thanks markizko for reporting. * ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string subclass dumping and loading. * test/psych/test_array.rb: pertinent tests * test/psych/test_string.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps to Psych::Omap objects rather than hashes. [Bug #6425] * test/psych/test_omap.rb: pertinent test. * ext/psych/lib/psych/visitors/yaml_tree.rb: keep a reference to custom coders so that GC does not impact dumped yaml reference ids. * ext/psych/lib/psych/json/yaml_events.rb: implicit styles should not be changeable for JSON events. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29merge revision(s) 36455: [Backport #6772]naruse
* ext/curses/extconf.rb: support PDCurses. patched by Luis Lavena. [ruby-core:46485] [Feature #6735] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-04merge revision(s) 36281:naruse
* ext/dl/cfunc.c (rb_dlcfunc_call): also needed the workaround for VC8 for x64. [ruby-dev:45875] [Bug #6676] reported by aves_ramphastos (Seigo Ishigane) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03Revert r36279; it breaks C API compatibility.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03merge revision(s) 34372:naruse
* file.c (rb_enc_path_next, rb_enc_path_skip_prefix) (rb_enc_path_last_separator, rb_enc_path_end) (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware path handling functions. * file.c (rb_home_dir, file_expand_path, rb_realpath_internal) (rb_file_s_basename, rb_file_dirname, rb_file_s_extname) (rb_file_join): should respect the encodings of arguments than file system encoding. [ruby-dev:45145] [Bug #5919] * dir.c (check_dirname, ruby_glob0): ditto. * ext/pathname/pathname.c (path_sub_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-30merge revision(s) 34552: [Bug #6516]naruse
* ext/zlib/zlib.c (do_inflate): Inflate more data if buffered data exists. Allows Zlib::Inflate#set_dictionary to work. [ruby-trunk - Bug #5929] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25merge revision(s) 35595: [Backport #6446]naruse
* include/ruby/win32.h (FD_SET): change function to macro. To avoid buffer overflow when smaller FD_SETSISE is used in ext libraries. * win32/win32.c (rb_w32_fdset): this function is not used anymore. But we leave this for compatibility. * win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller FD_SETSISE is used in ext libraries. Dereference of fd_set pointer causes SEGV. * test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for above. * ext/-test-/win32/fd_setsize/depend: ditto. * ext/-test-/win32/fd_setsize/extconf.rb: ditto. * ext/-test-/win32/fd_setsize/fd_setsize.c: ditto. [ruby-core:44588] [Bug #6352] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-21merge revision(s) 35737:knu
* ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a module before calling rb_class2name(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-15* ext/digest/md5/extconf.rb: use pkg_config for openssl so thattenderlove
customized ssl paths are used for linking. Backports fixes for [ruby-core:44755]. * ext/digest/rmd160/extconf.rb: ditto * ext/digest/sha1/extconf.rb: ditto * ext/digest/sha2/extconf.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-11 * ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,nobu
must not cast it to unsigned long, which may be shorter than VALUE, and the result can be mere garbage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07merge revision(s) 35555:naruse
* ext/bigdecimal/bigdecimal.c (Init_bigdecimal): define IDs before they are used. [ruby-core:44900] [Bug #6406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-19merge revision(s) 35395:nobu
* ext/-test-/win32/dln/extconf.rb: need import library for ordinal entry even on mingw. [ruby-core:44441][Bug #6320] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17merge revision(s) 35368:nobu
* ext/-test-/win32/dln/extconf.rb: fix for mingw. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-17merge revision(s) 35354,35356,35357,35361:nobu
* dln.c (rb_w32_check_imported): skip ordinal entries. based on a patch by phasis68 (Heesob Park) at [ruby-core:44381]. [ruby-core:44371][Bug #6303] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-16Merge eacb6564c05ff7428bcbb3c34f72655b1b5d6ca3.naruse
[Backport #6304] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11* ext/-test-/add_suffix/bug.c (ruby_add_suffix): no staticnobu
declaration. [ruby-core:44277][Bug #6279] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-07merge revision(s) 35245,35248:tenderlove
* ext/psych/lib/psych.rb: bumping up psych version to match release. * ext/psych/psych.gemspec: ditto * ext/psych/parser.c: fall back to any encoding if the external encoding is wrong. [ruby-core:44163] * test/psych/test_encoding.rb: fix test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-04* ext/-test-/add_suffix/bug.c: make all functions in util.c staticnobu
to get rid of multiple definitions. reported at https://trac.macports.org/ticket/33814 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31* ext/openssl/ossl_x509cert.c: Fix doc typo.emboss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-30merge revision(s) 35162,35167: [Backport #6220]naruse
* test/openssl/test_x509cert.rb: Exclude test that fails when issuing a certificate with RSA signature and DSS1 digest for earlier OpenSSL versions when used in conjunction with OpenSSL 1.0.1. Thanks, Vit Ondruch, for reporting the issue. [ruby-core:42949][Bug #6089] * ext/openssl/ossl_pkcs7.c: fix crash when parsing garbage data. * test/openssl/test_pkcs7.rb: assert correct behavior for it. Thanks to Matt Venables for reporting the issue. [ruby-core:43250][Bug #6134] * test/openssl/test_x509cert.rb: exclude test that fails when issuing git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-30merge revision(s) 35002: [Backport #6135]naruse
* ext/date/date_core.c (datetime_s_now): [ruby-core:43256]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-29merge revision(s) ↵tenderlove
32578,33401,33403,33404,33531,33655,33679,33809,33900,33965,34067,34069,34087,34328,34330,34527,34772,34783,34839,34914,34953,34954,35153: [Backport #6212] * ext/psych/lib/psych.rb: updating version to match gem * ext/psych/psych.gemspec: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: fixing deprecation warning * ext/psych/lib/psych.rb: define a new BadAlias error class. * ext/psych/lib/psych/visitors/to_ruby.rb: raise an exception when deserializing an alias that does not exist. * test/psych/test_merge_keys.rb: corresponding test. * ext/psych/lib/psych.rb (load, parse): stop parsing or loading after the first document has been parsed. * test/psych/test_stream.rb: pertinent tests. * ext/psych/lib/psych.rb (parse_stream, load_stream): if a block is given, documents will be yielded to the block as they are parsed. [ruby-core:42404] [Bug #5978] * ext/psych/lib/psych/handlers/document_stream.rb: add a handler that yields documents as they are parsed * test/psych/test_stream.rb: corresponding tests. * ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded in order to stop method pollution. * ext/psych/lib/psych.rb: default open YAML files with utf8 external encoding. [ruby-core:42967] * test/psych/test_tainted.rb: ditto * ext/psych/parser.c: prevent a memory leak by protecting calls to handler callbacks. * test/psych/test_parser.rb: test to demonstrate leak. * ext/psych/parser.c: set parser encoding based on the YAML input rather than user configuration. * test/psych/test_encoding.rb: corresponding tests. * test/psych/test_parser.rb: ditto * test/psych/test_tainted.rb: ditto * ext/psych/parser.c: removed external encoding setter, allow parser to be reused. * ext/psych/lib/psych/parser.rb: added external encoding setter. * test/psych/test_parser.rb: test parser reuse * ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loading subclasses of String with ivars * ext/psych/lib/psych/visitors/yaml_tree.rb: Added support for dumping subclasses of String with ivars * test/psych/test_string.rb: corresponding tests * ext/psych/lib/psych/visitors/to_ruby.rb: Added ability to load array subclasses with ivars. * ext/psych/lib/psych/visitors/yaml_tree.rb: Added ability to dump array subclasses with ivars. * test/psych/test_array.rb: corresponding tests * ext/psych/emitter.c: fixing clang warnings. Thanks Joey! * ext/psych/lib/psych/visitors/to_ruby.rb: BigDecimals can be restored from YAML. * ext/psych/lib/psych/visitors/yaml_tree.rb: BigDecimals can be dumped to YAML. * test/psych/test_numeric.rb: tests for BigDecimal serialization * ext/psych/lib/psych/scalar_scanner.rb: Strings that look like dates should be treated as strings and not dates. * test/psych/test_scalar_scanner.rb: corresponding tests. * ext/psych/lib/psych.rb (module Psych): parse and load methods take an optional file name that is used when raising Psych::SyntaxError exceptions * ext/psych/lib/psych/syntax_error.rb (module Psych): allow nil file names and handle nil file names in the exception message * test/psych/test_exception.rb (module Psych): Tests for changes. * ext/psych/parser.c (parse): parse method can take an option file name for use in exception messages. * test/psych/test_parser.rb: corresponding tests. * ext/psych/lib/psych.rb: remove autoload from psych * ext/psych/lib/psych/json.rb: ditto * ext/psych/lib/psych/tree_builder.rb: dump complex numbers, rationals, etc with reference ids. * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto * ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers, rationals, etc with reference ids. * test/psych/test_object_references.rb: corresponding tests * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look like base 60 numbers are serialized as quoted strings. * test/psych/test_string.rb: test for change. * ext/psych/parser.c: remove unused variable. * ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, and message attributes during parse failure. * ext/psych/parser.c: Update parser to raise exception with correct values. * test/psych/test_exception.rb: corresponding tests. * ext/psych/parser.c (parse): Use context_mark for indicating error line and column. * ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue since postfix rescue cannot receive the exception class. Thanks nagachika! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@35165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06merge revision(s) 34917:nobu
* ext/io/console/console.c (set_rawmode): clear ECHOE and ECHOK bits too. * ext/io/console/console.c (echo_p): ignore ECHOE and ECHOK bits. [ruby-dev:45309] [Bug #6116] * ext/io/console/console.c (console_raw): fix rdoc. * ext/io/console/console.c (console_set_echo): mentioned about platform dependency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06merge revision(s) 33786:nobu
* ext/io/console/console.c (console_raw, console_set_raw) (console_getch): optional parameters. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06merge revision(s) 33785:nobu
* ext/io/console/console.c (console_cooked, console_set_cooked): new methods to reset cooked mode. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06merge revision(s) 34376:nobu
* ext/io/console/console.c (io_getch): default delegating method for StringIO. https://github.com/nobu/io-console/issues/4 * ext/stringio/stringio.c: moved some methods to hidden modules. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06merge revision(s) 33172,33968:nobu
* ext/io/console/console.c (console_set_winsize): remove unused variable. * io.c (Init_IO): Mention io/console methods. [Ruby 1.9 - Bug #5602] * ext/io/console/console.c: Mention that io/console must be required similar to lib/time.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06merge revision(s) 32747:nobu
* remove unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06merge revision(s) 34908:nobu
* ext/syck/lib/syck/rubytypes.rb (Exception.yaml_new): fix bug that causes YAML serialization problem for Exception. Exception#initialize doesn't use visible instance variable for the exception message, so call the method with the message. patched by Jingwen Owen Ou <jingweno AT gmail.com>. http://github.com/ruby/ruby/pull/41 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-27merge revision(s) 34829:nobu
* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): since methods can be overridden, so should not make an assumption on the type of results. [ruby-core:42969][Bug #6093] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-21merge revision(s) 33326:naruse
warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17merge revision(s) 34644:naruse
* ext/dbm/extconf.rb: check _DB_H_ macro unavailable except Berkeley DB library. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17Fix debug line of ext/dbm/extconf.rb in r34641. [Backport #6021]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-16* ext/dbm/extconf.rb: merge trunk's ext/dbm/extconf.rb andnaruse
related functions of lib/mkmf.rb. [Backport #6021] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15merge revision(s) 34626,34627:naruse
* ext/fiddle/closure.c (callback): same as r34506. * ext/fiddle/closure.c (callback): deal with unsinged integers. [ruby-core:42458][Bug #5991][Bug #6022] * ext/fiddle/conversions.c (value_to_generic, generic_to_value): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14merge revision(s) 32712,32718,32719: [Backport #6014]naruse
* ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark): workaround to mark wrapped object. this is not a true fix, because [Bug #4929] is caused by the interface design of DL. * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition. * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition. * ext/dl/cptr.c (rb_dlptr_s_to_ptr): use rb_check_funcall. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-14merge revision(s) 32720: [Backport #6015]naruse
* ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointer dereference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10merge revision(s) 33946:naruse
* ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937. 1st, to change the mode of an IO is very sensitive problem, so the maintainer of this library should judge it. 2nd, usually Zlib::GzReader.new is not called directly. #initialize is called via .open, and in the method the I/O is opened in binary mode, so there is no problem without changing the mode in #initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10merge revision(s) 33937: [Backport #5704]naruse
* ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] * include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE decorator. * io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and NEED_WRITECONV to replace universal newline decorator by CRLF only when required to improve file reading and writing under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] * io.c (do_writeconv): adjust binary mode if required. * io.c (read_all, appendline, swallow, rb_io_getline_1): ditto. * io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto. * io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto. * io.c (rb_io_extract_modeenc, rb_sysopen): ditto. * io.c (pipe_open, prep_stdio, io_encoding_set): ditto. * io.c (rb_io_s_pipe, copy_stream_body): ditto. * test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in binary mode. * win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle initialization. * win32/win32.c (rb_w32_write): use FTEXT mode accordingly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-10merge revision(s) 33485:naruse
* lib/openssl/buffering.rb: Force multi-byte strings to be treated as binary data. * test/openssl/test_ssl.rb: Add test for it. Thanks to Niklas Baumstark for reporting the issue! [Ruby 1.9 - Bug #5233] [ruby-core:39120] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09* backport r34482 from trunkemboss
* ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL option to prevent BEAST attack. See [Bug #5353]. In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent TLS-CBC-IV vulunerability described at http://www.openssl.org/~bodo/tls-cbc.txt It's known issue of TLSv1/SSLv3 but it attracts lots of attention these days as BEAST attack. (CVE-2011-3389) Until now ossl sets OP_ALL at SSLContext allocation and call SSL_CTX_set_options at connection. SSL_CTX_set_options updates the value by using |= so bits set by OP_ALL cannot be unset afterwards. This commit changes to call SSL_CTX_set_options only 1 time for each SSLContext. It sets the specified value if SSLContext#options= are called and sets OP_ALL if not. To help users to unset bits in OP_ALL, this commit also adds several constant to SSL such as OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS. These constants were not exposed in Ruby because there's no way to unset bits in OP_ALL before. Following is an example to enable 0/n split for BEAST prevention. ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS * test/openssl/test_ssl.rb: Test above option exists. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09* ext/fiddle/fiddle.c (Init_fiddle): declare in modern style.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e