summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception/system_call_error_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-12-27 16:46:08 +0100
committerBenoit Daloze <eregontp@gmail.com>2019-12-27 16:46:08 +0100
commita2fac1d72c225192018f8f3f3dfcfcc46f66c08a (patch)
treedc2d44079962ce242d971a4d1c2a2b1333e64cec /spec/ruby/core/exception/system_call_error_spec.rb
parent26a9f80c823a9f536a235d80d600aa9e03ed7a2f (diff)
Update to ruby/spec@d419e74
Diffstat (limited to 'spec/ruby/core/exception/system_call_error_spec.rb')
-rw-r--r--spec/ruby/core/exception/system_call_error_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/ruby/core/exception/system_call_error_spec.rb b/spec/ruby/core/exception/system_call_error_spec.rb
index c510ae440f..f27977a547 100644
--- a/spec/ruby/core/exception/system_call_error_spec.rb
+++ b/spec/ruby/core/exception/system_call_error_spec.rb
@@ -128,3 +128,16 @@ describe "SystemCallError#message" do
SystemCallError.new("XXX").message.should =~ /XXX/
end
end
+
+describe "SystemCallError#dup" do
+ it "copies the errno" do
+ dup_sce = SystemCallError.new("message", 42).dup
+ dup_sce.errno.should == 42
+ end
+end
+
+describe "SystemCallError#backtrace" do
+ it "is nil if not raised" do
+ SystemCallError.new("message", 42).backtrace.should == nil
+ end
+end