RubyとRailsのプログラマーをやっています。
https://github.com/asakusarb/action_args
- 6.0でこれ https://github.com/rails/rails/compare/master...amatsuda:drop_encoding_2017 を入れたらけっこう速くなったりしないかなー。
| class String | |
| def bar() foo; end | |
| end | |
| using Module.new { | |
| refine String do | |
| def foo() p self; end | |
| end | |
| } |
| require 'allocation_tracer' | |
| require 'active_support/core_ext/array/extract_options' | |
| require 'pp' | |
| # Active Support | |
| def foo1(options = {}) | |
| options[:x] || 1 | |
| end | |
| # Ruby |
RubyとRailsのプログラマーをやっています。
https://github.com/asakusarb/action_args
| class A | |
| def f(x: nil) | |
| p x | |
| end | |
| end | |
| class Wrapper | |
| def initialize | |
| @a = A.new | |
| end |
| diff --git a/lib/reline.rb b/lib/reline.rb | |
| index a7bd4d9..61001f9 100644 | |
| --- a/lib/reline.rb | |
| +++ b/lib/reline.rb | |
| @@ -168,10 +168,12 @@ module Reline | |
| Reline::IOGate.get_screen_size | |
| end | |
| - def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination) | |
| + def readmultiline(prompt_ = '', add_hist_ = false, prompt: '', use_history: false, &confirm_multiline_termination) |
| # frozen_string_literal: true | |
| require 'bundler/inline' | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| gem 'rails', github: 'rails/rails', branch: 'main' |