From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 5DDE21A0082E for ; Tue, 22 Mar 2016 20:12:46 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id CF980B5D871 for ; Tue, 22 Mar 2016 20:49:14 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 4D6C318CC7B2 for ; Tue, 22 Mar 2016 20:49:15 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id C55281204C8; Tue, 22 Mar 2016 20:49:14 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 762D712045F for ; Tue, 22 Mar 2016 20:49:11 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=Qgb32lkQ8ueXyg7V+l//zTDJuTs=; b=hlyFUv2zVDpHzMvpOx uJqSqe1GlgV68oYABrmXlmZd31jJjo54rU+xsa9mPkiaKLl+5EQrhcWm6FfSmTBx w2/vZhpuQBX5iCy3ZBRYEjuJXj/6ND12shlevVLU5Pa7Udfn/FMKjsUXG38pz4eL f/AvnpiLnrhLBIKwSJlj1OA9I= Received: by filter0498p1mdw1.sendgrid.net with SMTP id filter0498p1mdw1.19245.56F1312D11 2016-03-22 11:49:01.076202807 +0000 UTC Received: from herokuapp.com (ec2-54-196-172-43.compute-1.amazonaws.com [54.196.172.43]) by ismtpd0004p1iad1.sendgrid.net (SG) with ESMTP id ly3WA6Y3Q529ylrjF19vrQ for ; Tue, 22 Mar 2016 11:49:01.077 +0000 (UTC) Date: Tue, 22 Mar 2016 11:49:00 +0000 From: shyouhei@ruby-lang.org To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 49098 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 12203 X-Redmine-Issue-Author: fanantoxa X-Redmine-Issue-Assignee: tenderlovemaking X-Redmine-Sender: shyouhei X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS4Q1Si4f3uxaQjZdeq264t5ydGfdeIwVcR4LE C1G5qTWoDkqJ8v2DJenVX7WNrnrrCfZW+JNILqwqIXia0CTbngimjgbg56OxoT7Bzuly7HSXdaR5uM cacnu0qT1zewq7WHW66tFL9LH0i1nxtBMDs/lT6zT/WvEyHYKJ+HV5vuEg== X-ML-Name: ruby-core X-Mail-Count: 74488 Subject: [ruby-core:74488] [Ruby trunk Bug#12203][Assigned] dumper.c static int yaml_emitter_dump_scalar two variables have the same value X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" 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/