Skip to content

Commit

Permalink
add example using map.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed May 11, 2012
1 parent fc216af commit 4b85db9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,9 @@ func main() {
for _, i := range mrb.Eval(`ARGV.map {|x| x + 1}`, 1, 2, 3).([]interface{}) {
println(i.(int32)) // 2 3 4
}

mrb.Run(`p ARGV[0]`, map[string]interface{} {
"foo": "bar",
"bar": "baz",
})
}

0 comments on commit 4b85db9

Please sign in to comment.