Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixnum#public_methods raises TypeError #2107

Merged
merged 2 commits into from Dec 28, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions kernel/common/immediate.rb
Expand Up @@ -8,6 +8,11 @@ def singleton_methods(all=true)
[]
end

def public_singleton_methods
[]
end
private :public_singleton_methods

def private_singleton_methods
[]
end
Expand Down
8 changes: 8 additions & 0 deletions spec/ruby/core/kernel/public_methods_spec.rb
Expand Up @@ -28,6 +28,10 @@
m.extend(KernelSpecs::Methods::MetaclassMethods)
m.public_methods.should include('peekaboo')
end

it "returns public methods for immediates" do
10.public_methods.should include('divmod')
end
end

ruby_version_is "1.9" do
Expand All @@ -54,6 +58,10 @@
m.extend(KernelSpecs::Methods::MetaclassMethods)
m.public_methods.should include(:peekaboo)
end

it "returns public methods for immediates" do
10.public_methods.should include(:divmod)
end
end
end

Expand Down