Ruby’s gsub(pat, str) form never felt “right” - I kept wanting
s/pat1/pat2/ - and why not? I really am curious…
Instead of:
“My string”.gsub(/My/, “His”)
…why not?
“My string”.s/My/His/
–
Dossy Shiobara mail: dossy@panoptic.com
Panoptic Computer Network web: http://www.panoptic.com/
“He realized the fastest way to change is to laugh at your own
folly – then you can let go and quickly move on.” (p. 70)