Christian Grasser e38a0f2ec9 Update to scintilla 5.5.5 & Lexilla 5.4.3
Release 5.5.5 (https://www.scintilla.org/scintilla555.zip)

    Released 25 February 2025.
    Remember selection with undo and redo. Controlled with SCI_SETUNDOSELECTIONHISTORY. Feature #1273, Bug #1479, Bug #1224.
    Serialize selection type and ranges with SCI_GETSELECTIONSERIALIZED and SCI_SETSELECTIONSERIALIZED.
    For Win32, update Direct2D and DirectWrite interfaces used to 1.1 and add a lower-level approach to calling DirectWrite 1.1 by specifying SC_TECHNOLOGY_DIRECT_WRITE_1. Since Windows Vista does not support these API versions, Scintilla o longer supports DirectWrite on Windows Vista and will fall back to using GDI.
    Fix segmentation of long lexemes to avoid breaking before modifiers like accents that must be drawn with their base letters. For wrapping, try to break lines without separating letters from modifiers.
    For GTK on Windows, replace reverse arrow cursor with hand as reverse arrow was small in scaled modes. Bug #2460.
    Fix bug on Qt where double-click stopped working when Scintilla instance had been running for weeks.

Release 5.4.3 (https://www.scintilla.org/lexilla543.zip)

    Released 25 February 2025.
    C++: Fix evaluation of != in preprocessor condition. Issue #299.
    Modula-3: Allow digits in uppercase identifiers. Issue #297.
    Pascal: Fix asm style extending past end. Issue #295.
    Python: Fix detection of attributes and decorators. Issue #294, Pull request #302.
    Ruby: Implement substyles for identifiers SCE_RB_IDENTIFIER.
    Ruby: Recognize name as SCE_RB_DEFNAME in def when `::` used as well as `.`. Issue #300.

Close #16235
2025-03-12 16:09:49 +01:00

73 lines
1.3 KiB
Ruby

def dbg_args(a, b=1, c:, d: 6, &block) = puts("Args passed: #{[a, b, c, d, block.call]}")
dbg_args(0, c: 5) { 7 }
class A
def attr = @attr
def attr=(value)
@attr = value
end
def attr? = !!@attr
def attr! = @attr = true
# unary operator
def -@ = 1
def +@ = 1
def ! = 1
def !@ = 1
# binary operator
def +(value) = 1 + value
def -(value) = 1 - value
def *(value) = 1 * value
def **(value) = 1 ** value
def /(value) = 1 / value
def %(value) = 1 % value
def &(value) = 1 & value
def ^(value) = 1 ^ value
def >>(value) = 1 >> value
def <<(value) = 1 << value
def ==(other) = true
def !=(other) = true
def ===(other) = true
def =~(other) = true
def <=>(other) = true
def <(other) = true
def <=(other) = true
def >(other) = true
def >=(other) = true
# element reference and assignment
def [](a, b) = puts(a + b)
def []=(a, b, c)
puts a + b + c
end
# array decomposition
def dec(((a, b), c)) = puts(a + b + c)
# class method
def self::say(*s) = puts(s)
def self.say(*s) = puts(s)
# test short method name
def a = 1
def ab = 1
end
# class method
def String.hello
"Hello, world!"
end
# singleton method
greeting = "Hello"
def greeting.broaden
self + ", world!"
end
# one line definition
def a(b, c) b; c end
# parentheses omitted
def ab c
puts c
end
# Test folding of multi-line SCE_RB_STRING_QW
puts %W(
a
b
c
)