<commit_before>module B3Form
  class Input::RadioGroup < Input::TopLevelElement

    private

    def render_field
      html   = nil
      layout = options[:layout] || builder.default_radio_layout
      
      builder.modifier[:radio_field]        = field
      builder.modifier[:radio_layout]       = layout
      builder.modifier[:inside_radio_group] = true
      
      html = if render_called_with_block
        builder.capture(&render_called_with_block)
      else
        ''.html_safe
      end
      
      builder.modifier.delete(:inside_radio_group)
      builder.modifier[:radio_layout] = builder.default_radio_layout

      html
    end
  end
end<commit_msg>fix crash when render is called with empty block<commit_after>module B3Form
  class Input::RadioGroup < Input::TopLevelElement

    private

    def render_field
      html   = nil
      layout = options[:layout] || builder.default_radio_layout
      
      builder.modifier[:radio_field]        = field
      builder.modifier[:radio_layout]       = layout
      builder.modifier[:inside_radio_group] = true
      
      html = builder.capture(&render_called_with_block) if render_called_with_block
      
      builder.modifier.delete(:inside_radio_group)
      builder.modifier[:radio_layout] = builder.default_radio_layout
      
      html || ''.html_safe
    end
  end
end
{'fraction_non_alphanumeric': 0.0757238307349666, 'fraction_numerical': 0.0014847809948032665, 'mean_word_length': 2.723756906077348, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7463502', 'n_tokens_mistral': 389, 'n_tokens_neox': 379, 'n_words': 71}