From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 163A71F461 for ; Sun, 19 May 2019 08:21:36 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 16092120EFE; Sun, 19 May 2019 17:21:30 +0900 (JST) Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id EB347120DE4 for ; Sun, 19 May 2019 17:21:23 +0900 (JST) Received: by filter0081p3iad2.sendgrid.net with SMTP id filter0081p3iad2-7765-5CE11204-11 2019-05-19 08:21:24.511988899 +0000 UTC m=+294106.516698121 Received: from herokuapp.com (unknown [3.87.52.145]) by ismtpd0031p1mdw1.sendgrid.net (SG) with ESMTP id RUtd6dI2S9CleJV0dX5u3Q for ; Sun, 19 May 2019 08:21:24.308 +0000 (UTC) Date: Sun, 19 May 2019 08:21:24 +0000 (UTC) From: v.ondruch@tiscali.cz Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 68205 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15791 X-Redmine-Issue-Author: headius X-Redmine-Sender: vo.x 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: =?us-ascii?Q?mWhqNvD1xlBozk4zn6CTHlnSPHlTKkyHJdiOH=2FzC52jGpeBjo08j2czZbuuhIx?= =?us-ascii?Q?MKW0=2FSOx8x+BsrlP60NDN3gF21ayoX93ivBTpVR?= =?us-ascii?Q?v54jPAs9j93Xcd9d4rjMIb9j6AUNNK3kcAj5NZ+?= =?us-ascii?Q?63fqYmPGk2i97r+89WlYhfXrG3QDH9GFd52QpRQ?= =?us-ascii?Q?SUdUGbgqmABbnntjBMW7JPgtXypBoi1kZfw=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 92721 Subject: [ruby-core:92721] [Ruby trunk Bug#15791] Clarify reason for RbConfig's ruby_version not reflecting "teeny" 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 #15791 has been updated by vo.x (Vit Ondruch). ruby_version is user configurable variable: https://github.com/ruby/ruby/blob/trunk/configure.ac#L3663 It was introduced to make possible parallel install e.g. two Ruby 2.6.0 side by side. Later somebody start to interpret it and add it different meanings, but it was never correct thing to do, therefore I would suggest against using ruby_version for anything meaningful. I tried to have this resolved by #11002, but the result was never satisfactory. ---------------------------------------- Bug #15791: Clarify reason for RbConfig's ruby_version not reflecting "teeny" value https://bugs.ruby-lang.org/issues/15791#change-78078 * Author: headius (Charles Nutter) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: all * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- I did not realize that MRI always reports `RbConfig::CONFIG['ruby_version']` without the "teeny" value. Instead, it makes it always 0: ``` $ rvm ruby-2.6.2 do ruby -v -e 'p RbConfig::CONFIG["ruby_version"]' ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18] "2.6.0" ``` This seems like a bug to me. It is a visible behavior because several package-management systems (RubyGems, Bundler, stuff in Ruby switchers like RVM) use this value, rather than RUBY_VERSION, to set up directory paths. I believe it should reflect the full, accurate version, but I have not been able to find any discussion about why it does not do so. -- https://bugs.ruby-lang.org/