diff options
author | Tim Felgentreff <timfelgentreff@gmail.com> | 2011-08-09 15:07:32 -0700 |
---|---|---|
committer | Tim Felgentreff <timfelgentreff@gmail.com> | 2011-08-09 15:07:32 -0700 |
commit | b6b622db8cc36c334e6dd635e8cdbf62bb35f172 (patch) | |
tree | f8e52c5d91d365f1e96bf927ffb5dd35fff1ab50 | |
parent | cc178803a1e38c7f03b0d23984ba50042d40dcb5 (diff) | |
download | json-b6b622db8cc36c334e6dd635e8cdbf62bb35f172.tar.gz |
Throwing this error on Maglev is inappropriate
-rw-r--r-- | ext/json/ext/parser/parser.c | 2 | ||||
-rw-r--r-- | ext/json/ext/parser/parser.rl | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/ext/json/ext/parser/parser.c b/ext/json/ext/parser/parser.c index b28a6fc..5cee27d 100644 --- a/ext/json/ext/parser/parser.c +++ b/ext/json/ext/parser/parser.c @@ -1649,9 +1649,11 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) GET_PARSER_INIT; init_count += 1; +#ifndef MAGLEV if (json->Vsource) { rb_raise(rb_eTypeError, "already initialized instance"); } +#endif rb_scan_args(argc, argv, "11", &source, &opts); source = convert_encoding(StringValue(source)); ptr = RSTRING_PTR(source); diff --git a/ext/json/ext/parser/parser.rl b/ext/json/ext/parser/parser.rl index fad8ac7..feb0093 100644 --- a/ext/json/ext/parser/parser.rl +++ b/ext/json/ext/parser/parser.rl @@ -647,9 +647,11 @@ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self) GET_PARSER_INIT; init_count += 1; +#ifndef MAGLEV if (json->Vsource) { rb_raise(rb_eTypeError, "already initialized instance"); } +#endif rb_scan_args(argc, argv, "11", &source, &opts); source = convert_encoding(StringValue(source)); ptr = RSTRING_PTR(source); |