pineapple-notepad/3rdparty/lexilla540/lexilla/test/examples/ruby/PercentEquals124.rb

9 lines
187 B
Ruby
Raw Permalink Normal View History

2024-07-02 23:47:26 +08:00
# Issue 124, disambiguating %= which may be a quote or modulo assignment
# %-quoting with '=' as the quote
s = %=3=
puts s
x = 7
# Modulo assignment, equivalent to x = x % 2
x %=2
puts x