File Remove-rb_set_safe_level-call.patch of Package kross-interpreters4
From 473116aa9977b64f5a47fdeda1efc62aa640c5c8 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Sun, 25 Jul 2021 17:09:52 +0200
Subject: [PATCH] Remove rb_set_safe_level call
As Harald says:
* level 4 was removed ages ago so setting it at best causes a warning, possibly an exception (haven't checked): https://bugs.ruby-lang.org/issues/8468
* ruby 2.7 deprecated the entire concept https://bugs.ruby-lang.org/issues/16131 turning all this noop, 3.0 makes it aggressively warned, master has it removed entirely
* therefore the only supported version that still has a notion of safe is 2.6 and that goes EOL in less than a year https://www.ruby-lang.org/en/downloads/branches/
* all the arguments for why safe was removed are already true for 2.6 anyway. indeed the advise to not rely on safe as any system of safety is at least as old as 2.0 (that is 2013)
all in all there's no point in us setting safe at all
---
ruby/rubyinterpreter.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/ruby/rubyinterpreter.cpp b/ruby/rubyinterpreter.cpp
index 3bccdc2..61cae68 100644
--- a/ruby/rubyinterpreter.cpp
+++ b/ruby/rubyinterpreter.cpp
@@ -64,9 +64,6 @@ RubyInterpreter::RubyInterpreter(Kross::InterpreterInfo* info)
{
initRuby();
}
-
- const int defaultsafelevel = 4; // per default use the maximum safelevel
- rb_set_safe_level( info->optionValue("safelevel", defaultsafelevel).toInt() );
}
RubyInterpreter::~RubyInterpreter()
--
GitLab