Skip to content

Instantly share code, notes, and snippets.

@nanase
Last active August 29, 2015 14:11
Show Gist options
  • Select an option

  • Save nanase/28364343e14f8a59009a to your computer and use it in GitHub Desktop.

Select an option

Save nanase/28364343e14f8a59009a to your computer and use it in GitHub Desktop.
アサーションクラスの内部実装メモ
/* [Lury] */
@public static
<BuiltIn>
class Assert:
### ** Caution **
### On this class, _DO NOT USE_ assert and enforce function in each functions.
@public static
<DebugOnly>
<Intrinsic>
def assert(condition,
lazy message = nil : String,
lazy exception = nil : Exception,
file = reflect(file) : String,
line = reflect(line) : Integer):
pass
<Intrinsic>
def enforce(value,
lazy message = nil : String,
lazy exception = nil : Exception,
file = reflect(file) : String,
line = reflect(line) : Integer) -> value:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment