ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: shyouhei@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:74488] [Ruby trunk Bug#12203][Assigned] dumper.c static int yaml_emitter_dump_scalar two variables have the same value
Date: Tue, 22 Mar 2016 11:49:00 +0000	[thread overview]
Message-ID: <redmine.journal-57609.20160322114900.e5597fb6f0e1cb99@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-12203.20160320122950@ruby-lang.org

Issue #12203 has been updated by Shyouhei Urabe.

Status changed from Open to Assigned
Assignee set to Aaron Patterson

They are passed to a macro.  I guess the author intentionally separated these two because merging them makes the code less intuitive.  It seems OK to be optimized.

----------------------------------------
Bug #12203: dumper.c  static int yaml_emitter_dump_scalar two variables have the same value
https://bugs.ruby-lang.org/issues/12203#change-57609

* Author: Anton Sivakov
* Status: Assigned
* Priority: Normal
* Assignee: Aaron Patterson
* ruby -v: 
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
~~~
static int
yaml_emitter_dump_scalar(
.....
int plain_implicit = (strcmp((char *)node->tag,
               YAML_DEFAULT_SCALAR_TAG) == 0);
int quoted_implicit = (strcmp((char *)node->tag,
                YAML_DEFAULT_SCALAR_TAG) == 0);
~~~

variables 'plain_implicit' and 'quoted_implicit' have the same values. It possible wrong expression or this code can be optimized.



-- 
https://bugs.ruby-lang.org/

  parent reply	other threads:[~2016-03-22 11:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-12203.20160320122950@ruby-lang.org>
2016-03-20 12:29 ` [ruby-core:74474] [Ruby trunk Bug#12203] dumper.c static int yaml_emitter_dump_scalar two variables have the same value fanantoxa
2016-03-22 11:49 ` shyouhei [this message]
2017-06-07 17:58 ` [ruby-core:81609] " fanantoxa
2017-06-08 14:03 ` [ruby-core:81621] [Ruby trunk Bug#12203][Third Party's Issue] " nobu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-57609.20160322114900.e5597fb6f0e1cb99@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).