@randx yes, you are right. In this case better use `branch?` method for select branch or tag:
``` bash
pry(main)> r.refs.first
=> #<Rugged::Reference:70326359371040 {name: "refs/heads/develop", target: "11ccf06cfe5f61c342af35022731a86f6c02f097"}>
pry(main)> r.refs.first.branch?
=> true
```