summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception/errno_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/exception/errno_spec.rb')
-rw-r--r--spec/ruby/core/exception/errno_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/exception/errno_spec.rb b/spec/ruby/core/exception/errno_spec.rb
index 78b3eafc2a..095a926e09 100644
--- a/spec/ruby/core/exception/errno_spec.rb
+++ b/spec/ruby/core/exception/errno_spec.rb
@@ -47,4 +47,12 @@ describe "Errno::ENOTSUP" do
it "is defined" do
Errno.should have_constant(:ENOTSUP)
end
+
+ it "is the same class as Errno::EOPNOTSUPP if they represent the same errno value" do
+ if Errno::ENOTSUP::Errno == Errno::EOPNOTSUPP::Errno
+ Errno::ENOTSUP.should == Errno::EOPNOTSUPP
+ else
+ Errno::ENOTSUP.should_not == Errno::EOPNOTSUPP
+ end
+ end
end