Title: [290104] trunk/Source/WTF
Revision
290104
Author
[email protected]
Date
2022-02-17 18:46:22 -0800 (Thu, 17 Feb 2022)

Log Message

GeneratePreferences.rb: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated
https://bugs.webkit.org/show_bug.cgi?id=236684

Reviewed by Yusuke Suzuki.

With Ruby 3.1.0, GeneratePreferences.rb reported the following warnings.
> GeneratePreferences.rb:235: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
> GeneratePreferences.rb:235: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.

* Scripts/GeneratePreferences.rb: Changed to use the keyword argument for ERB.new.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (290103 => 290104)


--- trunk/Source/WTF/ChangeLog	2022-02-18 02:31:16 UTC (rev 290103)
+++ trunk/Source/WTF/ChangeLog	2022-02-18 02:46:22 UTC (rev 290104)
@@ -1,3 +1,16 @@
+2022-02-17  Fujii Hironori  <[email protected]>
+
+        GeneratePreferences.rb: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated
+        https://bugs.webkit.org/show_bug.cgi?id=236684
+
+        Reviewed by Yusuke Suzuki.
+
+        With Ruby 3.1.0, GeneratePreferences.rb reported the following warnings.
+        > GeneratePreferences.rb:235: warning: Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.
+        > GeneratePreferences.rb:235: warning: Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.
+
+        * Scripts/GeneratePreferences.rb: Changed to use the keyword argument for ERB.new.
+
 2022-02-17  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r289974.

Modified: trunk/Source/WTF/Scripts/GeneratePreferences.rb (290103 => 290104)


--- trunk/Source/WTF/Scripts/GeneratePreferences.rb	2022-02-18 02:31:16 UTC (rev 290103)
+++ trunk/Source/WTF/Scripts/GeneratePreferences.rb	2022-02-18 02:46:22 UTC (rev 290104)
@@ -232,7 +232,7 @@
     resultFile = File.join(outputDirectory, File.basename(templateFile, ".erb"))
     tempResultFile = resultFile + ".tmp"
 
-    output = ERB.new(File.read(templateFile), 0, "-").result(binding)
+    output = ERB.new(File.read(templateFile), trim_mode:"-").result(binding)
     File.open(tempResultFile, "w+") do |f|
       f.write(output)
     end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to