[Webkit-unassigned] [Bug 206233] New: Offlineasm warnings with newer Ruby versions
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jan 14 07:48:13 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=206233
Bug ID: 206233
Summary: Offlineasm warnings with newer Ruby versions
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: aperez at igalia.com
Using Ruby 2.7 the following will be printed out:
/home/aperez/WebKit/Source/JavaScriptCore/offlineasm/parser.rb:631:
warning: deprecated Object#=~ is called on Annotation; it always returns nil
This is caused by the following change in Ruby:
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=65989&view=revision
I see that the Annotation class does *not* define an overload for the =~ operator,
so previously applying it to an Annotation instance was already returning “nil”
(but silently).
Therefore I *think* that swapping the checks in the code to something like
if @tokens[@idx].is_a? Annotation
# ...
elsif (@idx == @tokens.length and not final) or (final and @tokens[@idx] =~ final)
# ...
should both silence the warning and still be correct.
Note that I do not have much experience with Ruby, nor with modifying offlineasm,
so suggestions are definitely welcome.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200114/b3a839a2/attachment.htm>
More information about the webkit-unassigned
mailing list