Equivalent of “pass” in Ruby
问题 In python there is a pass keyword for defining an empty function, condition, loop, ... Is there something similar for Ruby? Python Example: def some_function(): # do nothing pass 回答1: No, there is no such thing in Ruby. If you want an empty block, method, module, class etc., just write an empty block: def some_method end That's it. In Python, every block is required to contain at least one statement, that's why you need a "fake" no-op statement. Ruby doesn't have statements, it only has