diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-09 11:04:36 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-09 11:04:36 +0900 |
| commit | 96168852c358b0940f28730cd8f97ae5a819244a (patch) | |
| tree | 877d197c7e05da359c519952bb02d3366609a3d2 /src/kernel.c | |
| parent | 22bd603a7ee41f018c81fad94e6f18738713245b (diff) | |
| download | mruby-96168852c358b0940f28730cd8f97ae5a819244a.tar.gz mruby-96168852c358b0940f28730cd8f97ae5a819244a.zip | |
move declaration in the middle
Diffstat (limited to 'src/kernel.c')
| -rw-r--r-- | src/kernel.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/kernel.c b/src/kernel.c index 8ae04de32..64e780df2 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -765,13 +765,10 @@ mrb_obj_ivar_set(mrb_state *mrb, mrb_value self) { mrb_value key; mrb_value val; + mrb_sym id; mrb_get_args(mrb, "oo", &key, &val); - mrb_sym id = mrb_to_id(mrb, key); - - //if (!mrb_is_instance_id(id)) { - // mrb_name_error(mrb, id, "`%s' is not allowed as an instance variable name", mrb_sym2name(mrb, id)); - //} + id = mrb_to_id(mrb, key); mrb_iv_set(mrb, self, id, val); return val; } |
