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

37070 Коммитов

Автор SHA1 Сообщение Дата
akr 450307e383 * enum.c (nmin_run): max(n) and max_by(n) returns an array in
descending order.
  [ruby-core:65452] Suggested by David Grayson.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 16:30:07 +00:00
svn 63fa57e9ba * 2014-10-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 15:49:42 +00:00
nagachika 1f6fa3202d ChangeLog: fix a typo for r47897.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 15:49:38 +00:00
nobu f77d22d1fe common.mk: update-gems for older BASERUBY
* common.mk (update-gems): chdir to the target directory and then
  add the tool directory to load paths, for older BASERUBY.
  [Bug #10372][ruby-core:65630]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 11:44:50 +00:00
nobu caa54c1715 Revert r47899
* common.mk: $(srcdir)/../tool is an invalid path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 11:27:00 +00:00
hsbt 8d7fa2291c * lib/xmlrpc/parser.rb: added new parser class using libxml-ruby gem.
[Feature #9379][ruby-core:59633]
* lib/xmlrpc/config.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 08:53:16 +00:00
kazu 22e26d350a fix typo and spaces
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 08:08:26 +00:00
akr c66506ef24 * lib/find.rb (Find.find): Call to_path for arguments to obtain
strings.
  [ruby-core:63713] [Bug #10035] Reported by Herwin.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 07:34:23 +00:00
hsbt 89322aafb5 * common.mk: use relative load path for bundled_gems directory.
[Bug #10372][ruby-core:65630]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 06:42:33 +00:00
nobu 4a883ff9a8 parse.y: keep nodes linking
* parse.y (remove_duplicate_keys): should keep nodes linking not
  to be collected.  [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-13 00:40:32 +00:00
zzak d5526c660d * README.EXT: [DOC] fix example missing typedef with patch by
@steveklabnik [Fixes GH-739] https://github.com/ruby/ruby/pull/739

* README.EXT.jp: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 23:45:48 +00:00
normal eb5147779d array.c: swap volatile for RB_GC_GUARD
* array.c (ary_recycle_hash): add RB_GC_GUARD
  (rb_ary_diff): remove volatile
  [Bug #10369]

The RB_GC_GUARD seems needed for most of the ary_recycle_hash
functions anyways.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 21:53:01 +00:00
zzak 6769d5d5ac * ext/date/date_core.c: [DOC] Clean up whitespace, examples, and typos
in date_core based on a patch by @vipulnsward [Fixes GH-724]
  https://github.com/ruby/ruby/pull/724


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 18:21:41 +00:00
nobu 37d0c873f6 parse.y: should not eliminate value nodes
* parse.y (remove_duplicate_keys): should not simply eliminate all
  value nodes, which may have side effects.
  [ruby-core:65625] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 17:39:29 +00:00
svn 7fa39b2762 * 2014-10-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 17:35:39 +00:00
nobu cd55ddb03c .gdbinit: nd_tree
* .gdbinit (nd_tree): dump node tree by dump_node().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 17:35:25 +00:00
nobu e9c5e7625c proc.c: method body GC guard
* proc.c (rb_mod_define_method): guard method body to prevent its
  method entry from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 13:24:35 +00:00
zzak 13dd738d88 * vm.c: [DOC] fix typo by @yui-knk [Fixes GH-738]
https://github.com/ruby/ruby/pull/738


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 01:39:53 +00:00
akr 178bc9a0e7 * test/lib/test/unit.rb: Hide skips by default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 00:24:40 +00:00
yugui 8980a9b47b * file.c: include sys/time.h only if HAVE_SYS_TIME_H
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 16:39:15 +00:00
svn 23abeeb769 * 2014-10-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 15:13:37 +00:00
nobu 0d43e14841 file.c: fix compile error on Linux
* file.c (sys/time.h): include after unistd.h to get rid of
  mismatch on struct stat and some system call functions on Linux.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 15:13:24 +00:00
svn 0d1b2755f5 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 13:33:36 +00:00
yugui 916fff3b61 * file.c (HAVE_UTIMENSAT): disabled for NativeClient.
Fixes build error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 13:33:27 +00:00
yugui 4883d12552 * ext/extmk.rb: generates the rule for extinit.$(OBJEXT).
extinit.$(OBJEXT) used to be generated by the builtin rule, thus
  didn't accept custom $(CC) and caused linkage error for cross
  compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 13:33:19 +00:00
yugui 57bc5eaf2f Fixes build failures on Portable Native Client.
Note: Some of the fixes are for newlib in general but not NaCl-specific.

* include/ruby/intern.h (rb_fd_select): declare struct timeval, or the
  struct gets local to the function in C99.

* file.c (#include): add nacl/stat.h for PNaCl.
  (utimes): added a declaration for PNaCl.
  (stat_atimespec): stat::st_atimensec is long long but
  timespec::tv_nsec is long in PNaCl.
  (stat_mtimespec, stat_ctimespec): ditto.
  (rb_group_member): disable getgroups unless HAVE_GETGROUPS.
  (eaccess): unify the fallback to generic defined(USE_GETEUID).

* io.c: include sys/time.h for struct timeval.
  (rb_close_before_exec): nothing we can do if F_GETFD is not
  available.
  (ioctl): pnacl newlib actually doesn't have ioctl.

* process.c (maxgroups): it is used iff
   defined(_SC_NGROUPS_MAX) || defined(NGROUPS_MAX) but not
   defined(HAVE_GETGROUPS) || defined(HAVE_SETGROUPS).
  (obj2gid): fail unless the object is a Fixnum if getgrnam is not
  available.
  (disable_child_handler_fork_child): sigaction is not available in
  PNaCl newlib.

* configure.in (warnflags, strict_warnflags): avoid -ansi for strlcpy.
  (rb_cv_gcc_atomic_builtins): also check
  __atomic_or_etch because it is used in ruby_atomic.h.
  (rb_cv_gcc_sync_builtins): ditto.
  (HAVE_GETGRNAM): added.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 13:33:14 +00:00
normal 3fedb5128f compile.c: fix RB_GC_GUARD usage
* compile.c (iseq_build_from_ary_exception): move RB_GC_GUARD
  (iseq_build_from_ary_body): use PRIsVALUE instead of RB_GC_GUARD

Currently unused functions, but we should set good examples for
using RB_GC_GUARD (and favoring PRIsVALUE in format strings).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 06:33:58 +00:00
normal 58a73d96b4 string.c (rb_str_intern): remove unnecessary RB_GC_GUARD
Incorrectly placed, and no longer needed since r25351

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 06:02:42 +00:00
nobu 5fa4d56263 parse.y: remove duplicate keys
* parse.y (remove_duplicate_keys): remove duplicate literal keys,
  i.e., symbols and strings.  [ruby-core:65368] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 04:47:06 +00:00
nobu 8771d1a0fc vm.c: precedence of duplicated keys
* vm.c (kwmerge_i): override existing keys by new keys.
  [ruby-core:65368] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 04:46:56 +00:00
nobu 1571682719 parse.y: precedence of duplicated keys
* parse.y (assocs): concatenate splatted literal hashes.  the
  former key has precedence even if duplicated literal keys
  follow.  [ruby-core:65368] [Bug #10315]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 04:46:42 +00:00
nobu 81ce0e3853 configure.in: fix typo
* configure.in: remove extra right-bracket.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 03:57:46 +00:00
yugui 377ad103a1 Support build for Portable Native Client outside of naclports tree.
* configure.in (RUBY_NACL): automatically locate pnacl-clang.
  (RUBY_PLATFORM): pnacl instead of le32-nacl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 03:35:18 +00:00
yugui e4ac591a20 * io.c: fix issues in the last two commits. don't disable cloexec for
platforms other than NativeClient.
* ChangeLog: ditto. add entries for the last two commits.
Sat Oct 11 11:12:00 2014  Yuki Yugui Sonoda  <yugui@yugui.jp>

	* signal.c (install_signalhandler, init_sigchld): allow failure because it
	  always fails with ENOSYS on NaCl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 02:29:00 +00:00
yugui 1a14a7a1d7 Allow failure of sighandler installation on NativeClient.
* signal.c (install_signalhandler, init_sigchld): allow failure because it
  always fails with ENOSYS on NaCl.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 02:12:00 +00:00
yugui 69ac654c90 Merges a patch form naclports.
* configure.in (RUBY_NACL and others): Supports PNaCl.
* dln.c: replace the old hacky dynamic loading over HTTP with nacl_io.
* file.c: tenatively use access(2) instead of eaccess.
  (rb_file_load_ok): weaken with attribute but not by postprocess.
* io.c (socket.h): now NaCl has socket.h
  (flock): disable here instead of nacl/ioctl.h
* nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY):
  respect path to them if they are absolute.
  This helps naclports to build ruby in their source tree.
  (PROGRAM_NMF, .SUFFIXES): support .pnexe for PNaCl.
  (ruby.o, file.o): move the hack to attributes in ruby.c and file.c
* nacl/ioctl.h: removed. move the hack to io.c.
* nacl/nacl-config.rb: support arm, pnacl and others.
* nacl/pepper_main.c: support build in a naclports tree.
* ruby.c (rb_load_file): weaken with attribute but not by postprocess.

The patch is by sbc@google.com and the Native Client Authors.
It is available at:
* 873ca4910a/ports/ruby/nacl.patch

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 02:11:53 +00:00
zzak f21431e574 * ext/socket/unixsocket.c: [DOC] Fix example to render in HTML
properly, with a patch by @eval [Fixes GH-733]
  https://github.com/ruby/ruby/pull/733


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11 00:33:08 +00:00
svn b394484a9a * 2014-10-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 19:16:07 +00:00
normal 9559b04e3d open-uri: accept :open_timeout option
* lib/open-uri.rb (OpenURI::Options): add :open_timeout default
* (def OpenURI.open_http): check :open_timeout option
* (module OpenURI): rdoc for :open_timeout
* test/open-uri/test_open-uri.rb (test_open_timeout): new test
  [Feature #10361]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 19:15:56 +00:00
nobu adfce27ee0 thread.c: fix for older gcc
* thread.c (only_if_constant): get rid of __builtin_choose_expr()
  on older gcc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 14:31:37 +00:00
nobu 97d3b04c9b ruby/ruby.h: fix for older gcc
* configure.in (__builtin_choose_expr_constant_p): in gcc 4.8 or
  earlier, __builtin_choose_expr() does not consider
  __builtin_constant_p(variable) a constant expression.

* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): fix for older gcc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 14:20:20 +00:00
nobu 50b78ebb98 ruby/ruby.h: eliminate disabled function call
* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): eliminate function
  call for warning/error if not match to get rid of unconditional
  warning/error by a certain compiler option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 12:45:21 +00:00
nobu 12088a7e95 io.c: fix typo
* io.c (rb_io_make_open_file): remove useless backslash.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 11:26:22 +00:00
akr 5a77a4e71b Update doc. and warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 09:42:47 +00:00
nobu b44c47d102 io.c: move RFile initialization
* io.c (rb_io_make_open_file): move from include/ruby/io.h, and
  hide too detailed implementations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 02:34:24 +00:00
svn 0d3d17b907 * 2014-10-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 02:27:53 +00:00
nobu 91e305bcda ruby/io.h: deprecate old macros
* include/ruby/io.h (rb_io_mode_flags, rb_io_modenum_flags):
  deprecate old macros for compatibility for ruby 1.8 and older.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10 02:27:41 +00:00
ngoto 9631e3e788 * bignum.c (absint_numwords_generic): set an array element after
definition of a variable to fix compile error with older version
  of fcc (Fujitsu C Compiler) 5.6 on Solaris 10 on Sparc.
  [Bug #10350] [ruby-dev:48608]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09 14:36:35 +00:00
nobu a9c42d1026 tcltklib.c: typed data
* ext/tk/tcltklib.c (tcltkip_type): use typed data.

* ext/tk/tcltklib.c ({call,eval,invoke}_queue_handler): hide
  internal objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09 07:53:59 +00:00
nobu 795b8b474c internal.h: optimize rb_ary_new_from_args
* internal.h (rb_ary_new_from_args): optimization by expanding
  arguments in caller to get rid of va_list if possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09 07:53:54 +00:00