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 (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 37E9D17DC9E7 for ; Fri, 21 Nov 2014 02:31:52 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 66A1CB5D8D1 for ; Fri, 21 Nov 2014 02:21:34 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id AC1F897A827 for ; Fri, 21 Nov 2014 02:21:35 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9Dzy4kwXyJ8r for ; Fri, 21 Nov 2014 02:21:35 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 4A95A97A826 for ; Fri, 21 Nov 2014 02:21:35 +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 DF754952408 for ; Fri, 21 Nov 2014 02:21:33 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 87E4E1204C2; Fri, 21 Nov 2014 02:21:30 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 02C2B1204A3 for ; Fri, 21 Nov 2014 02:21:26 +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=E11u5steGHjKki0l5G6WeOWbynM=; b=KEPolCS+2i7RHNLy7e W40gc6IqE6aXwkPK9ijUXOaiwOI5glBJEMQvtv7l3jp/grJFu9nORtowA+LQ9qG/ BU1r81eFqLXDAXAZyTEfZMji9QFgY5Ql8qN+20ME01f5ez38Ryt4FJyT8zT0stQT QGTdAgyvnLaV5fn4W782kZTUU= Received: by filter0137p1mdw1.sendgrid.net with SMTP id filter0137p1mdw1.19049.546E22D214 2014-11-20 17:20:19.621037495 +0000 UTC Received: from herokuapp.com (ec2-54-160-137-7.compute-1.amazonaws.com [54.160.137.7]) by ismtpd-012 (SG) with ESMTP id 149ce380a38.536e.94643 Thu, 20 Nov 2014 17:20:19 +0000 (UTC) Date: Thu, 20 Nov 2014 17:20:19 +0000 From: alexey.muranov@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 40769 X-Redmine-Project: common-ruby X-Redmine-Issue-Id: 10528 X-Redmine-Issue-Author: alexeymuranov X-Redmine-Sender: alexeymuranov X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: OOF Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS7MdmR3PHCeNSIsqC2x/0vFIqo7/nueyFFLMQ T5qXRwSXfH24xbldXccf/oUR6WZnqkW53BkR2KXLgTeiL0ZECjutShR3nSEF5R0dbn5zYcCV/bC7MD mx6693LZmqZdj+Bf95wJeiVhrzBk3C5VVOyE X-ML-Name: ruby-core X-Mail-Count: 66381 Subject: [ruby-core:66381] [CommonRuby - Feature #10528] Allow line breaks instead of commas in arrays, hashes, argument lists, etc. 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #10528 has been updated by Alexey Muranov. I forgot to mention other usual cases when lines should be implicitly continued: after a dot, after an operator symbol, etc. ---------------------------------------- Feature #10528: Allow line breaks instead of commas in arrays, hashes, argument lists, etc. https://bugs.ruby-lang.org/issues/10528#change-50026 * Author: Alexey Muranov * Status: Open * Priority: Normal * Assignee: * Category: * Target version: ---------------------------------------- Since the seemingly reasonable proposal #8956 has been rejected because it "diverged so far from the original", i will dare to propose another version here. I suggest to automatically convert line breaks inside parentheses `(...)`, inside "hashy" braces `{...}`, inside brackets `[...]`, and inside block argument lists `|...|`, if they are not preceded with a comma and skipping empty space, into a comma, while all other line breaks that are not preceded with a semicolon into a semicolon (skipping empty lines). Unless, of course, the line break is preceded with `\` or followed by a dot `.`. I would be possible to write then: ```ruby todo = [ 'shopping' 'cinema' 'restaurant' ] rules = { 'evil' => 'bad' 'kind' => 'good' } ``` -- https://bugs.ruby-lang.org/