From 618b8d05f8ba379378dcda97031e04c2d6f137a0 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 15 Apr 2015 11:39:12 +0300 Subject: [PATCH] adding ruby method lists Just for reference (not to copy) --- lib/parfait/array.rb | 13 +++++++++++++ lib/parfait/hash.rb | 10 ++++++++++ lib/parfait/integer.rb | 11 +++++++++++ lib/parfait/object.rb | 11 +++++++++++ lib/parfait/space.rb | 2 ++ 5 files changed, 47 insertions(+) diff --git a/lib/parfait/array.rb b/lib/parfait/array.rb index 96a1ac28..5fa32880 100644 --- a/lib/parfait/array.rb +++ b/lib/parfait/array.rb @@ -3,5 +3,18 @@ class Array < Object #many basic array functions can not be defined in ruby, such as # get/set/length/add/delete # so they must be defined as CompiledMethods in Builtin::Kernel + + #ruby 2.1 list (just for reference, keep at bottom) + # :at, :fetch, :first, :last, :concat, :<<, :push, :pop, :shift, :unshift, :insert, :each, :each_index, :reverse_each, + # :length, :size, :empty?, :find_index, :index, :rindex, :join, :reverse, :reverse!, :rotate, :rotate!, + # :sort, :sort!, :sort_by!, :collect, :collect!, :map, :map!, :select, :select!, :keep_if, + # :values_at, :delete, :delete_at, :delete_if, :reject, :reject!, :zip, :transpose, :replace, :clear, + # :fill, :include?, :slice, :slice!, :assoc, :rassoc, :+, :*, :-, :&, :|, :uniq, :uniq!, :compact, :compact!, + # :flatten, :flatten!, :count, :shuffle!, :shuffle, :sample, :cycle, :permutation, :combination, + # :repeated_permutation, :repeated_combination, :product, :take, :take_while, :drop, :drop_while, + # :bsearch, :pack, :entries, :sort_by, :grep, :find, :detect, :find_all, :flat_map, :collect_concat, + # :inject, :reduce, :partition, :group_by, :all?, :any?, :one?, :none?, + # :min, :max, :minmax, :min_by, :max_by, :minmax_by, :member?, :each_with_index, :each_entry, + # :each_slice, :each_cons, :each_with_object, :chunk, :slice_before, :lazy end diff --git a/lib/parfait/hash.rb b/lib/parfait/hash.rb index 8c5747c2..69f3285b 100644 --- a/lib/parfait/hash.rb +++ b/lib/parfait/hash.rb @@ -58,5 +58,15 @@ class Hash < Object def []=(key,val) set(key,val) end + + # :rehash, :to_hash, :to_h, :to_a, :[], :fetch, :[]=, :store, :default, :default=, :default_proc, :default_proc=, + # :key, :index, :size, :length, :empty?, :each_value, :each_key, :each_pair, :each, :keys, :values, + # :values_at, :shift, :delete, :delete_if, :keep_if, :select, :select!, :reject, :reject!, :clear, :invert, + # :update, :replace, :merge!, :merge, :assoc, :rassoc, :flatten, :include?, :member?, :has_key?, :has_value?, + # :key?, :value?, :compare_by_identity, :compare_by_identity?, :entries, :sort, :sort_by, :grep, :count, :find, + # :detect, :find_index, :find_all, :collect, :map, :flat_map, :collect_concat, :inject, :reduce, :partition, + # :group_by, :first, :all?, :any?, :one?, :none?, :min, :max, :minmax, :min_by, :max_by, :minmax_by, :each_with_index, + # :reverse_each, :each_entry, :each_slice, :each_cons, :each_with_object, :zip, :take, :take_while, :drop, :drop_while, + # :cycle, :chunk, :slice_before, :lazy end diff --git a/lib/parfait/integer.rb b/lib/parfait/integer.rb index ba800b17..a9ed1092 100644 --- a/lib/parfait/integer.rb +++ b/lib/parfait/integer.rb @@ -9,4 +9,15 @@ class Integer < Value + # :integer?, :odd?, :even?, :upto, :downto, :times, :succ, :next, :pred, :chr, :ord, :to_i, :to_int, :floor, + # :ceil, :truncate, :round, :gcd, :lcm, :gcdlcm, :numerator, :denominator, :to_r, :rationalize, + # :singleton_method_added, :coerce, :i, :+@, :-@, :fdiv, :div, :divmod, :%, :modulo, :remainder, :abs, :magnitude, + # :real?, :zero?, :nonzero?, :step, :quo, :to_c, :real, :imaginary, :imag, :abs2, :arg, :angle, :phase, + # :rectangular, :rect, :polar, :conjugate, :conj, :>, :>=, :<, :<=, :between? + # + # Numeric + # :singleton_method_added, :coerce, :i, :+@, :-@, :fdiv, :div, :divmod, :%, :modulo, :remainder, :abs, :magnitude, + # :to_int, :real?, :integer?, :zero?, :nonzero?, :floor, :ceil, :round, :truncate, :step, :numerator, :denominator, + # :quo, :to_c, :real, :imaginary, :imag, :abs2, :arg, :angle, :phase, :rectangular, :rect, :polar, :conjugate, :conj, + # :>, :>=, :<, :<=, :between? end diff --git a/lib/parfait/object.rb b/lib/parfait/object.rb index 6a0d9d8c..785a3720 100644 --- a/lib/parfait/object.rb +++ b/lib/parfait/object.rb @@ -21,4 +21,15 @@ class Object < Value def get_layout() @layout end + + # Object + # :nil?, :===, :=~, :!~, :eql?, :hash, :<=>, :class, :singleton_class, :clone, :dup, :taint, :tainted?, :untaint, + # :untrust, :untrusted?, :trust, :freeze, :frozen?, :to_s, :inspect, :methods, :singleton_methods, :protected_methods, + # :private_methods, :public_methods, :instance_variables, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, + # :remove_instance_variable, :instance_of?, :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, + # :extend, :display, :method, :public_method, :singleton_method, :define_singleton_method, + # :object_id, :to_enum, :enum_for + # + # BasicObject + # :==, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__ end diff --git a/lib/parfait/space.rb b/lib/parfait/space.rb index babe15ec..7a1eaba4 100644 --- a/lib/parfait/space.rb +++ b/lib/parfait/space.rb @@ -10,4 +10,6 @@ class Space < Object + # ObjectSpace + # :each_object, :garbage_collect, :define_finalizer, :undefine_finalizer, :_id2ref, :count_objects end