提交 41ebb556 编写于 作者: K Kasper Timm Hansen

Make ref return the internal symbol.

We delegate to_sym to the internal symbol, which we've already called to_sym on in
initialize, so we don't need to do that.

We also know to_sym will never return a falsy value, so we'll never hit to_s.

Just return the symbolized symbol.
上级 5d1b7c3b
......@@ -32,7 +32,7 @@ def initialize(symbol)
alias to_str to_s
def ref
to_sym || to_s
@symbol
end
def ==(type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册