Skip to content

Commit

Permalink
Merge pull request #1914 from stomar/struct-emsg
Browse files Browse the repository at this point in the history
use the same error message
  • Loading branch information
matz committed Mar 22, 2014
2 parents 6b43f71 + 4f0a163 commit 7182ef6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mrbgems/mruby-struct/src/struct.c
Expand Up @@ -124,7 +124,7 @@ mrb_struct_getmember(mrb_state *mrb, mrb_value obj, mrb_sym id)
return ptr[i];
}
}
mrb_raisef(mrb, E_INDEX_ERROR, "%S is not struct member", mrb_sym2str(mrb, id));
mrb_raisef(mrb, E_INDEX_ERROR, "`%S' is not a struct member", mrb_sym2str(mrb, id));
return mrb_nil_value(); /* not reached */
}

Expand Down Expand Up @@ -203,9 +203,8 @@ mrb_struct_set(mrb_state *mrb, mrb_value obj, mrb_value val)
return ptr[i] = val;
}
}
mrb_raisef(mrb, E_INDEX_ERROR, "`%S' is not a struct member",
mrb_sym2str(mrb, mid));
return mrb_nil_value(); /* not reached */
mrb_raisef(mrb, E_INDEX_ERROR, "`%S' is not a struct member", mrb_sym2str(mrb, mid));
return mrb_nil_value(); /* not reached */
}

static mrb_value
Expand Down

0 comments on commit 7182ef6

Please sign in to comment.