Skip to content
Permalink
Browse files

Merge pull request #755 from kachick/congratulate_private_methods_fro…

…m_lib-topaz

Congratulate private methods from lib-topaz
  • Loading branch information
alex committed Jun 22, 2013
2 parents cb4f154 + 8c09a87 commit 4fda4df9140d5891f818963a6a74a5156ae4eac0
@@ -17,6 +17,7 @@ def initialize(size_or_arr = nil, obj = nil, &block)
end
return self
end
private :initialize

def self.[](*args)
args.inject(allocate) { |array, arg| array << arg}
@@ -2,18 +2,22 @@ module Kernel
def puts(*args)
$stdout.puts(*args)
end
private :puts

def gets(sep = $/, limit = nil)
$stdin.gets(sep, limit)
end
private :gets

def print(*args)
$stdout.print(*args)
end
private :print

def p(*args)
args.each { |arg| $stdout.print(arg.inspect + "\n") }
end
private :p

def <=>(other)
self == other ? 0 : nil
@@ -28,16 +32,19 @@ def Array(arg)
[arg]
end
end
private :Array

def String(arg)
Topaz.convert_type(arg, String, :to_s)
end
module_function :String
private :String

def Integer(arg)
arg.to_i
end
module_function :Integer
private :Integer

def loop(&block)
return enum_for(:loop) unless block
@@ -50,6 +57,7 @@ def loop(&block)
end
nil
end
private :loop

def `(cmd)
cmd = Topaz.convert_type(cmd, String, :to_str)
@@ -60,6 +68,7 @@ def `(cmd)
end
res
end
private :`

def to_enum(method = :each, *args)
Enumerator.new(self, method, *args)
@@ -79,4 +88,5 @@ def rand(max = 1.0)
end
Random.rand(max)
end
private :rand
end
@@ -1,2 +1 @@
fails:Array#initialize is private
fails:Array#initialize with (size, object=nil) raises an ArgumentError if size is too large

This file was deleted.

@@ -178,6 +178,5 @@ fails:Kernel#Integer is a negative decimal number if there's a leading -0D and a
fails:Kernel#Integer parses the value as a decimal number if there's a leading 0d and a base of 10
fails:Kernel#Integer is a positive decimal number if there's a leading +0d and a base of 10
fails:Kernel#Integer is a negative decimal number if there's a leading -0d and a base of 10
fails:Kernel#Integer is a private method
fails:Kernel#Integer raises an ArgumentError if the String ends with a null byte
fails:Kernel#Integer raises an ArgumentError if the String contains a null byte
@@ -1,3 +1,2 @@
fails:Kernel.String raises a TypeError if respond_to? returns false for #to_s
fails:Kernel#String raises a TypeError if respond_to? returns false for #to_s
fails:Kernel#String is a private method
@@ -1,2 +1 @@
fails:Kernel#` is a private method
fails:Kernel#` sets $? to the exit status of the executed sub-process

This file was deleted.

This file was deleted.

@@ -1,2 +1 @@
fails:Kernel#p is a private method
fails:Kernel#p is not affected by setting $\, $/ or $,

This file was deleted.

@@ -1,2 +1 @@
fails:Kernel#puts is a private method
fails:Kernel#puts writes [...] for a recursive array arg

This file was deleted.

0 comments on commit 4fda4df

Please sign in to comment.
You can’t perform that action at this time.