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
autocmd BufReadCmd *:[0-9]\+ ++nested call s:edit_with_lnum(expand('<afile>')) | |
function! s:edit_with_lnum(path_with_lnum) abort | |
let lnum = matchstr(a:path_with_lnum, '\v[0-9]+$') | |
let path = matchstr(a:path_with_lnum, '\v^.+\ze:[0-9]+$') | |
exec 'e' path | |
exec lnum | |
endfunction |
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 Monkey | |
extend self | |
MODULE_NAME = Module.instance_method(:name) | |
MODULE_SINGLETON_CLASS_P = Module.instance_method(:singleton_class?) | |
MODULE_SINGLETON_CLASS = Module.instance_method(:singleton_class) | |
MODULE_INSTANCE_METHODS = Module.instance_method(:instance_methods) | |
MODULE_INSTANCE_METHOD = Module.instance_method(:instance_method) | |
CLASS_ATTACHED_OBJECT = Class.instance_method(:attached_object) rescue nil | |
IS_A = Object.instance_method(:is_a?) |
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
title | link | |
---|---|---|
[JA] The future vision of Ruby Parser / Yuichiro Kaneko @spikeolaf | https://www.youtube.com/watch?v=IhfDsLx784g&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=2&pp=iAQB | |
[EN] RuboCop's baddest cop / Genadi Samokovarov @gsamokovarov | https://www.youtube.com/watch?v=n-D9uPOo_kc&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=3&pp=iAQB | |
[EN] Generating RBIs for dynamic mixins with Sorbet and Tapioca / Emily Samp @egiurleo | https://www.youtube.com/watch?v=UpbVZ4Gqk3c&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=4&pp=iAQB | |
[JA] Make Regexp#match much faster / Hiroya FUJINAMI @makenowjust | https://www.youtube.com/watch?v=IbMFHxeqpN4&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=5&pp=iAQB | |
[EN] Understanding the Ruby Global VM Lock by observing it / Ivo Anjo @KnuX | https://www.youtube.com/watch?v=rI4XlFvMNEw&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=6&pp=iAQB | |
[JA] develop chrome extension with ruby.wasm / Yuma Sawai @aaaa777 | https://www.youtube.com/watch?v=A2ziP8V9muE&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&inde |
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
# Usage: | |
# # Open all releases between 6.1 and 7.0 | |
# $ ruby open-releases.rb 6.1 7.0 | |
tags = `git tag`.lines(chomp: true).map { _1[/^v(.+)$/, 1] }.compact.map { Gem::Version.new _1 rescue nil }.compact | |
s, e = ARGV.map { Gem::Version.new _1 } | |
vs = tags.select { s < _1 && _1 <= e } | |
vs.each do |v| |
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
require 'tmpdir' | |
require 'pathname' | |
Dir.mktmpdir('steep-playground-') do |dir| | |
dir = Pathname(dir) | |
dir.join('Steepfile').write(<<~END) | |
target :test do | |
signature "." | |
check "test.rb" | |
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
require 'parser/current' | |
class Parser::Lexer | |
methods.grep(/^lex_en/).each do |m| | |
if m.end_with?('=') | |
singleton_class.undef_method m | |
else | |
v = __send__ m | |
singleton_class.undef_method m | |
eval <<~RUBY |
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
# Print gems that contains `test_files` in gemspec with disk consumed order. | |
# | |
# Usage: | |
# bundle install --path /path/to/somewhere | |
# cd /path/to/somewhere/ruby/VERSION/gems | |
# ruby THIS_SCRIPT.rb | |
# | |
# Pro tip: The following links are useful when you open a PR to remove test_files. | |
# * https://github.com/rubygems/guides/issues/90 | |
# * https://github.com/rubygems/bundler/pull/3207 |
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
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
# Activate the gem you are reporting the issue against. |
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 C | |
def self.new: (String) -> untyped | |
end | |
class C2 < C | |
end | |
module M | |
def initialize: (String, Integer) -> void | |
end |
NewerOlder