summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-11* ext/extmk.rb: generates the rule for extinit.$(OBJEXT).yugui
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-11Fixes build failures on Portable Native Client.yugui
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-11compile.c: fix RB_GC_GUARD usagenormal
* 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-11string.c (rb_str_intern): remove unnecessary RB_GC_GUARDnormal
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-11parse.y: remove duplicate keysnobu
* 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-11vm.c: precedence of duplicated keysnobu
* 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-11parse.y: precedence of duplicated keysnobu
* 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-11configure.in: fix typonobu
* 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-11Support build for Portable Native Client outside of naclports tree.yugui
* 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* io.c: fix issues in the last two commits. don't disable cloexec foryugui
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-11Allow failure of sighandler installation on NativeClient.yugui
* 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-11Merges a patch form naclports.yugui
* 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: * https://chromium.googlesource.com/external/naclports.git/+/873ca4910a5f9d4206306aacb4ed79c587c6a5f3/ports/ruby/nacl.patch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-11* ext/socket/unixsocket.c: [DOC] Fix example to render in HTMLzzak
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-10* 2014-10-11svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10open-uri: accept :open_timeout optionnormal
* 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-10thread.c: fix for older gccnobu
* 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-10ruby/ruby.h: fix for older gccnobu
* 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-10ruby/ruby.h: eliminate disabled function callnobu
* 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-10io.c: fix typonobu
* 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-10Update doc. and warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10io.c: move RFile initializationnobu
* 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* 2014-10-10svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-10ruby/io.h: deprecate old macrosnobu
* 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-09* bignum.c (absint_numwords_generic): set an array element afterngoto
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-09tcltklib.c: typed datanobu
* 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-09internal.h: optimize rb_ary_new_from_argsnobu
* 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* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09st: test packed-to-unpacked transitions during iterationnormal
The st_foreach and st_foreach_check functions support transitioning from a packed to an unpacked state during iteration. However, this functionality did not get exercised by the current test suite until now. This should help us prevent breakage when making modifications to st. * ext/-test-/st/foreach/extconf.rb: new file * ext/-test-/st/foreach/foreach.c: ditto * test/-ext-/st/test_foreach.rb: ditto [Feature #10321] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09array.c: fix potential memory leaknobu
* array.c (ary_new): allocate buffer in heap after new object get allocated successfully, to get rid of potential memory leak at object allocation failure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09benchmark/bm_hash_aref_sym*.rb: force static symbolsnormal
Dynamic symbols hash more slowly because they need extra method dispatch in rb_any_hash. I am not sure if dynamic symbols are a realistic use case as hash keys, so this commit only restores performance when comparing against versions of Ruby which lack dsyms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09hash.c (rb_any_hash): remove unnecessary dsym checknormal
gcc (Debian 4.7.2-5) 4.7.2 on x86 generates smaller code this way, as it does not seem to be able to reuse the result of SPECIAL_CONST_P. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08missing/setproctitle.c: Avoid invalidating argv[1], argv[2], etc. until the ↵odaira
first call to Process.setproctitle, because the ps command of AIX refers to the argv array. [Bug #10090] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08* 2014-10-09svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08dir.c: fix rdoc [ci skip]nobu
* dir.c (dir_s_aref): fix rdoc. `Dir.glob` allows an array but `Dir[]` not. the former accepts an optional parameter `flags`, while the latter accepts arbitrary number of arguments but no `flags`. [ruby-core:65265] [Bug #10294] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08variable.c: use st_updatenobu
* variable.c (generic_ivar_set): use st_update to insert object which does not have generic instance variables yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08ext/win32ole/win32ole_variable.c: use typed data.suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08variable.c: use st_updatenobu
* variable.c (sv_i, cv_i): use st_update to insert non-existing entries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08constant.h: constant visibilitiesnobu
* constant.h (RB_CONST_PRIVATE_P, RB_CONST_PUBLIC_P): macros to predicate constant visibilities. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08ChangeLog: fix name and addressnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08* test/ruby/test_syntax.rb: added syntax tests of underscore arguments.hsbt
[Feature #10340][ruby-core:65496] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08mkmf.rb: translate to assemblernobu
* lib/mkmf.rb (create_makefile): add rules to translate to assembler sources. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07* lib/uri/generic.rb (URI#inspect): remove Object id.naruse
URI is considered that it doesn't require id. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07ext/etc/etc.c (etc_systmpdir): set default tmplen correctlynormal
Fixup r47826. This fixes the following test failure for me: TestRequire#test_tainted_loadpath [test/ruby/test_require.rb:331]: SecurityError expected but nothing was raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07* lib/matrix.rb: Add @- and @+ for Matrix and Vector.marcandre
patch by gogo tanaka [#10068] [#10069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07* NEWS: Move Matrix changes to the right placemarcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07normalize reference to Timeout::Errornormal
From: John Bachir <j@jjb.cc> * bootstraptest/test_io.rb (assert_finish): normalize rescue for Timeout::Error * lib/net/ftp.rb (Net#read_timeout): ditto for doc * lib/resolv.rb (Resolv::ResolvTimeout): ditto for subclass * lib/webrick/httprequest.rb (_read_data): ditto for rescue * sample/timeout.rb (p timeout): ditto for call * test/drb/drbtest.rb (test_06_timeout): ditto * test/ruby/test_readpartial.rb (test_open_pipe): ditto * test/thread/test_queue.rb (test_queue_thread_raise): ditto * thread.c (rb_thread_s_handle_interrupt): ditto for doc [ruby-core:65481] [misc #10339] TimeoutError is a legacy constant, Timeout::Error is the canonical constant. This patch normalizes all code and comments to reference Timeout::Error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07test/ruby/test_process.rb (TestProcess#test_setsid): AIX does not allow ↵odaira
Process::getsid(pid) when pid is in a different session git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding): On AIX, ↵odaira
locale_charmap is ISO-8859-1 with LANG=C. This means the source encoding of stdin is ISO-8859-1, so "invalid multibyte char" error does not occur git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07* lib/matrix.rb: Add Matrix#laplace_expansion.marcandre
patch by gogo tanaka [#10073] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07* 2014-10-08svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e