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

45995 Коммитов

Автор SHA1 Сообщение Дата
nobu 01fb669423 math.c: more accuracy
* math.c (math_log10): calculate log10(2) for more accuracy.
  [ruby-core:79907] [Bug #13279]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-05 01:46:20 +00:00
stomar 3ca1cbecc6 string.c: [DOC] fix doc formatting for String#==, #===
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 20:08:04 +00:00
stomar b637593ae7 rdoc for String class
* lib/unicode_normalize.rb: [DOC] prevent a comment from
  showing up in the class documentation for String.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 20:02:48 +00:00
svn a8fca12633 * 2017-03-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 19:52:31 +00:00
stomar e9d6c6716f nodoc OptParse
* lib/optparse.rb: [DOC] nodoc OptParse, introduced with r46126,
  to avoid leaking of its documentation (OptionParser's docs) into
  the class documentation of Object.  [ruby-core:79909] [Bug #13281]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 19:52:30 +00:00
nobu f01836cb3f compile.c: operand size check
* compile.c (ibf_load_code): raise an exception on invalid operand
  size.  should not use assert() to validate incoming data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 14:44:05 +00:00
nobu 37102f6bdb compile.c: memory leak
* compile.c (iseq_set_sequence): fix potential memory leaks on an
  invalid instruction sequence.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 14:37:22 +00:00
nobu 8f2b1b67ea compile.c: fix invalid label message
* compile.c (validate_label): fix invalid label message.
  registered labels are Symbols, not IDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 14:21:57 +00:00
stomar b4baeb5af6 documentation for sort methods
* array.c: [DOC] fix grammar in Array#sort, #sort!, #sort_by!,
  move references below the code example, add a missing reference.
* enum.c: [DOC] fix grammar in Enumerable#sort, #sort_by.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 13:13:50 +00:00
stomar 453199c4b6 enum.c: documentation for Enumerable#sort_by
* enum.c: [DOC] improve structure of docs for Enumerable#sort_by,
  adopt explanation of the comparison block from Array#sort_by,
  drop mention of 1.8, fix typos.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 13:12:20 +00:00
nobu 1ec805727e readline.c: fix type
* ext/readline/readline.c (getc_body): fix variable type, and
  extract _get_osfhandle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 05:13:18 +00:00
svn 2e97d5bc42 * 2017-03-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03 19:39:36 +00:00
stomar d4e1b7fcec io.c: documentation for puts
* io.c: [DOC] clarify that the 'record separator' between
  arguments passed to 'puts' is always a newline.
  Based on a patch by Mark Amery. [ruby-core:65801] [Misc #10403]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03 19:39:35 +00:00
nobu d2e61b41f5 zlib for mingw
* ext/zlib/extconf.rb: fix building zlib for mingw, and for
  cross-compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03 09:27:27 +00:00
stomar bf5b0c4956 proc.c: documentation for Proc#{call,yield,[]}
* proc.c: [DOC] fix and improve docs for Proc#{call,yield,[]}:

  * change order of Document-method directives as workaround for an
    RDoc rendering problem where the documentation for Proc#call displays
    a "Document-method: []" code block.  [ruby-core:79887] [Bug #13273]
  * add missing call-seq and example for Proc#yield
  * remove pointless cross reference to Proc#yield
  * update description for handling of extra or missing arguments,
    improve examples and add cross reference to #lambda?

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03 08:45:04 +00:00
nobu 3a520acec3 MINIRUBY for cross-compling
* template/configure-ext.mk.tmpl (EXTMK_ARGS): add MINIRUBY for
  cross-compling, which is used in extmk.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03 06:22:47 +00:00
nobu 83f76f46c7 fix for mingw64
* util.c: define MINGW_HAS_SECURE_API for qsort_s on recent
  mingw64.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03 06:18:36 +00:00
nobu 85ac60cfd1 broken mingw
* configure.in: check whether frexp and modf are broken.

* include/ruby/win32.h (frexp, modf): ignore bad declarations when
  compiling as C++.  [ruby-core:79859] [Bug #13267]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03 04:51:34 +00:00
akr 2f3ff53f86 [DOC] update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02 23:36:13 +00:00
svn b7336a249a * 2017-03-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02 23:33:07 +00:00
akr d8cee4ff0a refine a warning message.
The "n" option for regexp, /.../n, is historical.
It doesn't mean the regexp works as binary match since Ruby 1.9.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02 23:33:06 +00:00
stomar a698d99703 string.c: restore documentation for String#<<
* string.c: [DOC] restore documentation for String#<<
  which became undocumented with r56021; fix a typo.
  [ruby-core:79865] [Bug #13268]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02 10:31:56 +00:00
nobu 033c4a083d test: use RbConfig::Limits
* test/lib/envutil.rb: rbconfig/sizeof may not be available when
  cross-compiling.  use RbConfig::Limits instead of calculating
  limits of Fixnum with hard-coded CHAR_BIT.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02 04:54:19 +00:00
nobu 6e0967ec6d fix for cross-compiling
* common.mk (test-rubyspec): add dependency for cross-compiling.

* defs/gmake.mk: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02 04:54:18 +00:00
stomar 745f4dd5b8 struct.c: improve rdoc for Struct
* struct.c: [DOC] improve examples for ::new, improve #dig example,
  simplify #select example, use consistent style for return values,
  fix typos and example code style, remove duplicate cross reference.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 19:59:03 +00:00
svn 9386e511b5 * 2017-03-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 19:57:15 +00:00
stomar 8b71e2532d hash.c: [DOC] fix book title in example
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 19:57:14 +00:00
kazu c1fd1b111d lib/e2mmap.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 11:37:30 +00:00
stomar 97e946f75a fileutils.rb: improve rdoc for FileUtils
* lib/fileutils.rb: [DOC] fix invalid example code to make it
  syntax highlighted, fix rdoc for lists, nodoc internal methods,
  avoid a dangerous example.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 10:17:42 +00:00
rhe 3acda398d5 openssl: avoid segfault during running tests on Ubuntu trusty
Import the commit 6693a549d673 ("test/test_pkey_ec: do not use dummy 0
order", 2017-02-03) from upstream. Hopefully this will fix the segfault
on RubyCI icc16-x64:

  http://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20170301T050002Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 10:15:55 +00:00
stomar 7957042253 fileutils.rb: improve docs for FileUtils.compare_file
* lib/fileutils.rb (compare_file): [DOC] clarify documentation
  by avoiding confusing return value of "maybe false".

[ruby-core:75431] [Misc #12365] reported by Robert A. Heiler.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 08:54:37 +00:00
nobu 3cef10489a common.mk: separate clean-ext
* common.mk (clean-ext): separate clean-up of makefiles and
  timestamps, and clean-up of subdirectories under ext and gems.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 07:53:15 +00:00
nobu 9da188550c zlib: clean zlib
* ext/zlib/extconf.rb: clean zlib libraries generated in the
  place.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 05:44:37 +00:00
svn c0be1c7bb3 * 2017-03-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 01:16:27 +00:00
normal d1a506eca7 deduplicate strings sooner at load and compile
We can use rb_fstring_cstr in some places to prevent an
intermediate object from being created before deduplication
via rb_fstring.

* compile.c (iseq_compile_each): use rb_fstring_cstr
  (rb_insns_name_array): ditto
* load.c (rb_load_internal0): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01 01:16:26 +00:00
stomar 98374b99dd lib/mathn.rb: [DOC] nodoc internal Math.rsqrt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 10:41:03 +00:00
nobu a0da6f0dfe clean gems
* Makefile.in (clean-ext): clean gem directories too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 08:22:00 +00:00
hsbt 7e0aaf3ac3 Added initial gemspec for SDBM module.
[Feature #13261]

  * doc/*.rdoc: Move SDBM entry to default gem section.
  * ext/sdbm/sdbm.gemspec: first gemspec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 07:45:54 +00:00
nobu 3d718d2119 disable critical-error-handler
* win32/win32.c (rb_w32_sysinit): disable critical-error-handler
  message box even on mswin, regardless of runtime DLL version.
  [ruby-dev:49988] [Bug #13254]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 04:33:15 +00:00
nobu 7def092804 Makefile.sub: ULL_TO_DOUBLE
* win32/Makefile.sub (config.h): define ULL_TO_DOUBLE for
  conversion from unsigned __int64 to double, which is not
  implemented in till Visual Studio.NET 2003, aka VC7.1.

* bignum.c (estimate_initial_sqrt): use ULL_TO_DOUBLE if defined.

* numeric.c (BDIGIT_DBL_TO_DOUBLE): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 02:58:12 +00:00
nobu 0e099878eb numeric.c: suppress warning
* numeric.c (DEFINE_INT_SQRT): suppress a type-limits warning
  where int is always smaller than double.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 01:10:38 +00:00
nobu c1138f066a Makefile.in: CHDIR to srcdir
* Makefile.in (update-mspec, update-rubyspec): use CHDIR, which may
  use -P, to resolve symbolic links.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-28 00:00:33 +00:00
stomar 9fe1433575 date_core.c: expand docs for Date shifting
* ext/date/date_core.c: [DOC] expand docs for Date shifting

  * add examples for Date#>> and Date#<< that clarify some edge cases
  * add examples for Date#next_year and Date#prev_year
  * add cross references to Date#>> and Date#<<

  [ruby-core:79584] [Bug #13225]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 18:26:22 +00:00
svn fbf98a776e * 2017-02-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 18:07:12 +00:00
stomar 6b82ba9e26 Fix doc for Hash#dig and Struct#dig
* hash.c (rb_hash_dig): [DOC] correct argument name
  in method description; fix formatting in examples.
* struct.c (rb_struct_dig): ditto.

[ruby-core:79221] [Bug #13148]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 18:07:11 +00:00
nobu 6d3654d59b fix nd_ainfo->kw_rest_arg
[Fix GH-5129]
Author:    fate0 <fate0@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 13:52:08 +00:00
nobu 9b1f2b073f kwrest arg name
* compile.c (iseq_set_arguments_keywords): make keyword rest
  argument name nd_vid consistently, regardless of whether other
  keyword arguments are present.  [Fix GH-1529]

* parse.y (new_args_tail_gen): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 13:52:07 +00:00
shyouhei e32c5b6faa add NEWS for Random.urandom [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 13:41:38 +00:00
nobu 6fd71da067 common.mk (distclean): clean docs too
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 13:22:05 +00:00
hsbt 55c13218d9 Added initial gemspec for Etc module.
[Feature #13256]

  * doc/*.rdoc: move Etc module to default gem section.
  * ext/etc/etc.gemspec: first gemspec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-27 09:20:39 +00:00