提交 633059a4 编写于 作者: R Ryuta Kamizono
上级 edaf32ce
......@@ -15,6 +15,7 @@ def try(method_name = nil, *args, &b)
public_send(method_name, *args, &b)
end
end
ruby2_keywords(:try) if respond_to?(:ruby2_keywords, true)
def try!(method_name = nil, *args, &b)
if method_name.nil? && block_given?
......@@ -27,6 +28,7 @@ def try!(method_name = nil, *args, &b)
public_send(method_name, *args, &b)
end
end
ruby2_keywords(:try!) if respond_to?(:ruby2_keywords, true)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册