<commit_before>F=
->s,l{s+=' '*(l-s.size%l)
(s.size/l).times{|i|x=s[i*l,l]
puts [x,x.reverse][i%2]}}

require 'minitest/autorun'

describe F do
  def test_case_1
    expected = <<-EOS
Prog
mmar
ing 
zzuP
les 
oC &
de G
 flo
EOS

    actual = capture_stdout(){ F['Programming Puzzles & Code Golf', 4] }

    assert_equal expected, actual
  end

  def test_case_2
    expected = <<-EOS
Hello<commit_msg>saved 2 chars by inlining variable `x`<commit_after>F=
->s,l{s+=' '*(l-s.size%l)
(s.size/l).times{|i|puts [x=s[i*l,l],x.reverse][i%2]}}

require 'minitest/autorun'

describe F do
  def test_case_1
    expected = <<-EOS
Prog
mmar
ing 
zzuP
les 
oC &
de G
 flo
EOS

    actual = capture_stdout(){ F['Programming Puzzles & Code Golf', 4] }

    assert_equal expected, actual
  end

  def test_case_2
    expected = <<-EOS
Hello
{'fraction_non_alphanumeric': 0.15757575757575756, 'fraction_numerical': 0.01090909090909091, 'mean_word_length': 3.640449438202247, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, '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': '6810309', 'n_tokens_mistral': 376, 'n_tokens_neox': 360, 'n_words': 86}