We already have IO#each_line, can't you just add Ruby code like this?
```ruby
def readline(sep=$/, limit=nil)
  each_line(sep, limit) do |line|
    return line
  end
end
```