* 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
* 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
* 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
* 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
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
* 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
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
* 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
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
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
* 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
* 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
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
* 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
* 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
* 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