Login Register






Github - Simple: Ruby Library, Progess Thread filter_list
Author
Message
RE: Github - Simple: Ruby Library, Progess Thread #4
I have some questions. It seems to me that the standard library of Ruby already provides some of the functions you implemented.
See: http://www.tutorialspoint.com/ruby/ruby_arrays.htm

E.g.
array.reverse <-> reverse_array(array)
array.index(obj) <-> search_array(array, obj)

Why don't you use them?

Code:
def is_array(simple_data_type) if simple_data_type.kind_of?(Array) return true else return false end end

You can just do:

Code:
def is_array(simple_data_type) return simple_data_type.kind_of?(Array) end
I am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.

[Image: 2YpkRjy.png]

Reply





Messages In This Thread