Stringify after downcase, to restrict arguments.
[Bug#15394]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
In test/ruby/enc/test_case_mapping.rb, add a test to make sure the
unassigned codepoints in the Georgian MTAVRULI range (U+1CBB, U+1CBC)
do not get converted to unrelated codepoints by String#capitalize.
(It turns out that this test was not strictly necessary, because
unassigned codepoints are already excluded by the fact that they are
not found in the onigenc_unicode_fold_lookup table. So this test only
serves to check against future regressions.)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/net/protocol.rb (ReadTimeout, WriteTimeout): Net::ReadTimeout and Net::WriteTimeout should tell the cause socket
[Feature #14832] [ruby-core:87440]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (linear_update): initialize `bin` just to silence false
warnings by old gcc 4.8. [Bug #15299]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/vcs.rb (VCS.detect): limit level of travarsing parent
directories, 0 by the default. curretly always detecting at the
source directory itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Today I updated my ruby core clone, and I run the usual steps to compile
ruby. When running "make", I run into the following error:
```
(... stuff ...)
encdb.h unchanged
Traceback (most recent call last):
5: from ./tool/mkconfig.rb:19:in `<main>'
4: from ./tool/mkconfig.rb:19:in `require'
3: from /home/deivid/Code/ruby/lib/fileutils.rb:4:in `<top (required)>'
2: from /home/deivid/Code/ruby/lib/fileutils.rb:4:in `require'
1: from /home/deivid/Code/ruby/rbconfig.rb:11:in `<top (required)>'
/home/deivid/Code/ruby/rbconfig.rb:13:in `<module:RbConfig>': ruby lib version (2.5.0) doesn't match executable version (2.6.0) (RuntimeError)
uncommon.mk:780: recipe for target '.rbconfig.time' failed
make: *** [.rbconfig.time] Error 1
```
Apparently, the script that generates the root `rbconfig.rb` file requires
`fileutils`, which in turn requires 'rbconfig' (for mjit-headers it says in a
comment), which uses the `rbconfig.rb` config file in the root folder if it
exists. In my case, this file existed but had been generated on 2.5.0, thus
causing the error.
I think we can avoid this sort of circular dependency by not requiring
`fileutils`, since it does not seem to be used anywhere in the
`tool/mkconfig.rb` script since r55338.
[Fix GH-2045]
From: David Rodríguez <deivid.rodriguez@riseup.net>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The modern Georgian script is special in that it has an 'uppercase'
variant called MTAVRULI which can be used for emphasis of whole words,
for screamy headlines, and so on. However, in contrast to all other
bicameral scripts, there is no usage of capitalizing the first letter
in a word or a sentence. Words with mixed capitalization are not used
at all.
We therefore implement special behavior for String#capitalize. Formally,
we define String#capitalize as first applying String#downcase for the
whole string, then using titlecase on the first letter. Because Georgian
defines titlecase as the identity function both for MTAVRULI ('uppercase')
and Mkhedruli (lowercase), this results in String#capitalize being
equivalent to String#downcase for Georgian. This avoids undesirable
mixed case.
* enc/unicode.c: Actual implementation
* string.c: Add mention of this special case for documentation
* test/ruby/enc/test_case_mapping.rb: Add two tests, a general one
that uses String#capitalize on some (including nonsensical)
combinations of MTAVRULI and Mkhedruli, and a canary test to
detect the potential assignment of characters to the currently
open slots (holes) at U+1CBB and U+1CBC.
* test/ruby/enc/test_case_comprehensive.rb: Tweak generation of
expectation data.
Together with r65933, this closes issue #14839.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This line, and those below, will be ignored--
D enc/unicode/10.0.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
get_uniq_filename never returns NULL but raises an exception on
failure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This reverts r66290 / commit 043047a8fd.
Still fails on CI, and I'm not able to reproduce the failure, either :<
http://ci.rvm.jp/results/trunk-test@ruby-sky1/1508228
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Constantly forking a single-threaded process in a loop leads to
a memory leak when using POSIX timers.
v2: disarm before timer_delete
==> fork_leapfrog.rb <==
require 'io/wait'
Dir.chdir '/proc'
prev = 0
loop do
pid = fork
exit!(0) if pid
# show the number of 4K pages used (Linux-only)
n = File.read("#$$/statm").split(-' ')[1].to_i
if n > prev
puts "#{prev} => #{n}"
prev = n
end
# since Ctrl-C from a terminal can't stop this loop,
# allow the user to just hit any key to stop
break if STDIN.wait(0)
end
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Constantly forking a single-threaded process in a loop leads to
a memory leak when using POSIX timers.
==> fork_leapfrog.rb <==
require 'io/wait'
Dir.chdir '/proc'
prev = 0
loop do
pid = fork
exit!(0) if pid
# show the number of 4K pages used (Linux-only)
n = File.read("#$$/statm").split(-' ')[1].to_i
if n > prev
puts "#{prev} => #{n}"
prev = n
end
# since Ctrl-C from a terminal can't stop this loop,
# allow the user to just hit any key to stop
break if STDIN.wait(0)
end
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
MJIT_MIN_HEADER is passed via a command line option for
mjit_build_dir.so.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Give the whole MJIT header path name by preloaded shared library
mjit_build_dir.so, than building the path from a given directory
name and the embedded base name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/library/win32ole/fixtures/classes.rb: add
SYSTEM_MONITOR_CONTROL_AVAILABLE.
* spec/ruby/library/win32ole/win32ole_method/event_spec.rb: Internet
Explorer is not available in some environment. Instead, try to use
System Monitor Control.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
The reserved hash values in hash.c must be consistend with st.c.
[ruby-core:90356] [Bug #15389]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
In regparse.c, in function node_extended_grapheme_cluster,
we used a raw if() with exit(1) as a cross-check for our
length calculations for the common node array. Convert this
to an assertion and comment it out because it is not needed
for active code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e