Refactor example creation.
Created by: myronmarston
- Remove unnecessary
Array#last
call. - This version is threadsafe, whereas the prior
version wasn’t. Consider what would happen if
another thread added an example to the
examples
array while this was happening: it would have returned a different example than the one created here. We don’t actually do any multithreading when examples are defined, and have no plans to do so, but it’s always nice to make things more threadsafe.