summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-09-25 09:08:54 +0900
committerKoichi Sasada <ko1@atdot.net>2020-09-25 12:52:53 +0900
commitfde136152eacca454bfb978347abfa67bd73ac4d (patch)
treef7842f6647138c0f9e526b2bb346f75d098c9c9a /spec/ruby
parentc6c241e49c35a2bf0079499459f60f470f97395a (diff)
should not check taint flag on rubyspec.
Now taint flag is obsolete and it is used fro shareaable flag. So we should not check this flag.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3575
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/optional/capi/ext/rbasic_spec.c4
-rw-r--r--spec/ruby/optional/capi/shared/rbasic.rb4
2 files changed, 6 insertions, 2 deletions
diff --git a/spec/ruby/optional/capi/ext/rbasic_spec.c b/spec/ruby/optional/capi/ext/rbasic_spec.c
index 05eca76ba7..cf10904294 100644
--- a/spec/ruby/optional/capi/ext/rbasic_spec.c
+++ b/spec/ruby/optional/capi/ext/rbasic_spec.c
@@ -5,7 +5,11 @@
extern "C" {
#endif
+#ifndef FL_SHAREABLE
static const VALUE VISIBLE_BITS = FL_TAINT | FL_FREEZE | ~(FL_USER0 - 1);
+#else
+static const VALUE VISIBLE_BITS = FL_FREEZE | ~(FL_USER0 - 1);
+#endif
#if SIZEOF_VALUE == SIZEOF_LONG
#define VALUE2NUM(v) ULONG2NUM(v)
diff --git a/spec/ruby/optional/capi/shared/rbasic.rb b/spec/ruby/optional/capi/shared/rbasic.rb
index c25733f862..f202b72f33 100644
--- a/spec/ruby/optional/capi/shared/rbasic.rb
+++ b/spec/ruby/optional/capi/shared/rbasic.rb
@@ -66,9 +66,9 @@ describe :rbasic, shared: true do
obj1, obj2 = @data.call
initial = @specs.get_flags(obj1)
@specs.get_flags(obj2).should == initial
- @specs.set_flags(obj1, @taint | 1 << 14 | 1 << 16 | initial)
+ @specs.set_flags(obj1, 1 << 14 | 1 << 16 | initial)
@specs.copy_flags(obj2, obj1)
- @specs.get_flags(obj2).should == @taint | 1 << 14 | 1 << 16 | initial
+ @specs.get_flags(obj2).should == 1 << 14 | 1 << 16 | initial
@specs.set_flags(obj1, initial)
@specs.copy_flags(obj2, obj1)
@specs.get_flags(obj2).should == initial