Message-id: <
200207131644.g6DGi2214456@crypt.compulink.co.uk>
p4raw-id: //depot/perl@17716
call_method("READLINE", gimme);
LEAVE;
SPAGAIN;
- if (gimme == G_SCALAR)
- SvSetMagicSV_nosteal(TARG, TOPs);
+ if (gimme == G_SCALAR) {
+ SV* result = POPs;
+ SvSetSV_nosteal(TARG, result);
+ PUSHTARG;
+ }
RETURN;
}
fp = Nullfp;
use Symbol;
-print "1..39\n";
+print "1..40\n";
my $fh = gensym;
Implement::compare(PRINT => @received);
}
+{
+ # [ID 20020713.001] chomp($data=<tied_fh>)
+ local *TEST;
+ tie *TEST, 'CHOMP';
+ my $data;
+ chomp($data = <TEST>);
+ ok($data eq 'foobar');
+
+ package CHOMP;
+ sub TIEHANDLE { bless {}, $_[0] }
+ sub READLINE { "foobar\n" }
+}