PHP 8.2.31
Preview: scan_byte.rb Size: 294 B
//proc/thread-self/root/opt/alt/ruby40/share/ruby/prism/polyfill/scan_byte.rb

# frozen_string_literal: true

require "strscan"

# Polyfill for StringScanner#scan_byte, which didn't exist until Ruby 3.4.
if !(StringScanner.method_defined?(:scan_byte))
  StringScanner.include(
    Module.new {
      def scan_byte # :nodoc:
        get_byte&.b&.ord
      end
    }
  )
end

Directory Contents

Dirs: 0 × Files: 5

Name Size Perms Modified Actions
371 B lrw-r--r-- 2026-05-21 12:15:22
Edit Download
324 B lrw-r--r-- 2026-05-21 12:15:22
Edit Download
294 B lrw-r--r-- 2026-05-21 12:15:22
Edit Download
536 B lrw-r--r-- 2026-05-21 12:15:22
Edit Download
987 B lrw-r--r-- 2026-05-21 12:15:22
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).