Created
November 17, 2022 14:07
-
-
Save b4ldr/3cfe36803658ffb872478b31ab44ab1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class classtest1 ($classfoobar) { | |
inline_template('<% @classfoobar.each {|i| i.upcase! } %>') | |
notice($classfoobar) | |
} | |
class classtest2 ($classfoobar) { | |
inline_template('<% @classfoobar.each {|i| i.upcase! } %>') | |
notice($classfoobar) | |
} | |
class classtest3 ($classfoobar = ['foo', 'bar']) { | |
inline_template('<% @classfoobar.each {|i| i.upcase! } %>') | |
notice($classfoobar) | |
} | |
define test ($classfoobar) { | |
inline_template('<% @classfoobar.each {|i| i.upcase! } %>') | |
notice($classfoobar) | |
} | |
$foo = "foobar" | |
inline_template('<% @foo.upcase! %>') | |
notice($foo) | |
$bar = [$foo] | |
notice($bar) | |
inline_template('<% @bar.each {|i| i.downcase! } %>') | |
notice($bar) | |
inline_template('<% @bar << "stuff" %>') | |
notice($bar) | |
$foobar = ['foo', 'bar'] | |
class{'classtest1': classfoobar => ['foo', 'bar'] } | |
class{'classtest2': classfoobar => $foobar } | |
include classtest3 | |
# The following fail with: "can't modify frozen String" | |
test{'test1': classfoobar => $foobar } | |
inline_template('<% @foobar.each {|i| i.upcase! } %>') | |
notice($foobar) |
Author
b4ldr
commented
Nov 17, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment