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

5775 Коммитов

Автор SHA1 Сообщение Дата
nobu 051127abec mkmf.rb: revert r52431
* lib/mkmf.rb: it's an issue of test/mkmf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-04 01:31:09 +00:00
nobu 6d57a52685 mkmf.rb: log messages
* lib/mkmf.rb (xsystem, xpopen, egrep_cpp, pkg_config): log
  messages to the log file too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-03 07:52:22 +00:00
hsbt e00d5437d1 * lib/rubygems: Update to RubyGems HEAD(60d7972).
this version contains pull requests number of #1343, #1356, #1357, #1363
  at https://github.com/rubygems/rubygems/pulls
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30 00:54:12 +00:00
naruse 00ce700c93 Revert "* lib/rinda/ring.rb: Linux's SO_REUSEPORT is not for multicast."
This reverts commit r52314.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28 02:52:31 +00:00
naruse e5747f3e3c * lib/rinda/ring.rb: Linux's SO_REUSEPORT is not for multicast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-27 21:00:07 +00:00
nobu 6df21cb469 logger.rb: end of week should be Saturday
* lib/logger.rb (Logger::Period#previous_period_end): as weekly
  rotation shifts the log file on Sundays, the end date of the
  previous period should be Saturdays.  fix r45072.
  [ruby-dev:49314] [Bug #11622]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-27 07:18:14 +00:00
nobu e8c00b7027 logger.rb: fix weekly rotation
* lib/logger.rb (Logger::Period#next_rotate_time): get rid of
  adding to mday not to exceed the days of the month.
  [ruby-core:71185] [Bug #11620]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-27 03:00:38 +00:00
nobu 6160e4b9f4 logger.rb: exact matching
* lib/logger.rb ({next,previous}_rotate_time): dispatch by exact
  matching shift_age instead of regexp matching.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-26 14:51:39 +00:00
nobu aeb88f01eb logger.rb: freeze constants
* lib/logger.rb: freeze constant strings and array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-26 14:51:04 +00:00
nobu 05bf12f7df Grammatical fixes [ci skip]
* lib/racc/rdoc/grammar.en.rdoc: Grammatical errors fixed.
  [Fix GH-1070]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-26 13:23:32 +00:00
hsbt d7908f9a9c * lib/fileutils.rb: rename tailing to trailing.
[Misc #11548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-26 08:30:20 +00:00
sorah d9bf31ccef * lib/mkmf.rb: Revert r45640 because it may lead to link
with different libruby. [Bug #9760]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-24 12:10:48 +00:00
nobu 4e1ee809bb forwardable.rb: full qualify names
* lib/forwardable.rb (def_instance_delegator, def_single_delegator):
  match backtraces against ::Forwardable in case the target class
  is a subclass of BasicObject and does not include Kernel.
  [ruby-core:71176] [Bug #11616]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 22:29:14 +00:00
shugo 8c8e17d499 * lib/forwardable (def_instance_delegator, def_single_delegator):
rescue ::Exception instead of Exception in case Exception is
  defined under the target class.
  [ruby-core:71175] [Ruby trunk - Bug #11615]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 15:41:04 +00:00
hsbt 00d8b1a85d * lib/irb.rb: Ignored assignment of STDOUT.sync = true
when irb.rb loaded. It's affected to IDE such as Jetbrain.
  [fix GH-864] Patch by @os97673

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 08:55:35 +00:00
hsbt 2cd1f852e1 * lib/ipaddr.rb, test/test_ipaddr.rb: Reject invalid address contained
EOL string. Patch by @kachick [fix GH-942][Bug #11513]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 07:35:14 +00:00
shugo e0ea5e903b * lib/net/imap.rb: remove an empty comment line and -*-.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 06:29:08 +00:00
shugo 3eabc555cb * lib/net/ftp.rb (gettextfile, getbinaryfile): use the safe
navigation operator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 06:23:16 +00:00
shugo d07ce082a6 * lib/matrix/eigenvalue_decomposition.rb (tridiagonalize): fix
indentation to avoid a warning when the command line option -w of
  ruby is specified.

* lib/matrix/eigenvalue_decomposition.rb (hessenberg_to_real_schur):
  change the name of a block parameter to avoid a warning when the
  command line option -w of ruby is specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 02:09:03 +00:00
shugo e4d925bf3a * lib/un.rb (help): change the name of a block parameter to avoid
a warning when the command line option -w of ruby is specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 15:51:07 +00:00
shugo 68fc350abe * lib/net/imap (idle): add a new argument timeout for keep-alive.
[ruby-core:63693] [Bug #10031]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 09:32:19 +00:00
marcandre 487736646a * lib/prime.rb: Add basic argument checking to Prime.prime?
[Bug #11606]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-20 03:19:44 +00:00
marcandre 8744d5164d * lib/prime.rb: Optimize Integer#prime?
Patch by Nick Slocum [Bug #10354]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-20 03:18:14 +00:00
akr 89db37cf77 * lib/open-uri.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 12:17:52 +00:00
akr 3d61b259ff * lib/securerandom.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 03:58:34 +00:00
kosaki 3a49d35352 * lib/mkmf.rb: Good-by Borland-C (cont).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 02:17:46 +00:00
kosaki 4ad2057f27 * ChangeLog: Good-bye OS/2.
* common.mk: ditto.
* configure.in: ditto.
* dln_find.c: ditto.
* ext/Setup.emx: ditto.
* ext/extmk.rb: ditto.
* ext/socket/extconf.rb: ditto.
* ext/zlib/extconf.rb: ditto.
* file.c: ditto.
* include/ruby/defines.h: ditto.
* io.c: ditto.
* lib/mkmf.rb: ditto.
* missing/os2.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* NEWS: announce OS/2 is no longer supported.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:18:34 +00:00
eregon 3bf9b2f047 * lib/ostruct.rb: Finish defining OpenStruct attributes lazily.
Patch by @sferik in [GH-1037]: https://github.com/ruby/ruby/pull/1037
  This commit is an addendum to https://github.com/ruby/ruby/pull/1033.
  It:
  1. lazily defines attribute accessors for copied and marshaled objects,
  2. returns nil when an attribute reader is not defined, and
  3. defines respond_to_missing? to maintain the same respond_to? behavior

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 16:57:21 +00:00
hsbt c4ccdd6471 * lib/racc/rdoc/grammar.en.rdoc: fix spell error.
[fix GH-1053][ci skip] Patch by @Matrixbirds

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 04:37:31 +00:00
shugo 3e70f44ae9 * lib/net/ftp.rb (parse257): refactor.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 08:29:36 +00:00
shugo 5a0f41a588 * lib/net/imap.rb: use frozen_string_literal: true.
* test/net/imap/test_imap.rb: ditto.

* test/net/imap/test_imap_response_parser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 07:42:34 +00:00
shugo ae6555aa25 * lib/net/ftp.rb: use frozen_string_literal: true.
* test/net/ftp/test_buffered_socket.rb: ditto.

* test/net/ftp/test_ftp.rb: ditto.

* test/net/ftp/test_mlsx_entry.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 07:28:10 +00:00
akr 83da44790b * lib/tmpdir.rb (Dir.tmpdir): return duplicated string to be
modify safely even when $SAFE > 0.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-06 12:40:41 +00:00
akr 36ca18b847 Put an line before "frozen_string_literal: true" for emacs.
https://bugs.ruby-lang.org/issues/8976#note-49


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-05 22:22:56 +00:00
akr 805c20a8e5 * lib/pp.rb: Use frozen_string_literal: true.
* lib/prettyprint.rb: Ditto.

* lib/resolv.rb: Ditto.

* lib/tmpdir.rb: Ditto.

* test/test_pp.rb: Ditto.

* test/test_prettyprint.rb: Ditto.

* tool/transcode-tblgen.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-05 13:27:48 +00:00
duerst ae8c13f517 common.mk, lib/unicode_normalize/tables.rb: Change Unicode
Version for character normalization data from 7.0.0 to 8.0.0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-02 00:20:23 +00:00
nobu a136301dea unicode_norm_gen.tmpl: end marker
* template/unicode_norm_gen.tmpl: pragma needs the end marker too,
  not only the beginning marker.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-29 08:00:36 +00:00
duerst 1fb502caca tool/unicode_norm_gen.tmpl, lib/unicode_normalize/tables.rb:
get rid of many .freeze commands by using frozen_string_literal
pragma.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-29 07:54:05 +00:00
shugo 275b38937e * lib/net/ftp.rb (mtime): use usec instead of fractions to parse
decimal fractions of a second correctly when the number of digits
  is not 6.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-28 08:43:44 +00:00
shugo 040ae91040 * lib/net/ftp.rb (mtime): parse decimal fractions of a second as
specified in RFC 3659.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-28 07:10:25 +00:00
nobu b1cfb98e9e ostruct.rb: fix NameError
* lib/ostruct.rb (delete_field): do not raise NameError for
  existing keys.  [Fix GH-1033]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-26 23:16:37 +00:00
zzak 7fa2155805 * lib/ostruct.rb: Move method definitions for getter/setter to be lazy
Patch by @sferik in [GH-1033]: https://github.com/ruby/ruby/pull/1033

Instead of defining two methods -- a reader and writer -- for each
OpenStruct attribute when it is initialized, define them lazily, the
first time either one is called. This adheres to the principle of "pay for
use": methods that are never accessed are never defined. This optimization
makes initialization an order of magnitude faster for objects with 100
attributes. In the worst-case scenario, where every attribute is accessed,
performance is no worse than it is today.

Benchmark
---------
require 'benchmark/ips'
require 'ostruct'

N = 100
ATTRS = (:aa..:zz).take(N)
HASH = Hash[ATTRS.map { |x| [x, x] }]

def ostruct
  OpenStruct.new(HASH)
end

Benchmark.ips do |x|
  x.report('ostruct') { ostruct }
end

-------------------------------------------------
   before       2.279k (± 8.8%) i/s -     11.395k
   after       24.702k (±12.8%) i/s -    122.600k
-------------------------------------------------


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-26 16:05:52 +00:00
hsbt 08b54fbd0d * lib/net/http.rb: removed unused variable. It's removed at r13648.
[fix GH-1022] Patch by @nkondratyev

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-25 01:07:30 +00:00
shugo 5425099a9f * lib/net/ftp.rb (parse_mlsx_entry): parse pathnames including
space correctly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-14 10:27:28 +00:00
nobu 07dafa350f Fix typo in racc english documentation [ci skip]
* lib/racc/rdoc/grammar.en.rdoc: [DOC] fix typo, "convertion" to
  "conversion".  [Fix GH-1016]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-14 02:12:12 +00:00
shugo ca48cc4ad5 * lib/net/ftp.rb (size, modify, create, type, unique, perm, lang,
media_type, charset): new methods to return standard facts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-13 00:47:01 +00:00
svn 520796770e * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 14:12:19 +00:00
shugo 2478c7bc33 * lib/net/ftp.rb (file?, directory?, appendable?, creatable?,
deletable?, enterable?, renamable?, listable?, directory_makable?,
  purgeable?, readable?, writable?): new methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 14:09:45 +00:00
shugo 2ec793ab27 * lib/net/ftp.rb (FACT_PARSERS): support system dependent facts
UNIX.mode, UNIX.owner, UNIX.group, UNIX.ctime, and UNIX.atime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 12:29:32 +00:00
shugo 777c719450 * lib/net/ftp.rb (parse_mlsx_entry, mlst) raise an FTPProtoError
when parsing failed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-12 09:16:21 +00:00