<commit_before>module SmartAnswer
  module Question
    class Base < Node
      class NextNodeUndefined < StandardError; end

      attr_reader :permitted_next_nodes

      def initialize(flow, name, options = {}, &block)
        @save_input_as = nil
        @validations = []
        @next_node_block = lambda {|_|}
        @permitted_next_nodes = []
        super
      end

      def next_node(next_node = nil, permitted: [], &block)
        if block_given?
          unless permitted.any?
            raise ArgumentError, 'You must specify at least one permitted next node'
          end
          @permitted_next_nodes += permitted
          @next_node_block = block
        elsif next_node
          @permitted_next_nodes = [next_node]<commit_msg>Make next_node_block default return value more explicit<commit_after>module SmartAnswer
  module Question
    class Base < Node
      class NextNodeUndefined < StandardError; end

      attr_reader :permitted_next_nodes

      def initialize(flow, name, options = {}, &block)
        @save_input_as = nil
        @validations = []
        @next_node_block = lambda { |_| nil }
        @permitted_next_nodes = []
        super
      end

      def next_node(next_node = nil, permitted: [], &block)
        if block_given?
          unless permitted.any?
            raise ArgumentError, 'You must specify at least one permitted next node'
          end
          @permitted_next_nodes += permitted
          @next_node_block = block
        elsif next_node
          @permitted_next_nodes = [next_node]
{'fraction_non_alphanumeric': 0.07207207207207207, 'fraction_numerical': 0.0, 'mean_word_length': 2.336909871244635, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5778437', 'n_tokens_mistral': 431, 'n_tokens_neox': 418, 'n_words': 116}