Skip to content

Conversation

@elcuervo
Copy link

This is a totally stupid PR but I'll send it because I was going to add going to add a feature to CLI.add to allow multiple additions but then I regret it :P

Using class Something < Struct.new(:a) generates a useless instance of which the class inherits. It can be called Something = Struct.new(:a)

class A < Struct.new(:a)
end

B = Struct.new(:b)

A.ancestors
# => [A, #<Class:0x007fbee3027908>, Struct, Enumerable, Object, Kernel, BasicObject]

B.ancestors
# => [B, Struct, Enumerable, Object, Kernel, BasicObject]

Again, this is probably stupid but I enjoy reading your code.

@djanowski
Copy link
Contributor

+1 :)

@frodsan
Copy link

frodsan commented Apr 22, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants