faker-ruby/faker · error · ArgumentError

Characters quoted can be left blank or #{quoted_characters.j

Error message

Characters quoted can be left blank or #{quoted_characters.join(', ')}

What it means

Error "Characters quoted can be left blank or #{quoted_characters.join(', ')}" thrown in faker-ruby/faker.

Source

Thrown at lib/faker/books/dune.rb:83

        #
        # @example
        #   Faker::Books::Dune.quote
        #     #=> "A dead man, surely, no longer requires that water."
        # @example
        #   Faker::Books::Dune.quote(character: "baron_harkonnen")
        #     #=> "He who controls the spice, controls the universe!"
        #
        # @faker.version 1.9.3
        def quote(character: nil)
          quoted_characters = translate('faker.dune.quotes').keys

          if character.nil?
            character = sample(quoted_characters).to_s
          else
            character = character.to_s.downcase

            unless quoted_characters.include?(character.to_sym)
              raise ArgumentError,
                    "Characters quoted can be left blank or #{quoted_characters.join(', ')}"
            end
          end

          fetch("dune.quotes.#{character}")
        end

        ##
        # Produces a saying from Dune
        #
        # @param source [String]
        #
        # @return [String]
        #
        # @example
        #   Faker::Books::Dune.saying #=> "You do not beg the sun for mercy."
        # @example
        #   Faker::Books::Dune.saying(source: "fremen")

View on GitHub (pinned to cca4184947)

When it happens

Trigger: Thrown at lib/faker/books/dune.rb:83 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/946c9eda0e18fb4f. Report an issue: GitHub.