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

41213 Коммитов

Автор SHA1 Сообщение Дата
nobu a01b6453eb Rename DOTQ to ANDDOT
* defs/id.def, parse.y: Switch internal token name to reflect
  current form of safe-call operator.  [Fix GH-1090]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 09:42:27 +00:00
nobu 16e7869ded hash.c: use rb_func_proc_new
* hash.c (rb_hash_to_proc): use rb_func_proc_new to make light
  weight proc.  [Feature #11653]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 09:25:58 +00:00
nobu bda0e2fd84 proc.c: cfunc_proc_t
* proc.c (cfunc_proc_t): add room for me.
* proc.c (cfunc_proc_new): generalise for cfunc proc without env.
* proc.c (rb_func_proc_new, rb_func_lambda_new): new functions to
  make proc/lambda without env from cfunc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 09:24:41 +00:00
nobu a56b0f8b29 bm_hash_to_proc.rb
* benchmark/bm_hash_to_proc.rb: benchmark for Hash#to_proc.
  [Feature #11653]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 09:22:37 +00:00
ngoto b935a13ba5 * bootstraptest/test_fork.rb ([ruby-dev:37934]): :NPROC (RLIMIT_NPROC)
is not supported on some platforms (e.g. Solaris 10).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 08:50:06 +00:00
nobu fbe967ec02 hash.c: to_proc
* hash.c (rb_hash_to_proc): new method Hash#to_proc.
  [Feature #11653]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 07:57:17 +00:00
naruse 911b1c6b06 * time.c (rb_time_timespec_new): swap utc and localtime
to generate gmt flag by INT_MAX - gmtoff.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 05:36:47 +00:00
nobu d68c3ecf98 hash.c: compare methods
* hash.c (rb_hash_{le,lt,ge,gt}): new methods, Hash#<=, Hash#<,
  Hash#>=, Hash#>, to test if all elements of a hash are also
  included in another hash, and vice versa.
  [ruby-core:68561] [Feature #10984]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 05:02:02 +00:00
nobu f11a85c726 compile.c: peephole
* compile.c (iseq_peephole_optimize): remove putting object to be
  popped just soon.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 03:45:10 +00:00
nobu f12746d165 rbi
.gdbinit (rbi): show the content of LINK_ELEMENT*.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 03:36:08 +00:00
usa 7b8986f445 * lib/drb/drb.rb: revert r52442 because it was for debugging, and after this
target problem was misteriously disappeared.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 03:08:41 +00:00
naruse f1df08e76d * time.c (rb_timespec_now): added.
* time.c (rb_time_timespec_new): added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 02:59:47 +00:00
naruse 1ed3287af1 Add a trick to pending for r52509
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 02:25:52 +00:00
akr 84694f3d9b add message for assert_equal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 22:25:10 +00:00
normal 64c08dafe2 variable.c (rb_autoload_load): allow recursive calls
* variable.c (rb_autoload_load): allow recursive calls
  [ruby-core:71345] [Bug #11658]
* test/ruby/test_autoload.rb (test_autoload_while_autoloading):
  new test by: Hiroshi Shirosaki <h.shirosaki@gmail.com>
  [ruby-core:71390]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 21:18:42 +00:00
naruse 2b15d16987 fix comment: tobj->gmt is 0:localtime 1:utc 2:fixoff 3:init
see also TIME_UTC_P and TIME_LOCALTIME_P

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 17:18:35 +00:00
akr 13a31356d8 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 15:57:07 +00:00
akr 60055f8dfd * lib/resolv.rb (Resolv::DNS::Message::MessageEncoder#put_labels):
Prevent overflow of pointer to labels.
  Patch by Hannes Georg.  [ruby-core:71248] [Bug #11632]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 15:37:04 +00:00
svn a3e4d6a56e * 2015-11-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 15:27:46 +00:00
ktsj 7ecf28cae3 * gems/bundled_gems: update to power_assert 0.2.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 15:27:16 +00:00
nobu 748abedf9b vm_eval.c: rb_check_funcall_default
* vm_eval.c (rb_check_funcall_default): split from
  rb_check_funcall to return the given fallback value.
* object.c (rb_obj_dig): use rb_check_funcall_default so that tail
  call optimization will be possible.  [Feature #11643]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 12:48:20 +00:00
nobu 29862685c0 dig
* array.c (rb_ary_dig): new method Array#dig.
* hash.c (rb_hash_dig): new method Hash#dig.
* object.c (rb_obj_dig): dig in nested arrays/hashes.
  [Feature #11643]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 12:27:26 +00:00
yuki 50dbcf5f6d * gems/bundled_gems: Upgrade the did_you_mean gem to 1.0.0.beta3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 09:02:32 +00:00
hsbt ece64610d3 * test/runner.rb: use official repository for coverage tool.
* Makefile.in: ditto.
* common.mk: ditto.
* .gitignore: ignored third party repositories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 08:38:20 +00:00
shugo 0303a45d03 * compile.c (iseq_compile_each): Dynamic string literals should be
frozen.
  [ruby-core:57574] [Feature #8976]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 08:32:37 +00:00
hsbt 863396a5fe * common.mk: Use ruby organization url for simplecov repository.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-09 06:56:36 +00:00
svn f3cafab56a * 2015-11-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 15:13:35 +00:00
kazu a110b0d7b6 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 15:13:18 +00:00
nobu 12c244d347 hash.c: fix oob access
* hash.c (rb_hash_default): do not access argv when no arguments
  is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 08:32:51 +00:00
nobu 1803427660 symbol.c: rb_cstr_intern
* symbol.c (rb_cstr_intern): new function to make Symbol object
  like as rb_str_intern() but from pointer to the name, its length
  and its encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 07:46:39 +00:00
glass bdc2876597 * NEWS: describe addition of File::TMPFILE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 07:27:25 +00:00
nobu 859314cbc6 bigdecimal.c: suppress warnings
* ext/bigdecimal/bigdecimal.c (AddExponent): suppress
  strict-overflow warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 06:29:13 +00:00
glass 1a98b567af * file.c: Add O_TMPFILE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 06:26:44 +00:00
nobu 6e19fc30b1 suppress warnings
* ext/date/date_parse.c (date_zone_to_diff): suppress parentheses
  warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 05:54:29 +00:00
nobu 0d65138c81 method.h: suppress warnings
* method.h (METHOD_ENTRY_{VISI,BASIC,FLAGS}_SET): suppress
  shift-op-parentheses warnings.  [Fix GH-1082]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 05:24:45 +00:00
nobu eb28bd8057 io.c: [DOC] IO#gets [skip ci]
* io.c (rb_io_gets_m): [DOC] add example using limit argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 05:08:03 +00:00
nobu fdc4f68f90 test_gdbm.rb: typo
* test/gdbm/test_gdbm.rb (teardown): fix instance variable name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 05:06:22 +00:00
hsbt 3b3c323798 * ext/psych/psych_emitter.c: bakcport 5bd7744 from tenderlove/psych.
support backword compatibility of Ruby 2.0

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 05:01:33 +00:00
nobu 86eda6244d io.c: [DOC] IO#gets [skip ci]
* io.c (rb_io_gets_m): [DOC] fix class name and reword as
  "multibyte".  [Fix GH-1085]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 02:08:57 +00:00
nobu 965e9df380 io.c: [DOC] IO#gets [skip ci]
* io.c (rb_io_gets_m): Update IO#gets doc for characters more than
  1 byte.  [Fix GH-1085]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 01:55:14 +00:00
hsbt baddc0cbf9 * lib/uri/ftp.rb: fix a typo.
[fix GH-1084][ci skip] Patch by @windwiny

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08 01:38:06 +00:00
ko1 1dd547fe5a * vm_trace.c (exec_hooks_precheck): check need_clean everytime
to clean-up unused hooks.

* vm_trace.c (list->need_clean): use as boolean value.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 23:10:55 +00:00
nobu d7924abf5d common.mk: update dependency
* common.mk: update dependency of string.o to id.h for r52479.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 18:48:33 +00:00
svn ce8ec0c91f * 2015-11-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 16:49:47 +00:00
naruse 52e1c3b0ab * lib/net/http.rb (Net::HTTP#initialize):
default value of Net::HTTP#open_timeout is now 60 (was nil).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 16:48:49 +00:00
normal f9806460e9 string.c: use predefined IDs for minor bloat reduction
* string.c (id_to_s): remove redundant variable
  (rb_obj_as_string): trade id_to_s for idTo_s
  (rb_str_equal): replace rb_intern(...) with pre-defined ID
  (rb_str_cmp_m): ditto
  (rb_str_match): ditto
  (str_upto_each): ditto
  (rb_str_sum): ditto
  (Init_String): remove id_to_s initialization

This leads to a minor size reduction on my x86 (32-bit) system:

   text	   data	    bss	    dec	    hex	filename
 129373	      8	     32	 129413	  1f985	string.o-orig
 129082	      8	      8	 129098	  1f84a	string.o

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 03:18:58 +00:00
normal d79891c2ef thread.c (rb_cThreadShield): make static
Nothing outside of thread.c accesses this variable, so avoid
cluttering up the global namespace with it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 02:40:33 +00:00
svn 0587f3011b * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 00:55:22 +00:00
ko1 2d4bc584ee * vm_trace.c (rb_threadptr_exec_event_hooks_orig):
maintain trace_running counter on internal events.

  This patch is made by Takashi Kokubun <takashikkbn@gmail.com>.
  [Bug #11603] https://github.com/ruby/ruby/pull/1059




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 00:55:11 +00:00
nobu 9d0012b0e7 console.c: check unused args
* ext/io/console/console.c (console_set_winsize): unused arguments
  also should be nil or integers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-07 00:25:50 +00:00