ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: nerdinand@nerdinand.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:70655] [Ruby trunk - Feature #10594] Comparable#clamp
Date: Wed, 02 Sep 2015 18:12:34 +0000	[thread overview]
Message-ID: <redmine.journal-54053.20150902181233.252616a01360f809@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-10594.20141212214558@ruby-lang.org

Issue #10594 has been updated by Ferdinand Niedermann.

File comparable-clamp.diff added
Subject changed from Numeric#clamp to Comparable#clamp

----------------------------------------
Feature #10594: Comparable#clamp
https://bugs.ruby-lang.org/issues/10594#change-54053

* Author: Chris Johnson
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
This is basically a re-opening of the feature request of issue#4573 (https://bugs.ruby-lang.org/issues/4574), which was closed due a naming debate.

It seems the standard naming for restricting a number to a specified range is indeed 'clamp'.  (1)(2)(3)

As such, can we use Yusuke Endoh's original patch with the naming adjustments?  If so, I can provide accordingly.

Cheers.

(1) http://www.rubydoc.info/github/epitron/epitools/Numeric:clamp
(2) http://stackoverflow.com/questions/12020787/is-there-a-limit-clamp-function-in-ruby
(3) https://developer.gnome.org/glib/stable/glib-Standard-Macros.html#CLAMP:CAPS


---Files--------------------------------
num_clamp.c (427 Bytes)
comparable-clamp.diff (2.52 KB)


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

  parent reply	other threads:[~2015-09-02 17:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-10594.20141212214558@ruby-lang.org>
2014-12-12 21:45 ` [ruby-core:66814] [ruby-trunk - Bug #10594] [Open] Numeric#clamp findchris
2014-12-12 22:25 ` [ruby-core:66817] [ruby-trunk - Bug #10594] Numeric#clamp findchris
2015-06-27  9:55 ` [ruby-core:69754] [Ruby trunk " nerdinand
2015-06-29 10:38 ` [ruby-core:69771] " kosaki.motohiro
2015-06-29 19:01 ` [ruby-core:69776] " nerdinand
2015-06-30  2:18 ` [ruby-core:69783] " 0x0dea+redmine
2015-06-30  8:43 ` [ruby-core:69814] " hanmac
2015-06-30 10:26 ` [ruby-core:69815] " 0x0dea+redmine
2015-07-03  7:15 ` [ruby-core:69848] " nerdinand
2015-07-06 15:27 ` [ruby-core:69882] " nerdinand
2015-07-07 16:22 ` [ruby-core:69888] " 0x0dea+redmine
2015-07-08 13:00 ` [ruby-core:69901] " nerdinand
2015-07-08 16:08 ` [ruby-core:69902] " 0x0dea+redmine
2015-07-09  7:33 ` [ruby-core:69917] " nerdinand
2015-07-09 20:28 ` [ruby-core:69920] " nerdinand
2015-07-09 22:27 ` [ruby-core:69923] [Ruby trunk - Feature " nobu
2015-07-09 23:12 ` [ruby-core:69924] " 0x0dea+redmine
2015-07-10  5:32 ` [ruby-core:69929] " nerdinand
2015-07-10 15:39 ` [ruby-core:69941] " 0x0dea+redmine
2015-09-02 18:12 ` nerdinand [this message]
2015-09-14 20:13 ` [ruby-core:70804] [Ruby trunk - Feature #10594] Comparable#clamp kosaki.motohiro
2015-09-15  5:24 ` [ruby-core:70810] " hanmac
2015-09-15  9:42 ` [ruby-core:70811] " eregontp
2015-09-15  9:48 ` [ruby-core:70812] " nerdinand
2015-09-15 10:06 ` [ruby-core:70813] " eregontp
2015-09-26 11:45 ` [ruby-core:70919] " nerdinand
2016-07-21 13:10 ` [ruby-core:76503] [Ruby trunk Feature#10594] Comparable#clamp nerdinand
2016-07-22  9:33   ` [ruby-core:76521] " Martin J. Dürst
2016-07-22  9:47 ` [ruby-core:76523] " shyouhei
2016-07-22  9:52 ` [ruby-core:76524] " nerdinand
2016-07-22 10:55 ` [ruby-core:76528] " shyouhei
2016-08-09  5:55 ` [ruby-core:76773] " matz

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-54053.20150902181233.252616a01360f809@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).