From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (nue.mailmanlists.eu [IPv6:2a01:4f8:1c0c:6b10::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3FB2C1F44D for ; Fri, 29 Mar 2024 15:21:37 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=V6RweL3v; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=ZhLKKTfn; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id CBFD383A00; Fri, 29 Mar 2024 15:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1711725689; bh=rOnvPjjR57IzDJ9/Z4uo7iqd7kn7GtwzYVMQvPY31oU=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=V6RweL3vZsk8M+3KlTtw8G+XHFojaY9+SlGV8SeT4IE4UIZ1lcnH1IkrZusj7XJDD KDQpw3Hvu8afiiN41V7u/xHBwzsewQGlkkFUQa1mxzJtEB6wFJqa+4fjgJGs5Bmqac qeRWMuLQD/jx6G1QkGxN0cDbvFMsH4PaBfVBMhD0= Received: from s.wrqvtvvn.outbound-mail.sendgrid.net (s.wrqvtvvn.outbound-mail.sendgrid.net [149.72.120.130]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 7F5E0839F8 for ; Fri, 29 Mar 2024 15:21:25 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=ZhLKKTfn; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=Uwp3vev43mIjXKyyIYX2vcrRVlL8DYgd1xWm99iGW/I=; b=ZhLKKTfnj5WogW2SkzpIRlwKh5plEQB6yw02AnQIJKeTEgfJuBAzDtcpfzASMFPFbVNI sh5VfJu+hpMKoIAeHdDVx8Zjn/lZYKo0l1slwMwiTBluRihhnMD7xPjAcfFJFt4e1fD8NN b+NVeCnwmfcWQKoZC67yD8ZRaUyEXmM+GiznbqQlQPdYG1JQSTURi49R8n261gLjNd/wTm N21tL4hGjszezfgs8++2q52yYqhQBmlMFBatsefwL0MUY4jw3uZsFaIFey53G4sF1X2e7C hcT+/2qG5agO9lDFqHoWp1JtB5dcNXlgcsGs8cI5V/xwsIKcpwHbqAkGERh2Y0SA== Received: by filterdrecv-745c5f885d-7b6n4 with SMTP id filterdrecv-745c5f885d-7b6n4-1-6606DC73-8 2024-03-29 15:21:23.694656905 +0000 UTC m=+932130.070549620 Received: from herokuapp.com (unknown) by geopod-ismtpd-8 (SG) with ESMTP id KT_7caGFRiGQn5wDkRbLSw for ; Fri, 29 Mar 2024 15:21:23.437 +0000 (UTC) Date: Fri, 29 Mar 2024 15:21:23 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 20399 X-Redmine-Issue-Author: kddnewton X-Redmine-Issue-Priority: Normal X-Redmine-Sender: kddnewton 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-Redmine-MailingListIntegration-Message-Ids: 93973 X-SG-EID: =?us-ascii?Q?u001=2E41nWPij=2FD1kdGmpgWeHScbb9X8tZePZrQQx3bl8Vy2odBuMhLMhId2kIq?= =?us-ascii?Q?I4MmMJ43lNHfKPNNds=2Fb3JsTYpYoWyQb3+sPV4d?= =?us-ascii?Q?vscaSKwkBzVuE9HTYelgS64EfOt=2FUUKGlFsB9Bg?= =?us-ascii?Q?L9NKjbjBkq77+byBzDqgrZ+UKWORWiqQ=2F7x6oTO?= =?us-ascii?Q?yt5cmVJSH49ddr2we0wYM+VNIcEDCjCK6=2Fl4+Pb?= =?us-ascii?Q?f=2FxncyRk1njynWV2UWC=2FWml73KyQ6+vnI5coQbX?= =?us-ascii?Q?XkhCCzrm7xeWsWOfhlY2a8NTaw=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: PPUFZVDOMNVZCW4OQBOEUYXPD5G7UNCR X-Message-ID-Hash: PPUFZVDOMNVZCW4OQBOEUYXPD5G7UNCR X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117377] [Ruby master Bug#20399] Ripper doesn't respect implicit -x List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "kddnewton (Kevin Newton) via ruby-core" Cc: "kddnewton (Kevin Newton)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20399 has been updated by kddnewton (Kevin Newton). I agree, but I still think Ripper should match the parser's behavior here. Otherwise you can't get the AST of those kinds of files. ---------------------------------------- Bug #20399: Ripper doesn't respect implicit -x https://bugs.ruby-lang.org/issues/20399#change-107537 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- For the given script: ```ruby #!/bin/sh # -*- ruby -*- exec "${RUBY-ruby}" "-x" "$0" "$@" && [ ] if false #!ruby # This needs ruby 2.0, Subversion and Git. # As a Ruby committer, run this in an SVN repository # to commit a change. require 'tempfile' require 'net/http' ``` I would expect all of the various Ripper APIs (`lex`, `sexp`, `sexp_raw`, `new.parse`, etc.) to start parsing on line 4, because that's what the parser does. Instead, it starts parsing on line 1. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/