Compare commits
21 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78a252290e | ||
|
|
ebbdf9b7a8 | ||
|
|
7b1cb35f6e | ||
|
|
b3a221de6e | ||
|
|
88f18e8a6a | ||
|
|
7ef1dd81dc | ||
|
|
8d5dac162b | ||
|
|
635d5da78a | ||
|
|
344302bd25 | ||
|
|
4c9a5a5e9e | ||
|
|
08389a5fcd | ||
|
|
e20662a3f6 | ||
|
|
51449f1f93 | ||
|
|
1085ba2aed | ||
|
|
7bbdc3fdb9 | ||
|
|
d649e8e83a | ||
|
|
7f6db67fc6 | ||
|
|
366b5ae131 | ||
|
|
5d73ed5b41 | ||
|
|
07b06bf4c3 | ||
|
|
2f19648033 |
16 changed files with 138 additions and 754 deletions
|
|
@ -42,8 +42,8 @@ gem install \\\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not
|
# The 'read' command in %%gemspec_* macros is not essential, but it is usefull
|
||||||
# essential, but it is usefull to make the sript appear in build log.
|
# to make the sript appear in build log.
|
||||||
|
|
||||||
|
|
||||||
# %gemspec_add_dep - Add dependency into .gemspec.
|
# %gemspec_add_dep - Add dependency into .gemspec.
|
||||||
|
|
@ -60,7 +60,7 @@ gem install \\\
|
||||||
#
|
#
|
||||||
%gemspec_add_dep(g:s:d) \
|
%gemspec_add_dep(g:s:d) \
|
||||||
read -d '' gemspec_add_dep_script << 'EOR' || : \
|
read -d '' gemspec_add_dep_script << 'EOR' || : \
|
||||||
gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \
|
gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \
|
||||||
\
|
\
|
||||||
name = '%{-g*}' \
|
name = '%{-g*}' \
|
||||||
requirements = %{*}%{!?1:nil} \
|
requirements = %{*}%{!?1:nil} \
|
||||||
|
|
@ -97,7 +97,7 @@ unset -v gemspec_add_dep_script \
|
||||||
#
|
#
|
||||||
%gemspec_remove_dep(g:s:d) \
|
%gemspec_remove_dep(g:s:d) \
|
||||||
read -d '' gemspec_remove_dep_script << 'EOR' || : \
|
read -d '' gemspec_remove_dep_script << 'EOR' || : \
|
||||||
gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \
|
gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \
|
||||||
\
|
\
|
||||||
name = '%{-g*}' \
|
name = '%{-g*}' \
|
||||||
requirements = %{*}%{!?1:nil} \
|
requirements = %{*}%{!?1:nil} \
|
||||||
|
|
@ -128,3 +128,68 @@ EOR\
|
||||||
echo "$gemspec_remove_dep_script" | ruby \
|
echo "$gemspec_remove_dep_script" | ruby \
|
||||||
unset -v gemspec_remove_dep_script \
|
unset -v gemspec_remove_dep_script \
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
|
||||||
|
# %%gemspec_add_file - Add files to various files lists in .gemspec.
|
||||||
|
#
|
||||||
|
# Usage: %%gemspec_add_file [options] <file>
|
||||||
|
#
|
||||||
|
# Add files to .gemspec file. <file> is expected to be valid Ruby code.
|
||||||
|
# Path to file is expected. Does not check real files in any way.
|
||||||
|
# By default, `files` list is edited.
|
||||||
|
#
|
||||||
|
# -s <gemspec_file> Overrides the default .gemspec location.
|
||||||
|
# -t Edit test_files only.
|
||||||
|
# -r Edit extra_rdoc_files only.
|
||||||
|
#
|
||||||
|
%gemspec_add_file(s:tr) \
|
||||||
|
read -d '' gemspec_add_file_script << 'EOR' || : \
|
||||||
|
gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \
|
||||||
|
\
|
||||||
|
abort("gemspec_add_file: Use only one '-t' or '-r' at a time.") if "%{?-t}%{?-r}" == "-t-r" \
|
||||||
|
\
|
||||||
|
filenames = %{*}%{!?1:nil} \
|
||||||
|
filenames = Array(filenames) \
|
||||||
|
\
|
||||||
|
spec = Gem::Specification.load(gemspec_file) \
|
||||||
|
abort("#{gemspec_file} is not accessible.") unless spec \
|
||||||
|
\
|
||||||
|
spec.%{?-t:test_}%{?-r:extra_rdoc_}files += filenames \
|
||||||
|
File.write gemspec_file, spec.to_ruby \
|
||||||
|
EOR\
|
||||||
|
echo "$gemspec_add_file_script" | ruby \
|
||||||
|
unset -v gemspec_add_file_script \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
|
||||||
|
# %%gemspec_remove_file - Remove files from various files lists in .gemspec.
|
||||||
|
#
|
||||||
|
# Usage: %%gemspec_remove_file [options] <file>
|
||||||
|
#
|
||||||
|
# Remove files from .gemspec file. <file> is expected to be valid Ruby code.
|
||||||
|
# Path to file is expected. Does not check/remove real files in any way.
|
||||||
|
# By default, `files` list is edited. File has to be removed from `test_files`
|
||||||
|
# first in order to be removable from `files`.
|
||||||
|
#
|
||||||
|
# -s <gemspec_file> Overrides the default .gemspec location.
|
||||||
|
# -t Edit test_files only.
|
||||||
|
# -r Edit extra_rdoc_files only.
|
||||||
|
#
|
||||||
|
%gemspec_remove_file(s:tr) \
|
||||||
|
read -d '' gemspec_remove_file_script << 'EOR' || : \
|
||||||
|
gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \
|
||||||
|
\
|
||||||
|
abort("gemspec_remove_file: Use only one '-t' or '-r' at a time.") if "%{?-t}%{?-r}" == "-t-r" \
|
||||||
|
\
|
||||||
|
filenames = %{*}%{!?1:nil} \
|
||||||
|
filenames = Array(filenames) \
|
||||||
|
\
|
||||||
|
spec = Gem::Specification.load(gemspec_file) \
|
||||||
|
abort("#{gemspec_file} is not accessible.") unless spec \
|
||||||
|
\
|
||||||
|
spec.%{?-t:test_}%{?-r:extra_rdoc_}files -= filenames \
|
||||||
|
File.write gemspec_file, spec.to_ruby \
|
||||||
|
EOR\
|
||||||
|
echo "$gemspec_remove_file_script" | ruby \
|
||||||
|
unset -v gemspec_remove_file_script \
|
||||||
|
%{nil}
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ module Gem
|
||||||
def default_path
|
def default_path
|
||||||
path = default_dirs.collect {|location, paths| paths[:gem_dir]}
|
path = default_dirs.collect {|location, paths| paths[:gem_dir]}
|
||||||
path.unshift Gem.user_dir if File.exist? Gem.user_home
|
path.unshift Gem.user_dir if File.exist? Gem.user_home
|
||||||
|
path
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_ext_dir_for base_dir
|
def default_ext_dir_for base_dir
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb
|
||||||
index 682eb46..e6b1445 100644
|
index 682eb46..e6b1445 100644
|
||||||
--- a/lib/mkmf.rb
|
--- a/lib/mkmf.rb
|
||||||
+++ b/lib/mkmf.rb
|
+++ b/lib/mkmf.rb
|
||||||
@@ -1899,7 +1899,7 @@ def configuration(srcdir)
|
@@ -1900,7 +1900,7 @@ def configuration(srcdir)
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
# V=0 quiet, V=1 verbose. other values don't work.
|
# V=0 quiet, V=1 verbose. other values don't work.
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ diff --git a/configure.ac b/configure.ac
|
||||||
index 028ef7ca3e..cdeff87871 100644
|
index 028ef7ca3e..cdeff87871 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -4395,6 +4395,13 @@ AC_SUBST(rubyarchhdrdir)dnl
|
@@ -4397,6 +4397,13 @@ AC_SUBST(rubyarchhdrdir)dnl
|
||||||
AC_SUBST(sitearchhdrdir)dnl
|
AC_SUBST(sitearchhdrdir)dnl
|
||||||
AC_SUBST(vendorarchhdrdir)dnl
|
AC_SUBST(vendorarchhdrdir)dnl
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
|
||||||
index 11fc237552..b77e88fc37 100644
|
index 11fc237552..b77e88fc37 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -3640,6 +3640,11 @@ AS_IF([test ${multiarch+set}], [
|
@@ -3642,6 +3642,11 @@ AS_IF([test ${multiarch+set}], [
|
||||||
])
|
])
|
||||||
|
|
||||||
archlibdir='${libdir}/${arch}'
|
archlibdir='${libdir}/${arch}'
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac
|
||||||
index 999e2d6d5d..11fc237552 100644
|
index 999e2d6d5d..11fc237552 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -4250,7 +4250,8 @@ AS_CASE(["$ruby_version_dir_name"],
|
@@ -4252,7 +4252,8 @@ AS_CASE(["$ruby_version_dir_name"],
|
||||||
ruby_version_dir=/'${ruby_version_dir_name}'
|
ruby_version_dir=/'${ruby_version_dir_name}'
|
||||||
|
|
||||||
if test -z "${ruby_version_dir_name}"; then
|
if test -z "${ruby_version_dir_name}"; then
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac
|
||||||
index b77e88fc37..6bba453e3c 100644
|
index b77e88fc37..6bba453e3c 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -4314,6 +4314,8 @@ AC_SUBST(vendorarchdir)dnl
|
@@ -4316,6 +4316,8 @@ AC_SUBST(vendorarchdir)dnl
|
||||||
AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
|
AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl
|
||||||
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
|
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac
|
||||||
index 6bba453e3c..028ef7ca3e 100644
|
index 6bba453e3c..028ef7ca3e 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -4286,6 +4286,10 @@ AC_ARG_WITH(vendorarchdir,
|
@@ -4288,6 +4288,10 @@ AC_ARG_WITH(vendorarchdir,
|
||||||
[vendorarchdir=$withval],
|
[vendorarchdir=$withval],
|
||||||
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
|
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}])
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644
|
||||||
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
||||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||||
RUBY_EXEC_PREFIX=''
|
RUBY_EXEC_PREFIX=''
|
||||||
@@ -4310,6 +4314,7 @@ AC_SUBST(sitearchdir)dnl
|
@@ -4312,6 +4316,7 @@ AC_SUBST(sitearchdir)dnl
|
||||||
AC_SUBST(vendordir)dnl
|
AC_SUBST(vendordir)dnl
|
||||||
AC_SUBST(vendorlibdir)dnl
|
AC_SUBST(vendorlibdir)dnl
|
||||||
AC_SUBST(vendorarchdir)dnl
|
AC_SUBST(vendorarchdir)dnl
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac
|
||||||
index 8ea969412f..a00f2b6776 100644
|
index 8ea969412f..a00f2b6776 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -4201,9 +4201,6 @@ AS_CASE(["$target_os"],
|
@@ -4203,9 +4203,6 @@ AS_CASE(["$target_os"],
|
||||||
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644
|
||||||
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
|
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
|
||||||
AC_ARG_WITH(rubyarchprefix,
|
AC_ARG_WITH(rubyarchprefix,
|
||||||
AS_HELP_STRING([--with-rubyarchprefix=DIR],
|
AS_HELP_STRING([--with-rubyarchprefix=DIR],
|
||||||
@@ -4226,56 +4223,62 @@ AC_ARG_WITH(ridir,
|
@@ -4228,56 +4225,62 @@ AC_ARG_WITH(ridir,
|
||||||
AC_SUBST(ridir)
|
AC_SUBST(ridir)
|
||||||
AC_SUBST(RI_BASE_NAME)
|
AC_SUBST(RI_BASE_NAME)
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644
|
||||||
|
|
||||||
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
AS_IF([test "${LOAD_RELATIVE+set}"], [
|
||||||
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
|
||||||
@@ -4292,6 +4295,7 @@ AC_SUBST(sitearchincludedir)dnl
|
@@ -4294,6 +4297,7 @@ AC_SUBST(sitearchincludedir)dnl
|
||||||
AC_SUBST(arch)dnl
|
AC_SUBST(arch)dnl
|
||||||
AC_SUBST(sitearch)dnl
|
AC_SUBST(sitearch)dnl
|
||||||
AC_SUBST(ruby_version)dnl
|
AC_SUBST(ruby_version)dnl
|
||||||
|
|
@ -245,7 +245,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
|
||||||
index 0428bea..b6e090e 100644
|
index 0428bea..b6e090e 100644
|
||||||
--- a/test/rubygems/test_gem.rb
|
--- a/test/rubygems/test_gem.rb
|
||||||
+++ b/test/rubygems/test_gem.rb
|
+++ b/test/rubygems/test_gem.rb
|
||||||
@@ -1156,7 +1156,8 @@ def test_self_use_paths
|
@@ -1191,7 +1191,8 @@ def test_self_use_paths
|
||||||
|
|
||||||
def test_self_user_dir
|
def test_self_user_dir
|
||||||
parts = [@userhome, '.gem', Gem.ruby_engine]
|
parts = [@userhome, '.gem', Gem.ruby_engine]
|
||||||
|
|
@ -255,7 +255,7 @@ index 0428bea..b6e090e 100644
|
||||||
|
|
||||||
assert_equal File.join(parts), Gem.user_dir
|
assert_equal File.join(parts), Gem.user_dir
|
||||||
end
|
end
|
||||||
@@ -1283,7 +1284,7 @@ def test_self_user_home_user_drive_and_path
|
@@ -1318,7 +1319,7 @@ def test_self_user_home_user_drive_and_path
|
||||||
def test_self_vendor_dir
|
def test_self_vendor_dir
|
||||||
expected =
|
expected =
|
||||||
File.join RbConfig::CONFIG['vendordir'], 'gems',
|
File.join RbConfig::CONFIG['vendordir'], 'gems',
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb
|
||||||
index 3225a05c6b..62b80c4945 100644
|
index 3225a05c6b..62b80c4945 100644
|
||||||
--- a/test/rubygems/test_gem.rb
|
--- a/test/rubygems/test_gem.rb
|
||||||
+++ b/test/rubygems/test_gem.rb
|
+++ b/test/rubygems/test_gem.rb
|
||||||
@@ -1802,6 +1802,13 @@ def test_use_gemdeps_specific
|
@@ -1837,6 +1837,13 @@ def test_use_gemdeps_specific
|
||||||
ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps
|
ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb
|
|
||||||
index 20a57fe7dd..5b9e5a8bde 100644
|
|
||||||
--- a/test/ruby/test_time_tz.rb
|
|
||||||
+++ b/test/ruby/test_time_tz.rb
|
|
||||||
@@ -126,8 +126,8 @@ def test_asia_singapore
|
|
||||||
|
|
||||||
def test_asia_tokyo
|
|
||||||
with_tz(tz="Asia/Tokyo") {
|
|
||||||
- assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0])
|
|
||||||
- assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59])
|
|
||||||
+# assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0])
|
|
||||||
+# assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59])
|
|
||||||
assert_time_constructor(tz, "2010-06-10 06:13:28 +0900", :local, [2010,6,10,6,13,28])
|
|
||||||
}
|
|
||||||
end
|
|
||||||
@@ -329,10 +329,10 @@ def self.gen_zdump_test(data)
|
|
||||||
Asia/Singapore Sun Aug 8 16:30:00 1965 UTC = Mon Aug 9 00:00:00 1965 SGT isdst=0 gmtoff=27000
|
|
||||||
Asia/Singapore Thu Dec 31 16:29:59 1981 UTC = Thu Dec 31 23:59:59 1981 SGT isdst=0 gmtoff=27000
|
|
||||||
Asia/Singapore Thu Dec 31 16:30:00 1981 UTC = Fri Jan 1 00:30:00 1982 SGT isdst=0 gmtoff=28800
|
|
||||||
-Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400
|
|
||||||
-Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000
|
|
||||||
-Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000
|
|
||||||
-Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400
|
|
||||||
+#Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400
|
|
||||||
+#Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000
|
|
||||||
+#Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000
|
|
||||||
+#Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400
|
|
||||||
America/St_Johns Sun Mar 11 03:30:59 2007 UTC = Sun Mar 11 00:00:59 2007 NST isdst=0 gmtoff=-12600
|
|
||||||
America/St_Johns Sun Mar 11 03:31:00 2007 UTC = Sun Mar 11 01:01:00 2007 NDT isdst=1 gmtoff=-9000
|
|
||||||
America/St_Johns Sun Nov 4 02:30:59 2007 UTC = Sun Nov 4 00:00:59 2007 NDT isdst=1 gmtoff=-9000
|
|
||||||
|
|
@ -1,80 +0,0 @@
|
||||||
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
|
|
||||||
Date: Sun, 31 Dec 2017 11:25:38 +0000
|
|
||||||
Subject: [PATCH] parse.y: assignable_error
|
|
||||||
|
|
||||||
* parse.y (assignable_gen): should return valid NODE always even
|
|
||||||
on errors. [ruby-core:84565] [Bug #14261]
|
|
||||||
|
|
||||||
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
||||||
---
|
|
||||||
parse.c | 14 ++++----------
|
|
||||||
test/ruby/test_parse.rb | 6 ++++++
|
|
||||||
2 files changed, 10 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/parse.c b/parse.c
|
|
||||||
index 08c3461f7096..c260a046dc33 100644
|
|
||||||
--- a/parse.c
|
|
||||||
+++ b/parse.c
|
|
||||||
@@ -6593,10 +6593,6 @@
|
|
||||||
#line 1984 "parse.y" /* yacc.c:1646 */
|
|
||||||
{
|
|
||||||
(yyval.node) = assignable(var_field((yyvsp[0].id)), 0, &(yyloc));
|
|
||||||
- /*%%%*/
|
|
||||||
- if (!(yyval.node)) (yyval.node) = new_begin(0, &(yyloc));
|
|
||||||
- /*%
|
|
||||||
- %*/
|
|
||||||
}
|
|
||||||
#line 6598 "parse.c" /* yacc.c:1646 */
|
|
||||||
break;
|
|
||||||
@@ -6605,10 +6601,6 @@
|
|
||||||
#line 1992 "parse.y" /* yacc.c:1646 */
|
|
||||||
{
|
|
||||||
(yyval.node) = assignable(var_field((yyvsp[0].id)), 0, &(yyloc));
|
|
||||||
- /*%%%*/
|
|
||||||
- if (!(yyval.node)) (yyval.node) = new_begin(0, &(yyloc));
|
|
||||||
- /*%
|
|
||||||
- %*/
|
|
||||||
}
|
|
||||||
#line 6610 "parse.c" /* yacc.c:1646 */
|
|
||||||
break;
|
|
||||||
@@ -16034,11 +16026,13 @@
|
|
||||||
#ifdef RIPPER
|
|
||||||
ID id = get_id(lhs);
|
|
||||||
# define assignable_result(x) (lhs)
|
|
||||||
+# define assignable_error() (lhs)
|
|
||||||
# define parser_yyerror(parser, x) (lhs = assign_error_gen(parser, lhs))
|
|
||||||
#else
|
|
||||||
# define assignable_result(x) assignable_result0(x, location)
|
|
||||||
+# define assignable_error() new_begin(0, location)
|
|
||||||
#endif
|
|
||||||
- if (!id) return assignable_result(0);
|
|
||||||
+ if (!id) return assignable_error();
|
|
||||||
switch (id) {
|
|
||||||
case keyword_self:
|
|
||||||
yyerror0("Can't change the value of self");
|
|
||||||
@@ -16101,7 +16095,7 @@
|
|
||||||
compile_error(PARSER_ARG "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id));
|
|
||||||
}
|
|
||||||
error:
|
|
||||||
- return assignable_result(0);
|
|
||||||
+ return assignable_error();
|
|
||||||
#undef assignable_result
|
|
||||||
#undef parser_yyerror
|
|
||||||
}
|
|
||||||
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
|
|
||||||
index e26bcdc07e19..15c6245bac2e 100644
|
|
||||||
--- a/test/ruby/test_parse.rb
|
|
||||||
+++ b/test/ruby/test_parse.rb
|
|
||||||
@@ -746,6 +746,12 @@ def foo
|
|
||||||
end
|
|
||||||
END
|
|
||||||
end
|
|
||||||
+ assert_raise(SyntaxError) do
|
|
||||||
+ eval "#{<<~"begin;"}\n#{<<~'end;'}", nil, __FILE__, __LINE__+1
|
|
||||||
+ begin;
|
|
||||||
+ x, true
|
|
||||||
+ end;
|
|
||||||
+ end
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_block_dup
|
|
||||||
|
|
@ -1,602 +0,0 @@
|
||||||
From 4663c224fa6c925ce54af32fd1c1cbac9508f5ec Mon Sep 17 00:00:00 2001
|
|
||||||
From: normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
|
|
||||||
Date: Tue, 13 Feb 2018 10:02:07 +0000
|
|
||||||
Subject: [PATCH] st.c: retry operations if rebuilt
|
|
||||||
|
|
||||||
Calling the .eql? and .hash methods during a Hash operation can
|
|
||||||
result in a thread switch or a signal handler to run: allowing
|
|
||||||
one execution context to rebuild the hash table while another is
|
|
||||||
still reading or writing the table. This results in a
|
|
||||||
use-after-free bug affecting the thread_safe-0.3.6 test suite
|
|
||||||
and likely other bugs.
|
|
||||||
|
|
||||||
This bug did not affect users of commonly keys (String, Symbol,
|
|
||||||
Fixnum) as those are optimized to avoid method dispatch
|
|
||||||
for .eql? and .hash methods.
|
|
||||||
|
|
||||||
A separate version of this change needs to be ported to Ruby 2.3.x
|
|
||||||
which had a different implementation of st.c but was affected
|
|
||||||
by the same bug.
|
|
||||||
|
|
||||||
* st.c: Add comment about table rebuilding during comparison.
|
|
||||||
(DO_PTR_EQUAL_CHECK): New macro.
|
|
||||||
(REBUILT_TABLE_ENTRY_IND, REBUILT_TABLE_BIN_IND): New macros.
|
|
||||||
(find_entry, find_table_entry_ind, find_table_bin_ind): Use new
|
|
||||||
macros. Return the rebuild flag.
|
|
||||||
(find_table_bin_ptr_and_reserve): Ditto.
|
|
||||||
(st_lookup, st_get_key, st_insert, st_insert2): Retry the
|
|
||||||
operation if the table was rebuilt.
|
|
||||||
(st_general_delete, st_shift, st_update, st_general_foreach):
|
|
||||||
Ditto.
|
|
||||||
(st_rehash_linear, st_rehash_indexed): Use DO_PTR_EQUAL_CHECK.
|
|
||||||
Return the rebuild flag.
|
|
||||||
(st_rehash): Retry the operation if the table was rebuilt.
|
|
||||||
[ruby-core:85510] [Ruby trunk Bug#14357]
|
|
||||||
|
|
||||||
Thanks to Vit Ondruch for reporting the bug.
|
|
||||||
|
|
||||||
From: Vladimir Makarov <vmakarov@redhat.com>
|
|
||||||
|
|
||||||
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
||||||
---
|
|
||||||
st.c | 258 ++++++++++++++++++++++++++++++++++++++++++++++++-------------------
|
|
||||||
1 file changed, 185 insertions(+), 73 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/st.c b/st.c
|
|
||||||
index 56ae30ce47..0c52e7a2ef 100644
|
|
||||||
--- a/st.c
|
|
||||||
+++ b/st.c
|
|
||||||
@@ -90,6 +90,11 @@
|
|
||||||
o To save more memory we use 8-, 16-, 32- and 64- bit indexes in
|
|
||||||
bins depending on the current hash table size.
|
|
||||||
|
|
||||||
+ o The implementation takes into account that the table can be
|
|
||||||
+ rebuilt during hashing or comparison functions. It can happen if
|
|
||||||
+ the functions are implemented in Ruby and a thread switch occurs
|
|
||||||
+ during their execution.
|
|
||||||
+
|
|
||||||
This implementation speeds up the Ruby hash table benchmarks in
|
|
||||||
average by more 40% on Intel Haswell CPU.
|
|
||||||
|
|
||||||
@@ -174,6 +179,15 @@ static const struct st_hash_type type_strcasehash = {
|
|
||||||
#define PTR_EQUAL(tab, ptr, hash_val, key_) \
|
|
||||||
((ptr)->hash == (hash_val) && EQUAL((tab), (key_), (ptr)->key))
|
|
||||||
|
|
||||||
+/* As PRT_EQUAL only its result is returned in RES. REBUILT_P is set
|
|
||||||
+ up to TRUE if the table is rebuilt during the comparison. */
|
|
||||||
+#define DO_PTR_EQUAL_CHECK(tab, ptr, hash_val, key, res, rebuilt_p) \
|
|
||||||
+ do { \
|
|
||||||
+ unsigned int _old_rebuilds_num = (tab)->rebuilds_num; \
|
|
||||||
+ res = PTR_EQUAL(tab, ptr, hash_val, key); \
|
|
||||||
+ rebuilt_p = _old_rebuilds_num != (tab)->rebuilds_num; \
|
|
||||||
+ } while (FALSE)
|
|
||||||
+
|
|
||||||
/* Features of a table. */
|
|
||||||
struct st_features {
|
|
||||||
/* Power of 2 used for number of allocated entries. */
|
|
||||||
@@ -380,6 +394,11 @@ set_bin(st_index_t *bins, int s, st_index_t n, st_index_t v)
|
|
||||||
#define UNDEFINED_ENTRY_IND (~(st_index_t) 0)
|
|
||||||
#define UNDEFINED_BIN_IND (~(st_index_t) 0)
|
|
||||||
|
|
||||||
+/* Entry and bin values returned when we found a table rebuild during
|
|
||||||
+ the search. */
|
|
||||||
+#define REBUILT_TABLE_ENTRY_IND (~(st_index_t) 1)
|
|
||||||
+#define REBUILT_TABLE_BIN_IND (~(st_index_t) 1)
|
|
||||||
+
|
|
||||||
/* Mark I-th bin of table TAB as corresponding to a deleted table
|
|
||||||
entry. Update number of entries in the table and number of bins
|
|
||||||
corresponding to deleted entries. */
|
|
||||||
@@ -823,17 +842,22 @@ secondary_hash(st_index_t ind, st_table *tab, st_index_t *perterb)
|
|
||||||
|
|
||||||
/* Find an entry with HASH_VALUE and KEY in TABLE using a linear
|
|
||||||
search. Return the index of the found entry in array `entries`.
|
|
||||||
- If it is not found, return UNDEFINED_ENTRY_IND. */
|
|
||||||
+ If it is not found, return UNDEFINED_ENTRY_IND. If the table was
|
|
||||||
+ rebuilt during the search, return REBUILT_TABLE_ENTRY_IND. */
|
|
||||||
static inline st_index_t
|
|
||||||
find_entry(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
{
|
|
||||||
+ int eq_p, rebuilt_p;
|
|
||||||
st_index_t i, bound;
|
|
||||||
st_table_entry *entries;
|
|
||||||
|
|
||||||
bound = tab->entries_bound;
|
|
||||||
entries = tab->entries;
|
|
||||||
for (i = tab->entries_start; i < bound; i++) {
|
|
||||||
- if (PTR_EQUAL(tab, &entries[i], hash_value, key))
|
|
||||||
+ DO_PTR_EQUAL_CHECK(tab, &entries[i], hash_value, key, eq_p, rebuilt_p);
|
|
||||||
+ if (EXPECT(rebuilt_p, 0))
|
|
||||||
+ return REBUILT_TABLE_ENTRY_IND;
|
|
||||||
+ if (eq_p)
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
return UNDEFINED_ENTRY_IND;
|
|
||||||
@@ -845,10 +869,12 @@ find_entry(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
/*#define QUADRATIC_PROBE*/
|
|
||||||
|
|
||||||
/* Return index of entry with HASH_VALUE and KEY in table TAB. If
|
|
||||||
- there is no such entry, return UNDEFINED_ENTRY_IND. */
|
|
||||||
+ there is no such entry, return UNDEFINED_ENTRY_IND. If the table
|
|
||||||
+ was rebuilt during the search, return REBUILT_TABLE_ENTRY_IND. */
|
|
||||||
static st_index_t
|
|
||||||
find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
{
|
|
||||||
+ int eq_p, rebuilt_p;
|
|
||||||
st_index_t ind;
|
|
||||||
#ifdef QUADRATIC_PROBE
|
|
||||||
st_index_t d;
|
|
||||||
@@ -869,10 +895,13 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
FOUND_BIN;
|
|
||||||
for (;;) {
|
|
||||||
bin = get_bin(tab->bins, get_size_ind(tab), ind);
|
|
||||||
- if (! EMPTY_OR_DELETED_BIN_P(bin)
|
|
||||||
- && PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key))
|
|
||||||
- break;
|
|
||||||
- else if (EMPTY_BIN_P(bin))
|
|
||||||
+ if (! EMPTY_OR_DELETED_BIN_P(bin)) {
|
|
||||||
+ DO_PTR_EQUAL_CHECK(tab, &entries[bin - ENTRY_BASE], hash_value, key, eq_p, rebuilt_p);
|
|
||||||
+ if (EXPECT(rebuilt_p, 0))
|
|
||||||
+ return REBUILT_TABLE_ENTRY_IND;
|
|
||||||
+ if (eq_p)
|
|
||||||
+ break;
|
|
||||||
+ } else if (EMPTY_BIN_P(bin))
|
|
||||||
return UNDEFINED_ENTRY_IND;
|
|
||||||
#ifdef QUADRATIC_PROBE
|
|
||||||
ind = hash_bin(ind + d, tab);
|
|
||||||
@@ -887,10 +916,12 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
|
|
||||||
/* Find and return index of table TAB bin corresponding to an entry
|
|
||||||
with HASH_VALUE and KEY. If there is no such bin, return
|
|
||||||
- UNDEFINED_BIN_IND. */
|
|
||||||
+ UNDEFINED_BIN_IND. If the table was rebuilt during the search,
|
|
||||||
+ return REBUILT_TABLE_BIN_IND. */
|
|
||||||
static st_index_t
|
|
||||||
find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
{
|
|
||||||
+ int eq_p, rebuilt_p;
|
|
||||||
st_index_t ind;
|
|
||||||
#ifdef QUADRATIC_PROBE
|
|
||||||
st_index_t d;
|
|
||||||
@@ -911,10 +942,13 @@ find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
FOUND_BIN;
|
|
||||||
for (;;) {
|
|
||||||
bin = get_bin(tab->bins, get_size_ind(tab), ind);
|
|
||||||
- if (! EMPTY_OR_DELETED_BIN_P(bin)
|
|
||||||
- && PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key))
|
|
||||||
- break;
|
|
||||||
- else if (EMPTY_BIN_P(bin))
|
|
||||||
+ if (! EMPTY_OR_DELETED_BIN_P(bin)) {
|
|
||||||
+ DO_PTR_EQUAL_CHECK(tab, &entries[bin - ENTRY_BASE], hash_value, key, eq_p, rebuilt_p);
|
|
||||||
+ if (EXPECT(rebuilt_p, 0))
|
|
||||||
+ return REBUILT_TABLE_BIN_IND;
|
|
||||||
+ if (eq_p)
|
|
||||||
+ break;
|
|
||||||
+ } else if (EMPTY_BIN_P(bin))
|
|
||||||
return UNDEFINED_BIN_IND;
|
|
||||||
#ifdef QUADRATIC_PROBE
|
|
||||||
ind = hash_bin(ind + d, tab);
|
|
||||||
@@ -955,7 +989,7 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
bin = get_bin(tab->bins, get_size_ind(tab), ind);
|
|
||||||
if (EMPTY_OR_DELETED_BIN_P(bin))
|
|
||||||
return ind;
|
|
||||||
- st_assert (! PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key));
|
|
||||||
+ st_assert (entries[bin - ENTRY_BASE].hash != hash_value);
|
|
||||||
#ifdef QUADRATIC_PROBE
|
|
||||||
ind = hash_bin(ind + d, tab);
|
|
||||||
d++;
|
|
||||||
@@ -973,11 +1007,13 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key)
|
|
||||||
bigger entries array. Although we can reuse a deleted bin, the
|
|
||||||
result bin value is always empty if the table has no entry with
|
|
||||||
KEY. Return the entries array index of the found entry or
|
|
||||||
- UNDEFINED_ENTRY_IND if it is not found. */
|
|
||||||
+ UNDEFINED_ENTRY_IND if it is not found. If the table was rebuilt
|
|
||||||
+ during the search, return REBUILT_TABLE_ENTRY_IND. */
|
|
||||||
static st_index_t
|
|
||||||
find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value,
|
|
||||||
st_data_t key, st_index_t *bin_ind)
|
|
||||||
{
|
|
||||||
+ int eq_p, rebuilt_p;
|
|
||||||
st_index_t ind;
|
|
||||||
st_hash_t curr_hash_value = *hash_value;
|
|
||||||
#ifdef QUADRATIC_PROBE
|
|
||||||
@@ -1015,7 +1051,10 @@ find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value,
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (! DELETED_BIN_P(entry_index)) {
|
|
||||||
- if (PTR_EQUAL(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key))
|
|
||||||
+ DO_PTR_EQUAL_CHECK(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key, eq_p, rebuilt_p);
|
|
||||||
+ if (EXPECT(rebuilt_p, 0))
|
|
||||||
+ return REBUILT_TABLE_ENTRY_IND;
|
|
||||||
+ if (eq_p)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (first_deleted_bin_ind == UNDEFINED_BIN_IND)
|
|
||||||
@@ -1040,13 +1079,18 @@ st_lookup(st_table *tab, st_data_t key, st_data_t *value)
|
|
||||||
st_index_t bin;
|
|
||||||
st_hash_t hash = do_hash(key, tab);
|
|
||||||
|
|
||||||
+ retry:
|
|
||||||
if (tab->bins == NULL) {
|
|
||||||
bin = find_entry(tab, hash, key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
if (bin == UNDEFINED_ENTRY_IND)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
bin = find_table_entry_ind(tab, hash, key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
if (bin == UNDEFINED_ENTRY_IND)
|
|
||||||
return 0;
|
|
||||||
bin -= ENTRY_BASE;
|
|
||||||
@@ -1064,13 +1108,18 @@ st_get_key(st_table *tab, st_data_t key, st_data_t *result)
|
|
||||||
st_index_t bin;
|
|
||||||
st_hash_t hash = do_hash(key, tab);
|
|
||||||
|
|
||||||
+ retry:
|
|
||||||
if (tab->bins == NULL) {
|
|
||||||
bin = find_entry(tab, hash, key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
if (bin == UNDEFINED_ENTRY_IND)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
bin = find_table_entry_ind(tab, hash, key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
if (bin == UNDEFINED_ENTRY_IND)
|
|
||||||
return 0;
|
|
||||||
bin -= ENTRY_BASE;
|
|
||||||
@@ -1104,10 +1153,13 @@ st_insert(st_table *tab, st_data_t key, st_data_t value)
|
|
||||||
st_index_t bin_ind;
|
|
||||||
int new_p;
|
|
||||||
|
|
||||||
- rebuild_table_if_necessary(tab);
|
|
||||||
hash_value = do_hash(key, tab);
|
|
||||||
+ retry:
|
|
||||||
+ rebuild_table_if_necessary(tab);
|
|
||||||
if (tab->bins == NULL) {
|
|
||||||
bin = find_entry(tab, hash_value, key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
new_p = bin == UNDEFINED_ENTRY_IND;
|
|
||||||
if (new_p)
|
|
||||||
tab->num_entries++;
|
|
||||||
@@ -1116,6 +1168,8 @@ st_insert(st_table *tab, st_data_t key, st_data_t value)
|
|
||||||
else {
|
|
||||||
bin = find_table_bin_ptr_and_reserve(tab, &hash_value,
|
|
||||||
key, &bin_ind);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
new_p = bin == UNDEFINED_ENTRY_IND;
|
|
||||||
bin -= ENTRY_BASE;
|
|
||||||
}
|
|
||||||
@@ -1192,10 +1246,13 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value,
|
|
||||||
st_index_t bin_ind;
|
|
||||||
int new_p;
|
|
||||||
|
|
||||||
- rebuild_table_if_necessary (tab);
|
|
||||||
hash_value = do_hash(key, tab);
|
|
||||||
+ retry:
|
|
||||||
+ rebuild_table_if_necessary (tab);
|
|
||||||
if (tab->bins == NULL) {
|
|
||||||
bin = find_entry(tab, hash_value, key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
new_p = bin == UNDEFINED_ENTRY_IND;
|
|
||||||
if (new_p)
|
|
||||||
tab->num_entries++;
|
|
||||||
@@ -1204,6 +1261,8 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value,
|
|
||||||
else {
|
|
||||||
bin = find_table_bin_ptr_and_reserve(tab, &hash_value,
|
|
||||||
key, &bin_ind);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
new_p = bin == UNDEFINED_ENTRY_IND;
|
|
||||||
bin -= ENTRY_BASE;
|
|
||||||
}
|
|
||||||
@@ -1212,7 +1271,6 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value,
|
|
||||||
check = tab->rebuilds_num;
|
|
||||||
key = (*func)(key);
|
|
||||||
st_assert(check == tab->rebuilds_num);
|
|
||||||
- st_assert(do_hash(key, tab) == hash_value);
|
|
||||||
ind = tab->entries_bound++;
|
|
||||||
entry = &tab->entries[ind];
|
|
||||||
entry->hash = hash_value;
|
|
||||||
@@ -1220,6 +1278,7 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value,
|
|
||||||
entry->record = value;
|
|
||||||
if (bin_ind != UNDEFINED_BIN_IND)
|
|
||||||
set_bin(tab->bins, get_size_ind(tab), bin_ind, ind + ENTRY_BASE);
|
|
||||||
+ st_assert(do_hash(key, tab) == hash_value);
|
|
||||||
#ifdef ST_DEBUG
|
|
||||||
st_check(tab);
|
|
||||||
#endif
|
|
||||||
@@ -1281,8 +1340,11 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value)
|
|
||||||
|
|
||||||
st_assert(tab != NULL);
|
|
||||||
hash = do_hash(*key, tab);
|
|
||||||
+ retry:
|
|
||||||
if (tab->bins == NULL) {
|
|
||||||
bin = find_entry(tab, hash, *key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
if (bin == UNDEFINED_ENTRY_IND) {
|
|
||||||
if (value != 0) *value = 0;
|
|
||||||
return 0;
|
|
||||||
@@ -1290,6 +1352,8 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
bin_ind = find_table_bin_ind(tab, hash, *key);
|
|
||||||
+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
if (bin_ind == UNDEFINED_BIN_IND) {
|
|
||||||
if (value != 0) *value = 0;
|
|
||||||
return 0;
|
|
||||||
@@ -1344,21 +1408,33 @@ st_shift(st_table *tab, st_data_t *key, st_data_t *value)
|
|
||||||
for (i = tab->entries_start; i < bound; i++) {
|
|
||||||
curr_entry_ptr = &entries[i];
|
|
||||||
if (! DELETED_ENTRY_P(curr_entry_ptr)) {
|
|
||||||
+ st_hash_t entry_hash = curr_entry_ptr->hash;
|
|
||||||
+ st_data_t entry_key = curr_entry_ptr->key;
|
|
||||||
+
|
|
||||||
if (value != 0) *value = curr_entry_ptr->record;
|
|
||||||
- *key = curr_entry_ptr->key;
|
|
||||||
+ *key = entry_key;
|
|
||||||
+ retry:
|
|
||||||
if (tab->bins == NULL) {
|
|
||||||
- bin = find_entry(tab, curr_entry_ptr->hash, curr_entry_ptr->key);
|
|
||||||
+ bin = find_entry(tab, entry_hash, entry_key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) {
|
|
||||||
+ entries = tab->entries;
|
|
||||||
+ goto retry;
|
|
||||||
+ }
|
|
||||||
st_assert(bin != UNDEFINED_ENTRY_IND);
|
|
||||||
- st_assert(&entries[bin] == curr_entry_ptr);
|
|
||||||
+ curr_entry_ptr = &entries[bin];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
- bin_ind = find_table_bin_ind(tab, curr_entry_ptr->hash,
|
|
||||||
- curr_entry_ptr->key);
|
|
||||||
+ bin_ind = find_table_bin_ind(tab, entry_hash, entry_key);
|
|
||||||
+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) {
|
|
||||||
+ entries = tab->entries;
|
|
||||||
+ goto retry;
|
|
||||||
+ }
|
|
||||||
st_assert(bin_ind != UNDEFINED_BIN_IND);
|
|
||||||
- st_assert(&entries[get_bin(tab->bins, get_size_ind(tab), bin_ind)
|
|
||||||
- - ENTRY_BASE] == curr_entry_ptr);
|
|
||||||
+ curr_entry_ptr = &entries[get_bin(tab->bins, get_size_ind(tab), bin_ind)
|
|
||||||
+ - ENTRY_BASE];
|
|
||||||
MARK_BIN_DELETED(tab, bin_ind);
|
|
||||||
}
|
|
||||||
+ st_assert(entry_hash != curr_entry_ptr->hash && entry_key == curr_entry_ptr->key);
|
|
||||||
MARK_ENTRY_DELETED(curr_entry_ptr);
|
|
||||||
tab->num_entries--;
|
|
||||||
update_range_for_deleted(tab, i);
|
|
||||||
@@ -1402,15 +1478,20 @@ st_update(st_table *tab, st_data_t key,
|
|
||||||
int retval, existing;
|
|
||||||
st_hash_t hash = do_hash(key, tab);
|
|
||||||
|
|
||||||
+ retry:
|
|
||||||
entries = tab->entries;
|
|
||||||
if (tab->bins == NULL) {
|
|
||||||
bin = find_entry(tab, hash, key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
existing = bin != UNDEFINED_ENTRY_IND;
|
|
||||||
entry = &entries[bin];
|
|
||||||
bin_ind = UNDEFINED_BIN_IND;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
bin_ind = find_table_bin_ind(tab, hash, key);
|
|
||||||
+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
existing = bin_ind != UNDEFINED_BIN_IND;
|
|
||||||
if (existing) {
|
|
||||||
bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE;
|
|
||||||
@@ -1489,14 +1570,19 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg,
|
|
||||||
hash = curr_entry_ptr->hash;
|
|
||||||
retval = (*func)(key, curr_entry_ptr->record, arg, 0);
|
|
||||||
if (rebuilds_num != tab->rebuilds_num) {
|
|
||||||
+ retry:
|
|
||||||
entries = tab->entries;
|
|
||||||
packed_p = tab->bins == NULL;
|
|
||||||
if (packed_p) {
|
|
||||||
i = find_entry(tab, hash, key);
|
|
||||||
+ if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
error_p = i == UNDEFINED_ENTRY_IND;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
i = find_table_entry_ind(tab, hash, key);
|
|
||||||
+ if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto retry;
|
|
||||||
error_p = i == UNDEFINED_ENTRY_IND;
|
|
||||||
i -= ENTRY_BASE;
|
|
||||||
}
|
|
||||||
@@ -1512,36 +1598,44 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg,
|
|
||||||
}
|
|
||||||
switch (retval) {
|
|
||||||
case ST_CONTINUE:
|
|
||||||
- break;
|
|
||||||
+ break;
|
|
||||||
case ST_CHECK:
|
|
||||||
- if (check_p)
|
|
||||||
- break;
|
|
||||||
+ if (check_p)
|
|
||||||
+ break;
|
|
||||||
case ST_STOP:
|
|
||||||
#ifdef ST_DEBUG
|
|
||||||
- st_check(tab);
|
|
||||||
-#endif
|
|
||||||
- return 0;
|
|
||||||
- case ST_DELETE:
|
|
||||||
- if (packed_p) {
|
|
||||||
- bin = find_entry(tab, hash, curr_entry_ptr->key);
|
|
||||||
- if (bin == UNDEFINED_ENTRY_IND)
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- bin_ind = find_table_bin_ind(tab, hash, curr_entry_ptr->key);
|
|
||||||
- if (bin_ind == UNDEFINED_BIN_IND)
|
|
||||||
- break;
|
|
||||||
- bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE;
|
|
||||||
- MARK_BIN_DELETED(tab, bin_ind);
|
|
||||||
- }
|
|
||||||
- st_assert(&entries[bin] == curr_entry_ptr);
|
|
||||||
- MARK_ENTRY_DELETED(curr_entry_ptr);
|
|
||||||
- tab->num_entries--;
|
|
||||||
- update_range_for_deleted(tab, bin);
|
|
||||||
+ st_check(tab);
|
|
||||||
+#endif
|
|
||||||
+ return 0;
|
|
||||||
+ case ST_DELETE: {
|
|
||||||
+ st_data_t key = curr_entry_ptr->key;
|
|
||||||
+
|
|
||||||
+ again:
|
|
||||||
+ if (packed_p) {
|
|
||||||
+ bin = find_entry(tab, hash, key);
|
|
||||||
+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0))
|
|
||||||
+ goto again;
|
|
||||||
+ if (bin == UNDEFINED_ENTRY_IND)
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ bin_ind = find_table_bin_ind(tab, hash, key);
|
|
||||||
+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0))
|
|
||||||
+ goto again;
|
|
||||||
+ if (bin_ind == UNDEFINED_BIN_IND)
|
|
||||||
+ break;
|
|
||||||
+ bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE;
|
|
||||||
+ MARK_BIN_DELETED(tab, bin_ind);
|
|
||||||
+ }
|
|
||||||
+ curr_entry_ptr = &entries[bin];
|
|
||||||
+ MARK_ENTRY_DELETED(curr_entry_ptr);
|
|
||||||
+ tab->num_entries--;
|
|
||||||
+ update_range_for_deleted(tab, bin);
|
|
||||||
#ifdef ST_DEBUG
|
|
||||||
- st_check(tab);
|
|
||||||
+ st_check(tab);
|
|
||||||
#endif
|
|
||||||
- break;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#ifdef ST_DEBUG
|
|
||||||
@@ -2015,10 +2109,12 @@ st_expand_table(st_table *tab, st_index_t siz)
|
|
||||||
free(tmp);
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Rehash using linear search. */
|
|
||||||
-static void
|
|
||||||
+/* Rehash using linear search. Return TRUE if we found that the table
|
|
||||||
+ was rebuilt. */
|
|
||||||
+static int
|
|
||||||
st_rehash_linear(st_table *tab)
|
|
||||||
{
|
|
||||||
+ int eq_p, rebuilt_p;
|
|
||||||
st_index_t i, j;
|
|
||||||
st_table_entry *p, *q;
|
|
||||||
if (tab->bins) {
|
|
||||||
@@ -2033,7 +2129,10 @@ st_rehash_linear(st_table *tab)
|
|
||||||
q = &tab->entries[j];
|
|
||||||
if (DELETED_ENTRY_P(q))
|
|
||||||
continue;
|
|
||||||
- if (PTR_EQUAL(tab, p, q->hash, q->key)) {
|
|
||||||
+ DO_PTR_EQUAL_CHECK(tab, p, q->hash, q->key, eq_p, rebuilt_p);
|
|
||||||
+ if (EXPECT(rebuilt_p, 0))
|
|
||||||
+ return TRUE;
|
|
||||||
+ if (eq_p) {
|
|
||||||
st_assert(p < q);
|
|
||||||
*p = *q;
|
|
||||||
MARK_ENTRY_DELETED(q);
|
|
||||||
@@ -2042,12 +2141,15 @@ st_rehash_linear(st_table *tab)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
-/* Rehash using index */
|
|
||||||
-static void
|
|
||||||
+/* Rehash using index. Return TRUE if we found that the table was
|
|
||||||
+ rebuilt. */
|
|
||||||
+static int
|
|
||||||
st_rehash_indexed(st_table *tab)
|
|
||||||
{
|
|
||||||
+ int eq_p, rebuilt_p;
|
|
||||||
st_index_t i;
|
|
||||||
st_index_t const n = bins_size(tab);
|
|
||||||
unsigned int const size_ind = get_size_ind(tab);
|
|
||||||
@@ -2076,26 +2178,32 @@ st_rehash_indexed(st_table *tab)
|
|
||||||
set_bin(bins, size_ind, ind, i + ENTRY_BASE);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- else if (PTR_EQUAL(tab, q, p->hash, p->key)) {
|
|
||||||
- /* duplicated key; delete it */
|
|
||||||
- st_assert(q < p);
|
|
||||||
- q->record = p->record;
|
|
||||||
- MARK_ENTRY_DELETED(p);
|
|
||||||
- tab->num_entries--;
|
|
||||||
- update_range_for_deleted(tab, bin);
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
else {
|
|
||||||
- /* hash collision; skip it */
|
|
||||||
+ DO_PTR_EQUAL_CHECK(tab, q, p->hash, p->key, eq_p, rebuilt_p);
|
|
||||||
+ if (EXPECT(rebuilt_p, 0))
|
|
||||||
+ return TRUE;
|
|
||||||
+ if (eq_p) {
|
|
||||||
+ /* duplicated key; delete it */
|
|
||||||
+ st_assert(q < p);
|
|
||||||
+ q->record = p->record;
|
|
||||||
+ MARK_ENTRY_DELETED(p);
|
|
||||||
+ tab->num_entries--;
|
|
||||||
+ update_range_for_deleted(tab, bin);
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ /* hash collision; skip it */
|
|
||||||
#ifdef QUADRATIC_PROBE
|
|
||||||
- ind = hash_bin(ind + d, tab);
|
|
||||||
- d++;
|
|
||||||
+ ind = hash_bin(ind + d, tab);
|
|
||||||
+ d++;
|
|
||||||
#else
|
|
||||||
- ind = secondary_hash(ind, tab, &peterb);
|
|
||||||
+ ind = secondary_hash(ind, tab, &peterb);
|
|
||||||
#endif
|
|
||||||
- }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Reconstruct TAB's bins according to TAB's entries. This function
|
|
||||||
@@ -2104,10 +2212,14 @@ st_rehash_indexed(st_table *tab)
|
|
||||||
static void
|
|
||||||
st_rehash(st_table *tab)
|
|
||||||
{
|
|
||||||
- if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS)
|
|
||||||
- st_rehash_linear(tab);
|
|
||||||
- else
|
|
||||||
- st_rehash_indexed(tab);
|
|
||||||
+ int rebuilt_p;
|
|
||||||
+
|
|
||||||
+ do {
|
|
||||||
+ if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS)
|
|
||||||
+ rebuilt_p = st_rehash_linear(tab);
|
|
||||||
+ else
|
|
||||||
+ rebuilt_p = st_rehash_indexed(tab);
|
|
||||||
+ } while (rebuilt_p);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef RUBY
|
|
||||||
--
|
|
||||||
2.16.1
|
|
||||||
|
|
||||||
70
ruby.spec
70
ruby.spec
|
|
@ -1,6 +1,6 @@
|
||||||
%global major_version 2
|
%global major_version 2
|
||||||
%global minor_version 5
|
%global minor_version 5
|
||||||
%global teeny_version 0
|
%global teeny_version 5
|
||||||
%global major_minor_version %{major_version}.%{minor_version}
|
%global major_minor_version %{major_version}.%{minor_version}
|
||||||
|
|
||||||
%global ruby_version %{major_minor_version}.%{teeny_version}
|
%global ruby_version %{major_minor_version}.%{teeny_version}
|
||||||
|
|
@ -21,15 +21,15 @@
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%global release 89
|
%global release 108
|
||||||
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
|
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
|
||||||
|
|
||||||
# The RubyGems library has to stay out of Ruby directory three, since the
|
# The RubyGems library has to stay out of Ruby directory tree, since the
|
||||||
# RubyGems should be share by all Ruby implementations.
|
# RubyGems should be share by all Ruby implementations.
|
||||||
%global rubygems_dir %{_datadir}/rubygems
|
%global rubygems_dir %{_datadir}/rubygems
|
||||||
|
|
||||||
# Bundled libraries versions
|
# Bundled libraries versions
|
||||||
%global rubygems_version 2.7.3
|
%global rubygems_version 2.7.6.2
|
||||||
%global molinillo_version 0.5.7
|
%global molinillo_version 0.5.7
|
||||||
|
|
||||||
# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
|
# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM.
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
%global json_version 2.1.0
|
%global json_version 2.1.0
|
||||||
%global minitest_version 5.10.3
|
%global minitest_version 5.10.3
|
||||||
%global net_telnet_version 0.1.1
|
%global net_telnet_version 0.1.1
|
||||||
%global openssl_version 2.1.0
|
%global openssl_version 2.1.2
|
||||||
%global power_assert_version 1.1.1
|
%global power_assert_version 1.1.1
|
||||||
%global psych_version 3.0.2
|
%global psych_version 3.0.2
|
||||||
%global rake_version 12.3.0
|
%global rake_version 12.3.0
|
||||||
|
|
@ -65,7 +65,6 @@
|
||||||
%bcond_without systemtap
|
%bcond_without systemtap
|
||||||
%bcond_without git
|
%bcond_without git
|
||||||
%bcond_without cmake
|
%bcond_without cmake
|
||||||
%bcond_without gmp
|
|
||||||
|
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
%bcond_without hardening_test
|
%bcond_without hardening_test
|
||||||
|
|
@ -82,7 +81,7 @@ Group: Development/Languages
|
||||||
# UCD: some of enc/trans/**/*.src
|
# UCD: some of enc/trans/**/*.src
|
||||||
License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD
|
License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD
|
||||||
URL: http://ruby-lang.org/
|
URL: http://ruby-lang.org/
|
||||||
Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz
|
Source0: https://cache.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz
|
||||||
Source1: operating_system.rb
|
Source1: operating_system.rb
|
||||||
# TODO: Try to push SystemTap support upstream.
|
# TODO: Try to push SystemTap support upstream.
|
||||||
Source2: libruby.stp
|
Source2: libruby.stp
|
||||||
|
|
@ -136,15 +135,6 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch
|
||||||
# Add Gem.operating_system_defaults to allow packagers to override defaults.
|
# Add Gem.operating_system_defaults to allow packagers to override defaults.
|
||||||
# https://github.com/rubygems/rubygems/pull/2116
|
# https://github.com/rubygems/rubygems/pull/2116
|
||||||
Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch
|
Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch
|
||||||
# Fix segfault during generating documentation.
|
|
||||||
# https://bugs.ruby-lang.org/issues/14343
|
|
||||||
Patch11: ruby-2.5.0-parse.y-assignable_error.patch
|
|
||||||
# Recent tzdata change breaks Ruby test suite.
|
|
||||||
# https://bugs.ruby-lang.org/issues/14438
|
|
||||||
Patch12: ruby-2.5.0-Disable-Tokyo-TZ-tests.patch
|
|
||||||
# Fix thread_safe tests suite segfaults.
|
|
||||||
# https://bugs.ruby-lang.org/issues/14357
|
|
||||||
Patch13: ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch
|
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Suggests: rubypick
|
Suggests: rubypick
|
||||||
|
|
@ -155,7 +145,6 @@ Recommends: rubygem(openssl) >= %{openssl_version}
|
||||||
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: gdbm-devel
|
BuildRequires: gdbm-devel
|
||||||
%{?with_hardening_test:BuildRequires: gmp-devel}
|
|
||||||
BuildRequires: libffi-devel
|
BuildRequires: libffi-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
BuildRequires: libyaml-devel
|
BuildRequires: libyaml-devel
|
||||||
|
|
@ -169,6 +158,7 @@ BuildRequires: procps
|
||||||
# Required to test hardening.
|
# Required to test hardening.
|
||||||
%{?with_hardening_test:BuildRequires: %{_bindir}/checksec}
|
%{?with_hardening_test:BuildRequires: %{_bindir}/checksec}
|
||||||
BuildRequires: multilib-rpm-config
|
BuildRequires: multilib-rpm-config
|
||||||
|
BuildRequires: gcc
|
||||||
|
|
||||||
# This package provides %%{_bindir}/ruby-mri therefore it is marked by this
|
# This package provides %%{_bindir}/ruby-mri therefore it is marked by this
|
||||||
# virtual provide. It can be installed as dependency of rubypick.
|
# virtual provide. It can be installed as dependency of rubypick.
|
||||||
|
|
@ -528,9 +518,6 @@ rm -rf ext/fiddle/libffi*
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch9 -p1
|
%patch9 -p1
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch11 -p1
|
|
||||||
%patch12 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
|
|
||||||
# Provide an example of usage of the tapset:
|
# Provide an example of usage of the tapset:
|
||||||
cp -a %{SOURCE3} .
|
cp -a %{SOURCE3} .
|
||||||
|
|
@ -743,9 +730,11 @@ make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}"
|
||||||
|
|
||||||
DISABLE_TESTS=""
|
DISABLE_TESTS=""
|
||||||
|
|
||||||
# https://bugs.ruby-lang.org/issues/11480
|
# SIGSEV handler does not provide correct output on AArch64.
|
||||||
# Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650
|
# https://bugs.ruby-lang.org/issues/13758
|
||||||
DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb"
|
%ifarch aarch64
|
||||||
|
DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_features\)/"
|
||||||
|
%endif
|
||||||
|
|
||||||
# Disable failing TestResolvMDNS#test_mdns_each_address test,
|
# Disable failing TestResolvMDNS#test_mdns_each_address test,
|
||||||
# which fails on Koji.
|
# which fails on Koji.
|
||||||
|
|
@ -1071,6 +1060,41 @@ make check TESTS="-v $DISABLE_TESTS"
|
||||||
%{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec
|
%{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 04 2019 Pavel Valena <pvalena@redhat.com> - 2.5.5-108
|
||||||
|
- Update to Ruby 2.5.5.
|
||||||
|
|
||||||
|
* Fri Jan 11 2019 Jun Aruga <jaruga@redhat.com> - 2.5.3-95
|
||||||
|
- Fix Tokyo TZ tests.
|
||||||
|
- Refresh expired certificates to fix FTBFS.
|
||||||
|
|
||||||
|
* Fri Oct 19 2018 Jun Aruga <jaruga@redhat.com> - 2.5.3-94
|
||||||
|
- Update to Ruby 2.5.3.
|
||||||
|
|
||||||
|
* Thu May 10 2018 Pavel Valena <pvalena@redhat.com> - 2.5.1-93
|
||||||
|
- Add macros to edit files lists in .gemspec
|
||||||
|
(gemspec_add_file and gemspec_remove_file).
|
||||||
|
|
||||||
|
* Wed May 02 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.1-93
|
||||||
|
- Make %%gemspec_{add,remove}_dep modify .gemspec provided by %%setup macro.
|
||||||
|
|
||||||
|
* Tue Apr 10 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.1-92
|
||||||
|
- Conflict requirement needs to generate dependency.
|
||||||
|
- Stop using --with-setjmp-type=setjmp on aarch64 (rhbz#1545239).
|
||||||
|
|
||||||
|
* Thu Mar 29 2018 Pavel Valena <pvalena@redhat.com> - 2.5.1-92
|
||||||
|
- Update to Ruby 2.5.1.
|
||||||
|
|
||||||
|
* Thu Mar 01 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.0-90
|
||||||
|
- Drop GMP dependency.
|
||||||
|
|
||||||
|
* Sat Feb 24 2018 Florian Weimer <fweimer@redhat.com> - 2.5.0-89
|
||||||
|
- Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239)
|
||||||
|
|
||||||
|
* Wed Feb 21 2018 Pavel Valena <pvalena@redhat.com> - 2.5.0-89
|
||||||
|
- Fix: Multiple vulnerabilities in RubyGems
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1547431
|
||||||
|
https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/
|
||||||
|
|
||||||
* Tue Feb 13 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.0-89
|
* Tue Feb 13 2018 Vít Ondruch <vondruch@redhat.com> - 2.5.0-89
|
||||||
- Drop obsolete ldconfig scriptlets.
|
- Drop obsolete ldconfig scriptlets.
|
||||||
- Add GMP dependency.
|
- Add GMP dependency.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,13 @@ module RubyGemsReq
|
||||||
when '~>'
|
when '~>'
|
||||||
expand_pessimistic_requirement(r)
|
expand_pessimistic_requirement(r)
|
||||||
when '!='
|
when '!='
|
||||||
|
# If there is only the conflict requirement, we still need to depend
|
||||||
|
# on the specified gem.
|
||||||
|
if requirements.size == 1
|
||||||
|
Gem::Requirement.default.requirements
|
||||||
|
else
|
||||||
[]
|
[]
|
||||||
|
end
|
||||||
else
|
else
|
||||||
[r]
|
[r]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (ruby-2.5.0.tar.xz) = 55714a33d7661fe8b432f73c34fd67b49699f8b79df1cbd680a74899124d31111ab0f444677672aac1ba725820182940d485efb2db0bf2bc96737c5d40c54578
|
SHA512 (ruby-2.5.5.tar.xz) = 06b1d58536ebfacb7b56c1e6ed4b8ab816fadc4f48c845a452554cd262e7908199a30e5793f3cbaec2db56a8803aa5c6089abf7bf06c8fc47867e97870b7dfec
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue