Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Prism.dump_options_command_line
dump_options_command_line(options)
lib/prism/ffi.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/prism/ffi.rb, line 409
def dump_options_command_line(options)
command_line = options.fetch(:command_line, "")
raise ArgumentError, "command_line must be a string" unless command_line.is_a?(String)
command_line.each_char.inject(0) do |value, char|
case char
when "a" then value | 0b000001
when "e" then value | 0b000010
when "l" then value | 0b000100
when "n" then value | 0b001000
when "p" then value | 0b010000
when "x" then value | 0b100000
else raise ArgumentError, "invalid command_line option: #{char}"
end
end
end
Return the value that should be dumped for the command_line option.