[ANN] anytick 0.1.0 released
TOKI Yoshinori <[email protected]> Sun, 29 Dec 2019 11:01:40 +0900
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <[email protected]> |
anytick version 0.1.0 has been released.
Anytick extends ruby's backtick notation to do more than run a shell
command. For example, it defines the def method syntax in backtick,
and makes Ruby 2.7's argument forwarding notation of `(...)' usable
with Ruby 2.6.
require 'anytick'
class Foo
extend Anytick.rule(Anytick::DefineMethod)
`def foo(...)
bar(...)
end
`
end
This example does not cause a syntax error in Ruby 2.6, even though it
uses the new notation `(...)' of Ruby 2.7.
If Ruby version is 2.7 or later, this example will be evaluated as is.
If Ruby version is older than 2.7, this example will be evaluated by
converting `(...)' to work with older Ruby.
See <https://github.com/y10k/anytick> for detail.
-
TOKI Yoshinori <[email protected]>
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>