cgi
cgi copied to clipboard
Drop C89 support (= Ruby 2.x support)?
ext/cgi/escape.c uses C99 features, which cannot use before ruby 3.0.
- Designated Initializers for
html_escape_table
- Variable declaration after code in
optimized_escape_html
The latter is easy to make C89-compliant but the former needs to expand the table.
I would say C99 is okay, personally.
The problem is it must be C89-compliant to support ruby 2.x, which will not reach the EOL one year at least.
My understanding is that Ruby 2.7 is the earliest version to require a C99 compiler: https://bugs.ruby-lang.org/projects/ruby-master/wiki/C99
Apparently, the C99-ism was introduced before cgi
was extracted to this repo, and it has been included in all existing gem releases 0.1.0-0.3.1.