# 20new.patch by Niko Tyni <ntyni@iki.fi>
# DP: Fix new() argument checking and documentation.
# DP: (#204362, patch by Nicolas Bertolissio)
--- a/Gnu.pm
+++ b/Gnu.pm
@@ -220,7 +220,7 @@
 
 sub ReadLine { 'Term::ReadLine::Gnu'; }
 
-=item C<new(NAME,[IN[,OUT]])>
+=item C<new(NAME,[IN,OUT])>
 
 returns the handle for subsequent calls to following functions.
 Argument is the name of the application.  Optionally can be followed
@@ -234,6 +234,7 @@
     my $this = shift;		# Package
     my $class = ref($this) || $this;
 
+	croak "Wrong number of arguments" unless @_==1 or @_==3;
     my $name = shift;
 
     my $self = \%Attribs;
