Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if statements should match a regex, not boolify the regex itself in Rakudo #848

Closed
p6rt opened this issue Mar 31, 2009 · 6 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Mar 31, 2009

Migrated from rt.perl.org#64330 (status was 'resolved')

Searchable as RT64330$

@p6rt
Copy link
Author

p6rt commented Mar 31, 2009

From @masak

<moritz_> masak​: if /.../ { ... } # should that test the truthness of
the regex object?
<masak> rakudo​: $_ = "foo"; if /bar/ { say "OH HAI" }
<p6eval> rakudo 78cb4c​: OUTPUT«OH HAI␤»
<PerlJam> that be a bug
<masak> PerlJam​: how so?
<PerlJam> http://perlcabal.org/syn/S05.html#Return_values_from_matches
<masak> PerlJam​: indeed.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Apr 23, 2009

From @pmichaud

Now fixed in 042614ff​:

pmichaud@​orange​:~/rakudo$ ./perl6

$_ = 'foo'; if /bar/ { say 'yes' };
$_ = 'foo'; if /o/ { say 'yes' };
yes

Passing ticket to moritz to verify we have a spectest for this.

Thanks!

Pm

1 similar comment
@p6rt
Copy link
Author

p6rt commented Apr 23, 2009

From @pmichaud

Now fixed in 042614ff​:

pmichaud@​orange​:~/rakudo$ ./perl6

$_ = 'foo'; if /bar/ { say 'yes' };
$_ = 'foo'; if /o/ { say 'yes' };
yes

Passing ticket to moritz to verify we have a spectest for this.

Thanks!

Pm

@p6rt
Copy link
Author

p6rt commented Apr 23, 2009

@pmichaud - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Apr 24, 2009

From @moritz

Tested in t/spec/S05-match/blocks.t since I didn't find a more suitable
location.

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Apr 24, 2009

@moritz - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Apr 24, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant