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

5793 Коммитов

Автор SHA1 Сообщение Дата
normal 26e1ebdc1e io/wait: fix return value for buffered read
* ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX
  Thanks to Yura Sokolov <funny.falcon@gmail.com>
  [ruby-core:68369] [Bug#10923]
* test/io/wait/test_io_wait.rb (test_nread_buffered):
  fix broken test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-01 21:03:22 +00:00
odaira 87ac21590e * ext/pty/pty.c: AIX supports autopush. Patch by Perry Smith [ruby-core:58539] [Bug #9144]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 23:32:48 +00:00
nobu 194c390769 thread.c: refine enums
* ext/thread/thread.c: remove unnecessary enum values and add end
  of enumerations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27 03:55:00 +00:00
usa dad59fcd12 * ext/win32/Win32API.rb (initialize): accept both a string and an array
for the arguments of the imported function.
  reported by Aaron Stone [ruby-core:68208] [Bug #10876] [Fixes GH-835]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-25 13:08:01 +00:00
nobu c5d781dded ossl_bn.c: [DOC] expand rdocs [ci skip]
* ext/openssl/ossl_bn.c: [DOC] expand rdocs as RDoc does not
  expand C-preprocessor macros.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21 23:28:47 +00:00
nobu 97f9589c4b ossl_asn1.c: fix doc
* ext/openssl/ossl_asn1.c (ossl_asn1obj_get_oid): [DOC] fix
  notation, an instance method but not a class method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21 22:56:06 +00:00
zzak b0317ee815 [DOC] Backport ruby/openssl@86eb721 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21 19:06:17 +00:00
tenderlove f595568e47 * ext/psych/lib/psych.rb: bump psych version.
* ext/psych/psych.gemspec: ditto
* ext/psych/yaml/scanner.c: add latest libyaml change.
* test/psych/helper.rb: support newer minitest
* test/psych/test_to_yaml_properties.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 18:17:46 +00:00
nobu 16294913f7 use rb_funcallv
* use rb_funcallv() for no arguments call instead of variadic
  rb_funcall().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16 04:08:52 +00:00
nobu b1cff6b68c console.c: use static IDs
* ext/io/console/console.c (rawmode_opt): prepare static IDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16 03:43:20 +00:00
nobu 8a29d8bbde console.c: avoid inadvertent pindown
* ext/io/console/console.c (console_dev): call Kernel#__send__
  method to avoid inadvertent pindown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16 03:43:18 +00:00
nobu 5f9f15365f console.c: fix typo
* ext/io/console/console.c (console_dev): fix typo, should be
  rb_funcallv to call with an argument array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-16 03:27:02 +00:00
nobu 68c2c522fd coverage.c: suppress a warning
* ext/coverage/coverage.c (coverage_clear_result_i): use local
  variable coverage.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13 23:26:26 +00:00
tenderlove a86eacf552 * ext/coverage/coverage.c: Add Coverage.peek_result. Allows you to
capture coverage information without stopping the coverage tool.
  [ruby-core:67940] [Feature #10816]

* test/coverage/test_coverage.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13 15:53:47 +00:00
hsbt f5219fee63 * ext/json: merge upstream from flori/json
change usage of TypedData. [Feature #10739][ruby-core:67564]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-13 05:19:12 +00:00
nobu 25455e611c openssl: check RAND_edg to support libressl
* ext/openssl/extconf.rb: check RAND_edg to support libressl.
* ext/openssl/ossl_rand.c (ossl_rand_egd): define only if RAND_edg
  is available.  [Fix GH-829]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-12 09:34:02 +00:00
nobu 0b71264edb md5init.c: fix a typo
* ext/digest/md5/md5init.c: fix a typo, remove an extra
  underscore from a macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 04:58:22 +00:00
nobu b97ceb66e9 digest: CommonDigest
* ext/digest/digest_conf.rb (digest_conf): check for CommonDigest.
* ext/digest/*/*cc.h: for Apple CommonCrypto/CommonDigest.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 02:09:55 +00:00
nobu 935275bb59 digest: define Finish func from Final func
* ext/digest/digest.h (DEFINE_FINISH_FUNC_FROM_FINAL): macro for
  finish functions, by inverting arguments order.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 02:09:23 +00:00
nobu b632ca436c digest: common configurations
* ext/digest/digest_conf.rb (digest_conf): extract common
  configurations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 02:08:50 +00:00
nobu e5c516c89a generator.c: fix infinite recursion
* ext/json/generator/generator.c (generate_json): get rid of
  unnecessary recursive calls which can cause infinite recursion.
  T_STRING may not have rb_cString.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-11 02:01:36 +00:00
nobu 4068d9089a digest: no ID cache
* ext/digest/*/*init.c: no need to cache interned IDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-10 23:37:08 +00:00
nobu 1a18454da9 getaddrinfo.c: GHOST vulnerability check
* ext/socket/getaddrinfo.c (get_addr): reject too long hostname to
  get rid of GHOST vulnerability on very old platforms.
* ext/socket/raddrinfo.c (make_hostent_internal): ditto, paranoic
  check for the canonnical name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 04:04:32 +00:00
nobu a6516ff5f7 registry.rb: wide versions
* ext/win32/lib/win32/registry.rb (Win32::Registry::API): use wide
  versions of RegDeleteValue and RegDeleteKey.
  [ruby-core:67958] [Bug #10820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 03:48:41 +00:00
nobu 32c19cdc39 socket/extconf.rb: reduce duplicated code
* ext/socket/extconf.rb: reduce duplicated code.  set fallback
  value first, then check OS-provided functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-08 01:35:18 +00:00
tenderlove ecbf835180 * ext/psych/lib/psych/visitors/yaml_tree.rb: register nodes when
dumping objects with custom coders. [ruby-core:66215] [Bug #10496]

* test/psych/test_coder.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 08:50:00 +00:00
tenderlove 56d4257a67 * ext/psych/lib/psych/visitors/to_ruby.rb: fix support for regular
expressions with newlines. tenderlove/psych#222

* test/psych/test_yaml.rb: test for change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 08:00:54 +00:00
suke 99eaebcea3 * ext/win32ole/win32ole.c (Init_win32ole): should not use atexit to
free allocated hash table to avoid error on Cygwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 11:30:37 +00:00
nobu d54db9b2a0 _sdbm.c: fix pointers to shift
* ext/sdbm/_sdbm.c (delpair): dst and src point at the ends of
  each data, whereas memmove requires pointers to the beginnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 08:35:08 +00:00
nobu a44f7a3ee6 bigdecimal.c: format specifiers
* ext/bigdecimal/bigdecimal.c (VpInit, VpPower, VpVarCheck): fix
  format specifiers of BDIGIT.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 07:32:58 +00:00
nobu 718b425306 bigdecimal.c: fix a typo
* ext/bigdecimal/bigdecimal.c (VpSetPTR): fix a typo, 'expoennt'
  to 'exponent'.  [ruby-core:67980] [Bug #10823] [Fix GH-825]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 07:32:43 +00:00
nobu 8d27e64d23 _sdbm.c: ruby/ruby.h for PRIdPTRDIFF
* ext/sdbm/_sdbm.c: include ruby/ruby.h for PRIdPTRDIFF when a
  macro `DEBUG` is defined.  based on the patch by Owen Rodley in
  [ruby-core:67987]. [Bug #10825]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04 06:55:41 +00:00
mrkn 78400919ba * ext/bigdecimal/bigdecimal.c (rb_rational_num): add fallback function
for rubies lower than 2.2.0.

* ext/bigdecimal/bigdecimal.c (rb_rational_den): ditto.

* ext/bigdecimal/extconf.rb: check the existences of struct RRational,
  rb_rational_num, and rb_rational_den.

* ext/bigdecimal/bigdecimal.bundle: bump version.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-29 14:34:43 +00:00
tenderlove 6ce27adabe * ext/psych/lib/psych/visitors/to_ruby.rb: fix parsing hashes with
instance variables when it is referenced multiple times.
* ext/psych/lib/psych.rb: bump version
* ext/psych/psych.gemspec: bump version
* test/psych/test_hash.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-28 17:37:09 +00:00
nobu 7e091d24ce cstr.c: nil iff terminated validly
* ext/-test-/string/cstr.c (bug_str_cstr_term_char): return nil
  only when terminated validly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-27 04:09:04 +00:00
nobu b3edab35ca cstr.c: cstr_term_char class method
* ext/-test-/string/cstr.c (bug_str_s_cstr_term_char): add a class
  method to see plain Strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-26 02:00:56 +00:00
nobu 5fb4f81eec cstr.c: get rid of exception
* ext/-test-/string/cstr.c (bug_str_cstr_term_char): get rid of
  invalid byte sequence exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-26 02:00:43 +00:00
nobu 22c750bb8d libffi: workaround of VC12 ml
* ext/fiddle/win32/libffi.mk.tmpl: assemble without directory prefix.
  workaround of a bug of VC12 ml, by unak at [ruby-core:67792].
  [ruby-core:67789] [Bug #10780]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-24 15:42:27 +00:00
nobu dcdbe0f22a extmk.rb: extract CLEANFILES and DISTCLEANFILES
* ext/extmk.rb (extract_makefile): extract CLEANFILES and
  DISTCLEANFILES regardless previous configration succeeded, as
  ext/tk/extconf.rb makes config_list file always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-21 04:22:07 +00:00
zzak 857756ac6e * file.c: NotImplementedError is raised if birthtime is unavailable.
Patch by @y-yagi san and [Fixes GH-817] [ci skip] [DOC]

* ext/pathname/pathname.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-19 17:57:03 +00:00
suke 8f67e9807a * ext/win32ole/win32ole.c (ole_invoke): avoid SEGV when VT_RECORD
variable is passed by reference. [ruby-dev:48803] [Bug #10697] 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-18 02:53:18 +00:00
nobu f59ce53f26 yaml_tree.rb: fix anchor
* ext/psych/lib/psych/visitors/yaml_tree.rb (visit_String):
  anchors like `\Z` are not valid inside character class.  use
  negative-lookahead instead.
  Fixes: https://github.com/tenderlove/psych/issues/221

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17 14:59:18 +00:00
nobu 8cfce15387 fiddle: --disable-bundled-libffi
* ext/fiddle/extconf.rb: disable bundled libffi if explicitly
  disabled by --disable-bundled-libffi.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17 10:52:17 +00:00
tenderlove 136b07aec8 * ext/psych/lib/psych.rb: bump version
* ext/psych/psych.gemspec: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 06:43:08 +00:00
tenderlove fe0414b547 * ext/psych/lib/psych/visitors/yaml_tree.rb: only dump hash
subclasses. Thanks Joe Eli McIlvain <joe.eli.mac@gmail.com>

* test/psych/test_hash.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 06:39:13 +00:00
tenderlove a5c577757e * ext/psych/lib/psych.rb: bump version
* ext/psych/lib/psych/visitors/yaml_tree.rb: fix line width wrapping
  for long strings.  Thanks Jakub Jirutka <jakub@jirutka.cz>

* test/psych/test_string.rb: test for change

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 06:37:22 +00:00
nobu 095886b572 readline.c: initialize before rl_refresh_line
* ext/readline/readline.c (readline_s_refresh_line): initialize
  before rl_refresh_line(), as some function make the internal
  state non-clean but rl_refresh_line() does not re-initialize it.
  [ruby-core:43957] [Bug #6232]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-14 06:43:50 +00:00
hsbt 8f37674ffd * ext/json, test/json: merge JSON HEAD(259dee6)
separate imprementation of Typed_Data macro.
  https://github.com/flori/json/compare/v1.8.1...v1.8.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-13 12:08:28 +00:00
hsbt 60c580fdcd * ext/bigdecimal/bigdecimal.c: fixes documentation like labeled lists,
code examples etc. [ruby-core:66730][Bug #10576][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 04:50:55 +00:00
akr 57b87a00f8 [DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11 15:58:40 +00:00