```ruby
require 'etc'

Etc.instance_eval do
  def groupname(gid)
    Etc.group { |e| return e.name if gid == e.gid }
    nil
  end

  def username(uid)
    Etc.passwd { |e| return e.name if uid == e.uid }
    nil
  end
end
```

Remove explicit (and unnecessary) `nil` from Etc.groupname and Etc.username
user
```ruby
require 'etc'

Etc.instance_eval do
  def groupname(gid)
    Etc.group { |e| return e.name if gid == e.gid }
  end

  def username(uid)
    Etc.passwd { |e| return e.name if uid == e.uid }
  end
end
```
assistant