Skip to content

Commit

Permalink
Merge pull request #2224 from sarna/ruby-typos
Browse files Browse the repository at this point in the history
Fixes some small typos in "Ruby to Perl 6"
  • Loading branch information
sarna committed Jul 27, 2018
2 parents 423c007 + da0cd0d commit f171ae0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/Language/rb-nutshell.pod6
Expand Up @@ -1057,7 +1057,7 @@ use lib '/some/module/lib';
In Ruby there is no built-in way to selectively import/export methods from a
module.
In Perl 6 you specifies the functions which are to be exported by using the
In Perl 6 you specify the functions which are to be exported by using the
C<is export> role on the relevant subs and I<all> subs with this role are
then exported. Hence, the following module C<Bar> exports the subs C<foo>
and C<bar> but not C<baz>:
Expand All @@ -1071,14 +1071,14 @@ sub bar($b) is export { say "bar $b" }
sub baz($z) { say "baz $z" }
To use this module, simply C<use Bar> and the functions C<foo> and C<bar>
will be available
will be available:
=for code :skip-test
use Bar;
foo(1); #=> "foo 1"
bar(2); #=> "bar 2"
If you tries to use C<baz> an "Undeclared routine" error is raised at compile time.
If you try to use C<baz> an "Undeclared routine" error is raised at compile time.
Some modules allow for selectively importing functions, which would look like:
Expand Down

0 comments on commit f171ae0

Please sign in to comment.