case value
=> pat [if|unless cond]
...
=> pat [if|unless cond]
...
else
...
end
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
--- /usr/share/global/gtags/script/pygments_parser.py.orig 2024-09-14 09:43:15.999496909 +0900 | |
+++ /usr/share/global/gtags/script/pygments_parser.py 2024-09-14 09:44:10.966028946 +0900 | |
@@ -202,7 +202,7 @@ | |
# Update ctags's path from the configuration file | |
global EXUBERANT_CTAGS | |
path = load_ctags_path() | |
- if path != '': | |
+ if path != b'': | |
EXUBERANT_CTAGS = path | |
if EXUBERANT_CTAGS != '' and EXUBERANT_CTAGS != 'no': |
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
END { | |
8.times.parallel(n: 2).each { p _1 } | |
} | |
class Enumerator | |
class Parallel | |
def initialize(enum, n:) | |
@enum = enum | |
@n = n | |
end |
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
diff --git a/parse.y b/parse.y | |
index 93bc2ef9ff..81db9a660d 100644 | |
--- a/parse.y | |
+++ b/parse.y | |
@@ -1539,33 +1539,23 @@ stmt : keyword_alias fitem {SET_LEX_STATE(EXPR_FNAME|EXPR_FITEM);} fitem | |
| expr | |
; | |
-rassign : arg_value tASSOC lhs | |
+rassign : arg_value tASSOC |
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
source = %q{ | |
case 0 | |
in a: 0 | |
end | |
} | |
RubyVM::InstructionSequence.compile_option = RubyVM::InstructionSequence.compile_option.transform_values do |v| | |
(v == true or v == false) ? false : v | |
end |
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
module Extractor | |
MATCH_FAILED = [] | |
def MATCH_FAILED.length | |
-1 | |
end | |
def ===(obj) | |
unapply = method(:unapply) | |
obj.singleton_class.define_method(:deconstruct) do | |
singleton_class.remove_method(:deconstruct) |
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
// https://gist.github.com/k-tsj/af03233fc023cb9e3280b0bce8c404b5 | |
// | |
// License: Mozilla Public License 2.0 | |
// Author: k-tsj | |
(() => { | |
window.addEventListener("keydown", (aEvent) => { | |
const keywords = BrowserSearch.searchBar.value.match(/"(?:\\"|\\\\|[^"])*"|\S+/g); | |
function exec_find() { | |
gFindBar._findField.value = keywords[aEvent.keyCode - KeyEvent.DOM_VK_1].replace(/^"|"$/g, ""); |
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
#0 rb_f_raise (argc=1, argv=0x7ffff7ee20f0) at eval.c:667 | |
#1 0x0000555555742f61 in call_cfunc_m1 (func=0x5555555e91ac <rb_f_raise>, recv=93824997925600, argc=1, argv=0x7ffff7ee20f0) at vm_insnhelper.c:1706 | |
#2 0x0000555555743a4a in vm_call_cfunc_with_frame (th=0x555555a5e620, reg_cfp=0x7ffff7fe1e90, calling=0x7fffffff9b40, ci=0x555555b75350, cc=0x555555b75370) at vm_insnhelper.c:1889 | |
#3 0x0000555555743bd6 in vm_call_cfunc (th=0x555555a5e620, reg_cfp=0x7ffff7fe1e90, calling=0x7fffffff9b40, ci=0x555555b75350, cc=0x555555b75370) at vm_insnhelper.c:1905 | |
#4 0x0000555555744e05 in vm_call_method_each_type (th=0x555555a5e620, cfp=0x7ffff7fe1e90, calling=0x7fffffff9b40, ci=0x555555b75350, cc=0x555555b75370) at vm_insnhelper.c:2203 | |
#5 0x00005555557454fb in vm_call_method (th=0x555555a5e620, cfp=0x7ffff7fe1e90, calling=0x7fffffff9b40, ci=0x555555b75350, cc=0x555555b75370) at vm_insnhelper.c:2334 | |
#6 0x0000555555745649 in vm_call_general (th=0x555555a5e620, reg_cfp=0x7ffff7fe1e90, calling=0x7fffffff9b40, ci=0x555555 |
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
$ ruby t.rb | |
["t.rb:1:in `m1'", "t.rb:7:in `<main>'"] | |
["t.rb:2:in `m2'", "t.rb:8:in `<main>'"] | |
["t.rb:9:in `<main>'"] | |
["t.rb:4:in `block in <main>'", "t.rb:10:in `<main>'"] |
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
$ bin/ruby -v | |
ruby 2.4.0dev (2016-09-12 master 56141) [x86_64-linux] | |
$ bin/ri | |
ri 5.0.0.beta2 | |
$ bin/ri String | |
= String < Object | |
------------------------------------------------------------------------------ |
NewerOlder