Wouldn't this be more efficient?
```ruby
def chars(&block)
  if block
    each_char(&block)
  else
    each_char.to_a
  end
end
```