~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to parse.y

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum, Daigo Moriwaki, Lucas Nussbaum
  • Date: 2011-07-25 20:27:20 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20110725202720-9qfs7iam0ml7e1kc
Tags: 1.9.2.290-1
[ Daigo Moriwaki ]
* New upstream release.
* Removed debian/patches/110411_disable_osslv2.patch, which has been applied
  by the upstream.
* Added a patch: debian/patches/debian/patches/110716-bigdecimal,
  which was backported from the upstream (r30993)
  (CVE-2011-0188; Closes: 628450)

[ Lucas Nussbaum ]
* Build-depend on tcl-dev and tk-dev instead of {tcl,tk}8.4-dev.
* Update Lucas' email address.
* Add 110825-ossl-config.diff: backport changes to the OpenSSL
  extension to fix test failure.
* Add patch 110720_tcltk_disable_rpath.diff: disable rpath in tcltk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1507
1507
                    /*%%%*/
1508
1508
                        $$ = NEW_MASGN($1, NEW_POSTARG(-1, $4));
1509
1509
                    /*%
1510
 
                        $$ = mlhs_add_star($1, Qnil);
 
1510
                        $1 = mlhs_add_star($1, Qnil);
 
1511
                        $$ = mlhs_add($1, $4);
1511
1512
                    %*/
1512
1513
                    }
1513
1514
                | tSTAR mlhs_node
1523
1524
                    /*%%%*/
1524
1525
                        $$ = NEW_MASGN(0, NEW_POSTARG($2,$4));
1525
1526
                    /*%
1526
 
                        $$ = mlhs_add_star(mlhs_new(), $2);
 
1527
                        $2 = mlhs_add_star(mlhs_new(), $2);
 
1528
                        $$ = mlhs_add($2, $4);
1527
1529
                    %*/
1528
1530
                    }
1529
1531
                | tSTAR
1540
1542
                        $$ = NEW_MASGN(0, NEW_POSTARG(-1, $3));
1541
1543
                    /*%
1542
1544
                        $$ = mlhs_add_star(mlhs_new(), Qnil);
 
1545
                        $$ = mlhs_add($$, $3);
1543
1546
                    %*/
1544
1547
                    }
1545
1548
                ;
3935
3938
                        $$ = NEW_ZARRAY();
3936
3939
                    /*%
3937
3940
                        $$ = dispatch0(words_new);
 
3941
                        $$ = dispatch1(array, $$);
3938
3942
                    %*/
3939
3943
                    }
3940
3944
                | tWORDS_BEG word_list tSTRING_END
3941
3945
                    {
 
3946
                    /*%%%*/
3942
3947
                        $$ = $2;
 
3948
                    /*%
 
3949
                        $$ = dispatch1(array, $2);
 
3950
                    %*/
3943
3951
                    }
3944
3952
                ;
3945
3953
 
3985
3993
                        $$ = NEW_ZARRAY();
3986
3994
                    /*%
3987
3995
                        $$ = dispatch0(qwords_new);
 
3996
                        $$ = dispatch1(array, $$);
3988
3997
                    %*/
3989
3998
                    }
3990
3999
                | tQWORDS_BEG qword_list tSTRING_END
3991
4000
                    {
 
4001
                    /*%%%*/
3992
4002
                        $$ = $2;
 
4003
                    /*%
 
4004
                        $$ = dispatch1(array, $2);
 
4005
                    %*/
3993
4006
                    }
3994
4007
                ;
3995
4008
 
5204
5217
    must_be_ascii_compatible(line);
5205
5218
#ifndef RIPPER
5206
5219
    if (ruby_debug_lines) {
 
5220
        rb_enc_associate(line, parser->enc);
5207
5221
        rb_ary_push(ruby_debug_lines, line);
5208
5222
    }
5209
5223
    if (ruby_coverage) {
5959
5973
 
5960
5974
    tokfix();
5961
5975
    set_yylval_str(STR_NEW3(tok(), toklen(), enc, func));
 
5976
 
 
5977
#ifdef RIPPER
 
5978
    if (!NIL_P(parser->delayed)){
 
5979
        ptrdiff_t len = lex_p - parser->tokp;
 
5980
        if (len > 0) {
 
5981
            rb_enc_str_buf_cat(parser->delayed, parser->tokp, len, enc);
 
5982
        }
 
5983
        ripper_dispatch_delayed_token(parser, tSTRING_CONTENT);
 
5984
        parser->tokp = lex_p;
 
5985
    }
 
5986
#endif
 
5987
 
5962
5988
    return tSTRING_CONTENT;
5963
5989
}
5964
5990
 
6206
6232
        if (rb_memcicmp(name + nlen + 1, "unix", 4) == 0)
6207
6233
            return nlen;
6208
6234
    }
6209
 
    if (len > 4 && name[nlen = len - 5] == '-') {
 
6235
    if (len > 4 && name[nlen = len - 4] == '-') {
6210
6236
        if (rb_memcicmp(name + nlen + 1, "dos", 3) == 0)
6211
6237
            return nlen;
6212
 
        if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0)
 
6238
        if (rb_memcicmp(name + nlen + 1, "mac", 3) == 0 &&
 
6239
            !(len == 8 && rb_memcicmp(name, "utf8-mac", len) == 0))
 
6240
            /* exclude UTF8-MAC because the encoding named "UTF8" doesn't exist in Ruby */
6213
6241
            return nlen;
6214
6242
    }
6215
6243
    return len;
6239
6267
        goto error;
6240
6268
    }
6241
6269
    parser->enc = enc;
 
6270
#ifndef RIPPER
 
6271
    if (ruby_debug_lines) {
 
6272
        long i, n = RARRAY_LEN(ruby_debug_lines);
 
6273
        const VALUE *p = RARRAY_PTR(ruby_debug_lines);
 
6274
        for (i = 0; i < n; ++i) {
 
6275
            rb_enc_associate_index(*p, idx);
 
6276
        }
 
6277
    }
 
6278
#endif
6242
6279
}
6243
6280
 
6244
6281
static int
7796
7833
#ifdef RIPPER
7797
7834
    if (!NIL_P(parser->delayed)) {
7798
7835
        ripper_dispatch_delayed_token(parser, t);
 
7836
        return t;
7799
7837
    }
7800
7838
    if (t != 0)
7801
7839
        ripper_dispatch_scan_event(parser, t);