binary data.
* test/openssl/test_ssl.rb: Add test for it.
Thanks to Niklas Baumstark for reporting the issue!
[Ruby 1.9 - Bug #5233] [ruby-core:39120]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
sigil of global, instance and class variable names should be
followed by non-numeric.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
raise_method_missing().
* vm_eval.c (send_internal): remove inadvertent symbol creation
from public_send. based on a patch by Jeremy Evans <code AT
jeremyevans.net> in [ruby-core:38576]. [Feature #5112]
* vm_insnhelper.c (vm_call_method): remove inadvertent symbol
creation from send and __send__, too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[ruby-core:35753] [Bug #4576]
* numeric.c (ruby_float_step): correct the error of floating point
numbers on the excluding case.
patched by Masahiro Tanaka [ruby-core:39608]
* numeric.c (ruby_float_step): use the end value when the current
value is greater than or equal to the end value.
patched by Akira Tanaka [ruby-core:39612]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Reported by Christopher Eberz. [ruby-core:39903] Bug #5399
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml`
in order to avoid YAML::ENGINE switching from replacing this method.
* test/psych/helper.rb: fix tests for method name change.
* test/psych/test_document.rb: ditto
* test/psych/visitors/test_emitter.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
floating point spec defined in YAML to avoid erronious parses.
* test/psych/test_numeric.rb: corresponding test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
if -w/-v options are specified. these messages are output to stderr,
not to stdout. [ruby-core:39795] [Bug #5380]
* test/ruby/test_gc.rb (test_gc_parameter): add test for it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
heap slots are expanded by environment variable RUBY_HEAP_MIN_SLOTS.
[ruby-core:39777] [Bug #5380]
* test/ruby/test_gc.rb (test_gc_parameter): add test for it.
* test/ruby/envutil.rb (assert_normal_exit): add :child_env option to
enable pass environemnt variables to child process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
element after string element. [ruby-core:39776] [Bug #5379]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fed arbitrary string values.
Clearly distinguish between the cases "universal, infinite and
not a SEQUENCE or SET" and "universal SEQUENCE or SET, possibly
infinite". Raise error for universal tags that are not infinite.
* test/openssl/test_asn1.rb: add a test for this.
Thanks to Hiroshi Yoshida for reporting this bug.
[Bug #5363] [ruby-dev:44542]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/psych/test_yamldbm.rb: add test for Psych::DBM.
* test/psych/test_yamlstore.rb: add test for Psych::PStore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
only for OpenSSL versions >= 0.9.8k. Thanks, Eric Wong, for
reporting this.
[Bug #4961] [ruby-core:37726]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_ctx_server_session_cb. Thanks to Eric Wong for the patch.
[Bug #5336] [ruby-core:39619]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
On NetBSD, if it uses patented algorithms without explicit option,
openssl will abort.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Without this, the connection will be alive without GC after exit
the block and the test will fail as "TCPServer was closed and SSLServer
is still alive" on 64bit Unix: at least CentOS, Ubuntu, and FreeBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
select() with timeout may return early in old Linux kernels
with 250 Hz tickrate and no dynticks, so skip everything older
than 2.6.32 (which has long term support).
And, Make the timing assertions consistently use assert_operator with
timing difference in error message
Patch by Eric Wong. [Bug #5335] [ruby-core:39618]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
singleton object to. a patch by Satoshi Shiba <shiba AT rvm.jp>
at [ruby-dev:44460]. [Bug #5274]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
that checks in core would work. [ruby-core:39591] [Bug #5331]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
modification of rb_thread_fd_select().
based on a patch by Eric Wong. [Bug #5306] [ruby-core:39435]
* thread.c (rb_fd_rcopy): New. for reverse fd copy.
* test/-ext-/old_thread_select/test_old_thread_select.rb
(test_old_select_false_positive): test for bug5306.
* ext/-test-/old_thread_select/old_thread_select.c (fdset2array):
New. convert fdsets to array.
* ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
return 'read', 'write', 'except' argument of rb_thread_select()
to ruby script.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
NoMemoryError is raised in MiniTest#exception_details where exception
is made, and no effect. Run GC.start before running to keep the room.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
`require` because if run test-all with test/unit parallel
running, sometimes this test fails by some constants not found.
The error reason is some worker doesn't require the file needed by
this test. This issue is related to [ruby-core:36168].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
allow a single hyphen in comment. [Bug 5278]
Reported by Thomas Fritzsche. Thanks!!!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
default_tls_port, default_ssl_port, default_imaps_port):
added methods for consistency with Net::POP.
based on the patch by art lussos. [ruby-core:38997] [Bug #5198]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
add a test. Unlike TestThread#test_no_valid_cfp,
this test succeeds even if win32ole is required (see r33153).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ancestors only when global scope. [ruby-core:39227] [Bug #5264]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
which prefixes an non-ascii character, which has no escape
syntax. [ruby-core:39222] [Ruby 1.9 - Bug #5262]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
also inherited constants for classes without superclass and
modules. [ruby-core:37698] [Bug #3423]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
t = Thread.new { print "."; sleep 0.1 }
key = OpenSSL::PKey::RSA.new(2048)
#=> Thread t works in parallel with public key generation if
OS/machine allows it.
This works with OpenSSL >= 0.9.8. From this version, it has new
public key generation function which allows us to interrupt the
execution while pkey generation iterations.
* ext/openssl/extconf.rb: Check existence of OpenSSL's new public key
generation function. (DH_generate_parameters_ex,
DSA_generate_parameters_ex and RSA_generate_key_ex.
* ext/openssl/ossl_pkey.{h,c} (ossl_generate_cb_2,
ossl_generate_cb_stop): Added new callback function for OpenSSL pkey
generation which handles Thread interruption by Ruby.
ossl_generate_cb_stop is the unblock function(ubf) for Ruby which
sets a stop flag. New pkey generation callback ossl_generate_cb_2
checks the stop flag at each iterations of OpenSSL and interrupts
pkey generation when the flag is set.
* ext/openssl/ossl_pkey_dsa.c (dsa_generate): Call
rb_thread_blocking_region with the above unblock function to release
GVL while pkey generation.
* ext/openssl/ossl_pkey_rsa.c (rsa_generate): ditto.
* ext/openssl/ossl_pkey_dh.c (dh_generate): ditto.
* test/openssl/test_pkey_{dh,dsa,rsa}.rb: Test it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
win32ole is required. in such case, win32ole redefines
Thread#initialize, and the block argument becomes to be not the top
of the thread, then this testcase always fails.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
committed in r33144. I'd misunderstood the spec of ruby's universal
newline.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(TestOldThreadSelect#test_old_select_read_timeout): if the machine
is fast enough, the time used by code around IO.select may be smaller
than Time implement threshold.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
typo.
* test/-ext-/old_thread_select/test_old_thread_select.rb
(TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead
of SIGUSR1 because the former is general and the latter is platform
dependent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_thread_fd_select(). old one is EINTR unsafe.
Patch by Eric Wong. [Bug #5229] [ruby-core:39102]
* test/-ext-/old_thread_select/test_old_thread_select.rb:
a testcase for rb_thread_select().
* ext/-test-/old_thread_select/old_thread_select.c: ditto.
* ext/-test-/old_thread_select/depend: ditto.
* ext/-test-/old_thread_select/extconf.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
bitwise arithmetic with a Fixnum. #1792
* test/ruby/test_fixnum.rb: add tests for the above change.
* bignum.c (bit_coerce): A Fixnum and a Bignum are only permitted for
bitwise arithmetic with a Bignum. #1792
* test/ruby/test_bignum.rb: add tests for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
the encoding of the format. On Windows (at least Japanese Windows),
Time#strftime("%Z") includes non ASCII in locale encoding (CP932).
So convert locale to default internal. [ruby-core:39092] [Bug #5226]
* strftime.c (rb_strftime): ditto.
* strftime.c (rb_strftime_timespec): ditto.
* internal.h (rb_strftime_timespec): follow above.
* time.c (rb_strftime_alloc): ditto.
* time.c (strftimev): ditto.
* time.c (time_strftime): ditto.
* time.c (time_to_s): the resulted string of Time#to_s is always
ascii only, so this should be US-ASCII.
* time.c (time_asctime): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
What's the problem?
autoload is thread unsafe. When we define a constant to be
autoloaded, we expect the constant construction is invariant. But
current autoload implementation allows other threads to access the
constant while the first thread is loading a file.
What's happening inside?
The current implementation uses Qundef as a marker of autoload in
Constant table. Once the first thread find Qundef as a value at
constant lookup, it starts loading a defined feature. Generally a
loaded file overrides the Qundef in Constant table by module/class
declaration at very beginning lines of the file, so other threads
can see the new Module/Class object before feature loading is
finished. It breaks invariant construction.
How to solve?
To ensure invariant constant construction, we need to override
Qundef with defined Object after the feature loading. For keeping
Qundef in Constant table, I expanded autoload_data struct in
Module to have a slot for keeping the defined object while feature
loading. And changed Module's constant lookup/update logic a
little so that the slot is only visible from the thread which
invokes feature loading. (== the first thread which accessed the
autoload constant)
Evaluation?
All test passes (bootstrap test, test-all and RubySpec) and added
8 tests for threading behavior. Extra logics are executed only
when Qundef is found, so no perf drop should happen except
autoloading.
* variable.c (rb_autoload): Prepare new autoload_data struct.
* variable.c (rb_autoload_load): Load feature and update Constant
table after feature loading is finished.
* variable.c (rb_const_get_0): When the fetched constant is under
autoloading, it returns the object only for the thread which starts
autoloading.
* variable.c (rb_const_defined_0): Ditto.
* variable.c (rb_const_set): When the specified constant is under
autoloading, it sets the object only for the thread which starts
autoloading. Otherwise, simply overrides Qundef with constant
override warning.
* vm_insnhelper.c (vm_get_ev_const): Apply same change as
rb_const_get_0 in variable.c.
* test/ruby/test_autoload.rb: Added tests for threading behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
creating ruby-format gemspecs. Fixes Gem.dir not being at the front
of Gem.path to fix uninstall and cleanup commands. Fixes gem
uninstall stopping on the first missing gem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
should be manipulated because master pty may not be a tty on some
environment (e.g. Solaris). [Bug:#5222] [ruby-dev:44420]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
A patch by Magnus Holm <judofyr@gmail.com>. Thanks!
* test/ruby/test_variable.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
HTTPS image paths to be turned into <img> tags. Prevents special
markup inside <tt> from being processed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
line is out of the way. rb_sourceline() is unreliable when source
code is big. [ruby-dev:44413]
* test/coverage/test_coverage.rb: add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
gzip header is readable to avoid SEGV.
* test/zlib/test_zlib.rb (test_corrupted_header): Test it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_method.rb (test_body): add a test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
is explicitly given as a buffer ([Bug #5207]), otherwise set the
encoding. also removed dead code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
connection is closed. based on the patch by Hugo Barauna.
[Bug #5190] [ruby-core:38930]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
based on the patch by art lussos. [Bug #5163] [ruby-core:38820]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
into Complex if the argument is a Complex with non-zero imaginary
part. [Bug #5020] [ruby-dev:44088]
* test/ruby/test_rational.rb (test_coerce): test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/openssl/test_ssl.rb: Add a test for it.
Thanks to Eric Wong for the patch.
[Ruby 1.9 - Feature #5183] [ruby-core:38911]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
namespace by Commands. Remove unused variable and debugging
statement in tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
imaginary part is exactly zero. The patch is made by Marc-Andre
Lafortune. fixes [Bug #5178] [ruby-core:38885]
* test/ruby/test_complex.rb (test_rationalize): add a test for the
above change.
* complex.c (nucomp_to_r): fix RDoc comment. The patch is made by
Marc-Andre Lafortune.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc
and libm version numbers for detecting default libc and libm.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Patch by Nobuyoshi Nakada. [Bug #4457] [ruby-dev:43285]
* test/ruby/test_time.rb (class TestTime): add a test for the
above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Added missing require for `gem uninstall --format-executable`.
The correct name of the executable being uninstalled is now displayed
with --format-executable.
Fixed `gem unpack uninstalled_gem` default version picker.
RubyGems no longer claims a nonexistent gem can be uninstalled.
`gem which` no longer claims directories are requirable files.
`gem cleanup` continues cleaning up gems if one can't be uninstalled
due to permissions. Issue #82.
Gem repository directories are no longer created world-writable.
Patch by Sakuro OZAWA. [Ruby 1.9 - Bug #4930]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
OpenBSD seems not to detach the controlling terminal, when the
argument noclose is non-zero. ref: [Bug #5135]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
'BindAddress: var' => ':BindAddress => var' according to other configurations.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
[Bug #5153] [ruby-core:38736]
* io.c (argf_next_argv): remove the call of above function.
* ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test
extension module because this is only for testsing ruby_add_suffix().
* LEGAL: remove the mention about a part of util.c, because now we
removed the part.
* io.c (argf_next_argv): now the new filename is not guranteed to
use, so should check the return value of rename(2).
* test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible):
now we expect same result with other platforms on no_safe_rename
platforms (=Windows).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
If you connect to localhost, you should listen localhost.
* test/net/http/test_https.rb (TestNetHTTPS#test_timeout_during_SSL_handshake):
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
XMLRPC::Client.new3(), when called without host: argument, tries
to connect to a host where "localhost" resolves to. On the
other hand a WEBrick::HTTPServer.new(), when called without
BindAddress: argument, tries to listen all the address where
getaddrinfo(AF_UNSPEC) resolves to. This is a mismatch because
"localhost" might not resolve to one of those listening sockets.
We would better explicitly specify "localhost" here and if
failed, just skip the whole test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
SEGV from AES encryption/decryption. Processing data by
Cipher#update without initializing key (meaningless usage of Cipher
object since we don't offer a way to export a key) could cause SEGV.
In OpenSSL, the EVP which has EVP_CIPH_RAND_KEY flag (such as DES3)
allows uninitialized key, but other EVPs (such as AES) does not
allow it. Calling EVP_CipherUpdate() without initializing key causes
SEGV so we set the data filled with "\0" as the key by default. See
#2768.
* test/openssl/test_cipher.rb: test it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
workaround to mark wrapped object. this is not a true fix,
because [Bug #4929] is caused by the interface design of DL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
remove an assertion depending on default respond_to_missing?.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
patched by Jeremy Evans [ruby-core:38530] see #5097
* test/ruby/test_process.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
add local variables to protect objects from GC. [ruby-dev:44253]
[Bug #5104]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
lib/rubygems/requirement.rb defines YAML::Syck.
So explicitly specify the top level one.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
NameError for undefined method.
* load.c (rb_mod_autoload_p), object.c (rb_mod_const_get),
variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c
(rb_mod_{remove,undef,alias}_method, set_method_visibility):
remove inadvertent symbol creation. based on the first patch by
Jeremy Evans at [ruby-core:38447]. [Feature #5089]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
case. based on the patch by Jeremy Evans at [ruby-core:38417].
[Feature #5072]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
zero or negative precision is error. fixes#5098.
[ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
specifying precision. fixes#5098. [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for symmetry to BigDecimal() function with an Integer.
fixes#5098. [ruby-dev:44210]
* test/bigdecimal/test_bigdecimal_util.rb: add test for the above
change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
for adapting other Numeric subclasses. [ruby-dev:44245]
* test/bigdecimal/test_bigdecimal_util.rb: test for the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
a BigDecimal.
* bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new
BigDecimal from another BigDecimal using BigDecimal global function
or constructor. [ruby-dev:44245]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
'Basic' header. Long username caused the base64 String truncation in
HTTP header which is not allowed. See #5046.
* test/xmlrpc/test_webrick_server.rb: test it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
with the name string but not ID.
* object.c, proc.c, variable.c: more removal of inadvertent symbol
creation. [Feature #5079]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
directory. Current directory is not the top source directory when
the building process runs on other than there.
* test/rake/test_rake_rake_test_loader.rb: ditto.
* test/rake/test_rake_task_argument_parsing.rb
(test_terminal_width_using_hardcoded_80): hardcoded 80 is used
when app.unix? is false.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
avoid inadvertent symbol creation in reflection methods. based
on a patch by Jeremy Evans at [ruby-core:38367]. [Feature #5072]
* vm_method.c (rb_mod_method_defined)
(rb_mod_{public,private,protected}_method_defined)
(obj_respond_to): ditto.
* parse.y (rb_check_id): new function returns already interned ID
or 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/openssl/test_engine.rb: Add a test for it.
Thanks to Ippei Obayashi for providing the patch.
[ Ruby 1.9 - Bug #5062 ] [ruby-dev:44173]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
state when set_trace_func hook is removed. This is workaround patch
to force to reset tracing state that is broken by continuation call.
a patch from James M. Lawrence. [Feature #4347] [ruby-core:34998]
* test/ruby/test_continuation.rb (class TestContinuation): add a test
for above. a patch from James M. Lawrence.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Allow HTTP/0.9 request which doesn't has any header or body.
patched by Felix Jodoin. [ruby-core:38040] [Bug #5022]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
FreeBSD (at least 7.2 to 7.2) calls nsdispatch(3) when it calls
getaddrinfo(3). And nsdispatch(3) doesn't call dlerror(3) even if
it calls _nss_cache_cycle_prevention_function with dlsym(3).
So our DL::Handle#sym must call dlerror(3) before call dlsym.
In general uses of dlerror(3) should call it before use it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/psych/lib/psych/visitors/to_ruby.rb: raise an exception when
deserializing an alias that does not exist.
* test/psych/test_merge_keys.rb: corresponding test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
trusted.
* struct.c (rb_struct_modify), time.c (time_modify): check by the
above function to show proper class names. [Bug #5036]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
extensions. Use this as the default for the tests to ensure
compatibility with OpenSSL 0.9.7.
[ Ruby 1.9 - Bug #4961 ] [ruby-core:37726]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The patch is made by Kazuki Tsujimoto. [Bug #5012] [ruby-dev:44071]
* test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass):
added a new test for eigenclass of time object.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Error caused by unalignment access on Sparc-Solaris (and possibly on
other similar environment.) This patch just do memcpy always instead
of checking architecture. I see no perf drop on my 64bit env. For
more details, see #4320.
* test/digest/test_digest.rb: add test for unalignment access.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
verify callback of SSLContext and X509Store and make the
verification fail normally. Raising exception directly from callback
causes orphan resouces in OpenSSL stack. Patched by Ippei Obayashi.
See #4445.
* test/openssl/test_ssl.rb
(test_exception_in_verify_callback_is_ignored): test it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
precision treatment errors.
* test/bigdecimal/test_bigdecimal.rb: add tests for the above change.
fix precision treatment errors.
* ext/bigdecimal/bigdecimal.c (BigDecimal_power): precision argument
should be optional for its compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
references. based on a patch by Michael Edgar michael.j.edgar
AT dartmouth.edu. Bug #5002
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e