Skip to content

Commit 4c473d4

Browse files
committed
Refer to p for what it is (a Kernel method not a keyword)
For the sake of correctness :) Side discussion: This also means that it _is_ possible to override the p function and have it function as a paragraph function. Whether or not to do it is a discussion that should probably be had in a different issue. It's the question if taking away the beloved p from debugging inside their component (making it available as `_p` or what not) is a reasonable exchange for having a more direct mapping to the HTML `<p>` tag and that people don't have to keep that one exception mind.
1 parent 0d82948 commit 4c473d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/components/paragraph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Show [specs](/spec/usage/components/paragraph_spec.rb)
44

5-
The HTML `<p>` tag implemented in ruby. This is a workaround because the single `p` is a reserved keyword in Ruby (directly writes `obj.inspect` followed by a newline to the program’s standard output, e.g. `p foo` equals `puts foo.inspect`).
5+
The HTML `<p>` tag implemented in ruby. This is a workaround because the single `p` is a [`Kernel` method in Ruby](https://ruby-doc.org/core-2.6.5/Kernel.html#method-i-p) (directly writes `obj.inspect` followed by a newline to the program’s standard output, e.g. `p foo` equals `puts foo.inspect`).
66

77
## Parameters
88

0 commit comments

Comments
 (0)