Skip to content

Commit

Permalink
Fix IO::CatHandle.slurp-rest exception args
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed May 27, 2017
1 parent ce17a2f commit 60129a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/IO/CatHandle.pm
Expand Up @@ -148,7 +148,7 @@ my class IO::CatHandle is IO::Handle {
# We inherit deprecated .slurp-rest from IO::Handle. Pull the
# plug on it in this class, since no one is using this yet.
# The old IO::ArgFiles used .slurp
die X::Obsolete.new: :old<slurp-rest>, :new<slurp>,
die X::Obsolete.new: :old<slurp-rest>, :replacement<slurp>,
:when('with IO::CatHandle')
}
method DESTROY { self.close }
Expand Down
4 changes: 3 additions & 1 deletion t/02-rakudo/07-io-cathandle.t
Expand Up @@ -8,4 +8,6 @@ plan 1 + @meths;

throws-like { IO::CatHandle.new."$_"() }, X::NYI, $_ for @meths;

throws-like { IO::CatHandle.new.slurp-rest }, X::Obsolete, '.slurp-rest';
throws-like { IO::CatHandle.new.slurp-rest }, X::Obsolete,
:old<slurp-rest>, :replacement<slurp>, :when('with IO::CatHandle'),
'.slurp-rest';

0 comments on commit 60129a1

Please sign in to comment.