woodruffw / x_do.cr

Crystal bindings for libxdo (xdotool)
https://woodruffw.github.io/x_do.cr/
MIT License
18 stars 1 forks source link

Crystal 0.26.next: setter method 'viewport=' cannot have more than one argument #2

Closed oprypin closed 6 years ago

oprypin commented 6 years ago
$ crystal --version
Using compiled compiler at `.build/crystal'
Crystal 0.26.0+8 [40206f685] (2018-08-18)

LLVM: 6.0.1
Default target: x86_64-pc-linux-gnu

$ crystal spec
Using compiled compiler at `.build/crystal'
Error in line 1: while requiring "./spec/search_spec.cr"

in spec/search_spec.cr:1: while requiring "./spec_helper"

require "./spec_helper"
^

in spec/spec_helper.cr:2: while requiring "../src/x_do"

require "../src/x_do"
^

Syntax error in src/x_do.cr:271: setter method 'viewport=' cannot have more than one argument

  def viewport=(x, y)
oprypin commented 6 years ago

You could change it to set_viewport(x, y) or perhaps viewport = {x, y}

woodruffw commented 6 years ago

Thanks for the report! Should be fixed as of https://github.com/woodruffw/x_do.cr/commit/a5585bb7640fcd9dbd721f06cc96a4b9fb8c604a, released as 0.8.0.