Feature #6245

"is_integer?" method declaration in prelude

Added by Mahmut Bulut about 2 years ago. Updated about 2 years ago.

[ruby-core:44082]
Status:Rejected
Priority:Normal
Assignee:-
Category:-
Target version:2.0.0

Description

Dear Rubyists, can we add "isinteger?" method to our core for main purposes of checking integerITY?
I add it to "golf
prelude.rb" below of "to_a" stub.

https://github.com/ruby/ruby/pull/112

https://github.com/ruby/ruby/pull/112.patch

**This can be in class Fixnum. I don't know this is true place for it?

112.patch Magnifier (749 Bytes) Mahmut Bulut, 04/03/2012 03:58 AM

History

#1 Updated by Adam Prescott about 2 years ago

On Mon, Apr 2, 2012 at 19:58, regularlambda (Mahmut Bulut) <
mahmutbulut0@gmail.com> wrote:

Dear Rubyists, can we add "is_integer?" method to our core for main
purposes of checking integerITY?

is_foo? isn't idiomatic, you should use just foo?

With that out of the way, this already exists in core:

5.integer?
=> true
5.0.integer?
=> false

#2 Updated by Mahmut Bulut about 2 years ago

They want it, i write it. Sorry if i have a fault.

http://whynotwiki.com/Ruby_/_Problems#String.23is_type.3F

aprescott (Adam Prescott) wrote:

On Mon, Apr 2, 2012 at 19:58, regularlambda (Mahmut Bulut) <
mahmutbulut0@gmail.com> wrote:

Dear Rubyists, can we add "is_integer?" method to our core for main
purposes of checking integerITY?

is_foo? isn't idiomatic, you should use just foo?

With that out of the way, this already exists in core:

5.integer?
=> true
5.0.integer?
=> false

#3 Updated by Yusuke Endoh about 2 years ago

  • Status changed from Open to Rejected

Sorry, but let's not open a ticket about goruby, but just send a mail.
I'd like to focus on redmine ticket that really needs our action.

Yusuke Endoh mame@tsg.ne.jp

Also available in: Atom PDF