diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-08-09 22:25:45 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-08-09 22:25:45 +0900 |
| commit | 53f750dbed85bdf7342d5c4b1bc013c3169c15d6 (patch) | |
| tree | d04b3df5a85327f2385f0b3c0f08008b79f5360a /src/codegen.c | |
| parent | 3d3ca985b016afa7d07b59a067a661ce47b221ba (diff) | |
| download | mruby-53f750dbed85bdf7342d5c4b1bc013c3169c15d6.tar.gz mruby-53f750dbed85bdf7342d5c4b1bc013c3169c15d6.zip | |
def statement and define_method now return symbol a la Ruby2.1
Diffstat (limited to 'src/codegen.c')
| -rw-r--r-- | src/codegen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c index 34ccd616f..9b7116168 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -2317,7 +2317,7 @@ codegen(codegen_scope *s, node *tree, int val) pop(); genop(s, MKOP_AB(OP_METHOD, cursp(), sym)); if (val) { - genop(s, MKOP_A(OP_LOADNIL, cursp())); + genop(s, MKOP_ABx(OP_LOADSYM, cursp(), sym)); push(); } } @@ -2337,7 +2337,7 @@ codegen(codegen_scope *s, node *tree, int val) pop(); genop(s, MKOP_AB(OP_METHOD, cursp(), sym)); if (val) { - genop(s, MKOP_A(OP_LOADNIL, cursp())); + genop(s, MKOP_ABx(OP_LOADSYM, cursp(), sym)); push(); } } |
