Skip to content

Instantly share code, notes, and snippets.

@laiso
Created August 30, 2016 13:22
Show Gist options
  • Save laiso/cdcec81029dcc29dc4be10ffb496b712 to your computer and use it in GitHub Desktop.
Save laiso/cdcec81029dcc29dc4be10ffb496b712 to your computer and use it in GitHub Desktop.
講義全然聞いてなかったけどこのコードが動くようになってうれしい #CodePiece
import CMruby
import CMrubyCompile
let mrb = mrb_open()
let value = mrb_load_string(mrb, "1+1")
print("Result: \(value.value.i)") // 2
mrb_close(mrb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment