{"record":{"id":"22dc4b27d1aa8a52","repo":"puppetlabs/puppet","slug":"options-include-containers-and-include-values","errorCode":null,"errorMessage":"Options 'include_containers' and 'include_values' cannot both be false","messagePattern":"Options 'include_containers' and 'include_values' cannot both be false","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/pops/types/tree_iterators.rb","lineNumber":47,"sourceCode":"  #\n  def initialize(enum, options = EMPTY_HASH)\n    @root = enum\n    @element_t = nil\n    @value_stack = [enum]\n    @indexer_stack = []\n    @current_path = []\n    @recursed = false\n    @containers_t = options['container_type'] || DEFAULT_CONTAINERS\n    unless DEFAULT_CONTAINERS.assignable?(@containers_t)\n      raise ArgumentError, _(\"Only Array, Hash, and Object types can be used as container types. Got %{type}\") % { type: @containers_t }\n    end\n\n    @with_root       = extract_option(options, 'include_root', true)\n    @with_containers = extract_option(options, 'include_containers', true)\n    @with_values     = extract_option(options, 'include_values', true)\n    @with_root       = @with_containers && extract_option(options, 'include_root', true)\n    unless @with_containers || @with_values\n      raise ArgumentError, _(\"Options 'include_containers' and 'include_values' cannot both be false\")\n    end\n\n    @include_refs = !!options['include_refs']\n  end\n\n  # Yields each `path, value` if the block arity is 2, and only `value` if arity is 1\n  #\n  def each(&block)\n    loop do\n      if block.arity == 1\n        yield(self.next)\n      else\n        yield(*self.next)\n      end\n    end\n  end\n\n  def size","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/pops/types/tree_iterators.rb#L29-L65","documentation":"Error \"Options 'include_containers' and 'include_values' cannot both be false\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/pops/types/tree_iterators.rb:47 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}