Tags / 19 posts

#ruby

2020 1 post

  1. Hidden cost of string indexing in Ruby

    Non-ASCII characters turn Ruby’s String#[] from O(1) into an O(n) scan, as benchmarks and MRI’s coderange string flag show.

2019 1 post

  1. Testing Infinite Loop in Ruby

    Unit test a worker built around Kernel#loop by extracting its body, then cutting the loop short with Timeout or stubbing loop in RSpec.

2018 1 post

  1. How to fix intermittent test failures

    Bisect a test run to find the test that leaks state, then fix flaky tests that rely on undefined ordering or on the current time.

2015 2 posts

2014 1 post

2013 3 posts

2012 8 posts

2011 2 posts