* variable.c (set_const_visibility): fail if the class/module is
frozen. [ruby-core:70828] [Bug #11532]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_str_setbyte): keep the code range as possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_rational.rb (test_conv): test for r51828,
encoding of exception message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
RFC 959 and 3659, where reply codes must be followed by SP.
* lib/net/ftp.rb (system): remove LF from the return value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (literal_concat_gen, evstr2dstr_gen): keep literal
encoding beginning with an interpolation same as the source file
encoding. [ruby-core:70703] [Bug #11519]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c (iseq_build_from_ary_body): register cdhash to the
iseq constant body instead of compile time mark array, not to
get GCed. [ruby-core:70708] [Feature #8543]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (rb_io_s_popen): do not wait the child process during being
killed. [ruby-core:70671] [Bug #11510]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
to allow other commands in the block. [Feature #11454]
Patched by Srikanth Shreenivas.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_execarg_parent_start1): raise with the target path
name when open() failed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_exec_fail): raise with the target directory name
when chdir() failed. pointed out by sorah.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/mkmf/test_framework.rb (test_single_framework): use Ruby
framework, as CoreFoundation framework uses Apple extensions
unsupported by standard GCC other than Apple-patched clang.
* test/mkmf/test_framework.rb (test_multi_frameworks): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (rb_realpath_internal): use filesystem encoding if the
argument is in ASCII encodings.
* win32/file.c (rb_readlink): needs the result encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
from an original class to a created (cloned) method entry.
* test/ruby/test_refinement.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/win32ole/test_win32ole_event.rb (exec_notification_query_async):
skip error with OLE error code:80041008, which seems to occur when
logging in as a non admistrator user.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
if the SSL library supports it. Thanks Kurt Roeckx <kurt@roeckx.be>
[Bug #11376]
* ext/openssl/extconf.rb: check for SSLv3 support in the SSL
implementation.
* test/openssl/test_ssl.rb (class OpenSSL): Skip tests that need SSLv3
if there is no support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/pathname/test_pathname.rb (has_symlink): now raises ENOENT
instead of TypeError when symlink is available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test (have_symlink?): try File.symlink with invalid paths to
test the administrator privilege, nil just raises an
ArgumentError before trying the actual API.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
SizedQueue#close(exception=false).
[Feature #10600]
Trying to deq from a closed empty queue return nil
if exception parameter equals to false (default).
If exception parameter is truthy, it raises
ClosedQueueError (< StopIteration).
ClosedQueueError inherits StopIteration so that you can write:
loop{ e = q.deq; (using e) }
Trying to close a closed queue raises ClosedQueueError.
Blocking threads to wait deq for Queue and SizedQueue will be
restarted immediately by returning nil (exception=false) or
raising a ClosedQueueError (exception=true).
Blocking threads to wait enq for SizedQueue will be
restarted by raising a ClosedQueueError immediately.
The above specification is not proposed specification, so that
we need to continue discussion to conclude specification this
method.
* test/thread/test_queue.rb: add tests originally written by
John Anderson and modify detailed behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/pathname/test_pathname.rb (test_realpath): skip EACCES if
changing mode of a directory may have no effect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fileutils/test_fileutils.rb (my_rm_rf): get rid of special
chars and remove by rmdir on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re.c (rb_memsearch_wchar, rb_memsearch_qchar): test matching
till the end of string. [ruby-core:70592] [Bug #11488]
* test/ruby/test_m17n.rb (test_include?, tet_index): add tests by
Tom Stuart.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string literals.
[Feature #11473]
This addition is not specification change, but to try frozen
string literal world discussed on [Feature #11473].
You can try frozen string literal world using this magical line:
RubyVM::InstructionSequence.compile_option =
{frozen_string_literal: true}
Note that this is a global compilation option, so that you need to
compile another script like that:
p 'foo'.frozen? #=> false
RubyVM::InstructionSequence.compile_option =
{frozen_string_literal: true}
p 'foo'.frozen? #=> false, because this line is already compiled.
p eval("'foo'.frozen?") #=> true
Details:
* String literals are deduped by rb_fstring().
* Dynamic string literals ("...#{xyz}...") is now only frozen,
not deduped. Maybe you have other ideas.
Now, please do not use this option on your productions :)
Of course, current specification can be changed.
* compile.c: ditto.
* test/ruby/test_iseq.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e