faker-ruby/faker · error · ArgumentError
unknown return type: #{@as_type}
Error message
unknown return type: #{@as_type} What it means
Error "unknown return type: #{@as_type}" thrown in faker-ruby/faker.
Source
Thrown at lib/helpers/positional_generator.rb:349
end
result.sort_by do |component_position, _, _|
component_position
end
end
##
# @param values [Array<Object>]
# @return [String] if +@as_type+ is +:string+
# @raise [ArgumentError] if +@as_type+ is unsupported
def convert(values)
case @as_type
when :string
values.inject('') do |acc, (_, _, v)|
"#{acc}#{v}"
end
else
raise ArgumentError, "unknown return type: #{@as_type}"
end
end
class Group
def initialize(as_type, block)
@as_type = as_type
@block = block
end
def generate(_)
builder = Builder.new(@as_type)
@block.call(builder)
builder.build
end
end
class Oneof
def initialize(builder, block)View on GitHub (pinned to cca4184947)
When it happens
Trigger: Thrown at lib/helpers/positional_generator.rb:349 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of faker-ruby/faker@cca4184947 (2026-08-21).
Data as JSON: /api/errors/429faf10f40651b1.
Report an issue: GitHub.