{"record":{"id":"937adccd1c392493","repo":"puppetlabs/puppet","slug":"numerical-variables-cannot-be-deleted-attempt-to","errorCode":null,"errorMessage":"Numerical variables cannot be deleted: Attempt to delete: $%{name}","messagePattern":"Numerical variables cannot be deleted: Attempt to delete: \\$%(.+?)","errorType":"exception","errorClass":"Puppet::ParseError","httpStatus":null,"severity":"error","filePath":"lib/puppet/parser/scope.rb","lineNumber":159,"sourceCode":"    def include?(name)\n      bound?(name) or super\n    end\n\n    def bound?(name)\n      # A \"match variables\" scope reports all numeric variables to be bound if the scope has\n      # match_data. Without match data the scope is transparent.\n      #\n      @match_data && name =~ /^\\d+$/\n    end\n\n    def []=(name, value)\n      # TODO: Bad choice of exception\n      raise Puppet::ParseError, _(\"Numerical variables cannot be changed. Attempt to set $%{name}\") % { name: name }\n    end\n\n    def delete(name)\n      # TODO: Bad choice of exception\n      raise Puppet::ParseError, _(\"Numerical variables cannot be deleted: Attempt to delete: $%{name}\") % { name: name }\n    end\n\n    def add_entries_to(target = {}, include_undef = false)\n      # do not include match data ($0-$n)\n      super\n    end\n  end\n\n  # @api private\n  class ParameterScope < Ephemeral\n    class Access\n      attr_accessor :value\n\n      def assigned?\n        instance_variable_defined?(:@value)\n      end\n    end\n","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/parser/scope.rb#L141-L177","documentation":"Error \"Numerical variables cannot be deleted: Attempt to delete: $%{name}\" thrown in puppetlabs/puppet.","triggerScenarios":"Thrown at lib/puppet/parser/scope.rb:159 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"}