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

37230 Коммитов

Автор SHA1 Сообщение Дата
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
svn 9629e7efc1 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09 07:16:24 +00:00
normal f8b219e4d6 st: test packed-to-unpacked transitions during iteration
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-09 07:16:19 +00:00
nobu 4adfbab35c array.c: fix potential memory leak
* 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-09 04:35:12 +00:00
normal 098b0ba572 benchmark/bm_hash_aref_sym*.rb: force static symbols
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-09 03:44:12 +00:00
normal 3cb3966838 hash.c (rb_any_hash): remove unnecessary dsym check
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-09 03:39:02 +00:00
odaira f3754f57cb missing/setproctitle.c: Avoid invalidating argv[1], argv[2], etc. until the 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 22:31:53 +00:00
svn ecb57e4327 * 2014-10-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08 15:53:22 +00:00
nobu abafe3354f dir.c: fix rdoc [ci skip]
* 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-08 15:53:11 +00:00
nobu 26a29ffbed variable.c: use st_update
* 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-08 14:49:49 +00:00
suke b61cb94e94 ext/win32ole/win32ole_variable.c: use typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08 12:44:54 +00:00
nobu c8d7d587ac variable.c: use st_update
* 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-08 08:27:54 +00:00
nobu 02fe713b46 constant.h: constant visibilities
* 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-08 08:27:51 +00:00
nobu 1ba17d0e91 ChangeLog: fix name and address
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08 08:23:26 +00:00
hsbt 34b1a9913a * test/ruby/test_syntax.rb: added syntax tests of underscore arguments.
[Feature #10340][ruby-core:65496]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-08 07:36:52 +00:00
nobu c88c049ed1 mkmf.rb: translate to assembler
* 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-08 01:38:32 +00:00
naruse 6041af45a3 * lib/uri/generic.rb (URI#inspect): remove Object id.
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-07 22:48:06 +00:00
normal 7fcf57412a ext/etc/etc.c (etc_systmpdir): set default tmplen correctly
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 20:25:07 +00:00
marcandre a2ae7bccf8 * lib/matrix.rb: Add @- and @+ for Matrix and Vector.
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 20:18:35 +00:00
marcandre 49e9f4714e * NEWS: Move Matrix changes to the right place
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 20:16:55 +00:00
normal 9bb7dfa247 normalize reference to Timeout::Error
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-07 20:00:09 +00:00
odaira 554577015f test/ruby/test_process.rb (TestProcess#test_setsid): AIX does not allow 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-07 19:40:13 +00:00
odaira 185c85b26e test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding): On AIX, 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 19:33:48 +00:00
marcandre 56d5728589 * lib/matrix.rb: Add Matrix#laplace_expansion.
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 19:30:48 +00:00
svn 19a1257d6c * 2014-10-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 19:30:06 +00:00
marcandre eb9c3e7120 * lib/matrix.rb: Add Vector.basis.
Based on patch by gogo tanaka [#10072]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 19:29:53 +00:00
nobu 2ebafed88a signal.c: get rid of deadlock by discarded signals
* signal.c (rb_f_kill): get rid of deadlock as unhandled and
  discarded signals do not make interrupt_cond signaled.
  based on the patch by Kazuki Tsujimoto at [ruby-dev:48606].
  [Bug #9820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 14:40:16 +00:00
suke 1bb2721e4b ext/win32ole/win32ole_method.c: use typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 13:44:45 +00:00
suke ab73066cf3 ext/win32ole/win32ole_param.c: refactoring
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 12:47:58 +00:00
svn cfd359ca28 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 12:45:10 +00:00
suke abd783434a ext/win32ole/win32ole_method.c: refactoring. add
olemethod_data_get_struct to wrap Data_Get_Struct.
ext/win32ole/win32ole_method.h: ditto.
	
ext/win32ole/win32ole_param.c (oleparam_ole_param):
call olemethod_data_get_struct instead of Data_Get_Struct.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 12:44:53 +00:00
nobu aabdfeaca3 configure.in: remove arch options from CXXFLAGS
* configure.in (RUBY_UNIVERSAL_ARCH): remove arch options from
  CXXFLAGS, not only CFLAGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 02:28:13 +00:00
nobu f18065f469 etc.c: try confstr on Mac OS X
* ext/etc/etc.c (etc_systmpdir): try user temporary directory by
  confstr() on Mac OS X.
  c.f. http://www.opensource.apple.com/source/ruby/ruby-104/patches/ext_etc_etc.c.diff

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 02:17:10 +00:00
nobu 9b6a8da0eb configure.in: off_t for struct stat.st_size
* configure.in (struct stat.st_size): prefer off_t over int, long,
  and so on.  inspired by
  http://www.opensource.apple.com/source/ruby/ruby-104/patches/config.h.ed

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 01:48:18 +00:00
svn 8a0b7f6479 * 2014-10-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 01:37:54 +00:00
nobu 14ae8f6373 configure.in: fix quoting brackets
* configure.in (RUBY_UNIVERSAL_ARCH): fix missing quoting
  brackets.  incorporated from
  http://www.opensource.apple.com/source/ruby/ruby-104/patches/configure.diff

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-07 01:37:41 +00:00
suke a60c5a1945 ext/win32ole/win32ole_param.c: use typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-06 14:35:43 +00:00
nobu 0ca714fa1a symbol.h: move struct RSymbol
* symbol.h (struct RSymbol): move from internal.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-06 13:36:45 +00:00
usa 8474ebad8a * error.c: update exception tree. [DOC]
reported by @hemge via twitter.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-06 12:43:51 +00:00
odaira 01a7a62d2b configure.in: Fix typo. [Bug #9914]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-06 09:45:25 +00:00
nobu 998befe8e6 signal.c: send signal unless handled
* signal.c (rb_f_kill): should not ignore signal unless the
  default handler is registered.  [ruby-dev:48592] [Bug #9820]

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