RubyKaigi Takeout 2021 closing 後に、Matz にキーノートとかほかのことについて聞いてみよう。
もうはじめてます。
https://cookpad.zoom.us/j/92227150915?pwd=TjhpZ3VmZ3U3bk53WWV5OE9nOE16QT09
ミーティングID: 922 2715 0915
パスコード: 165928
誰でも書き込めます。
[1].size? #=> true
[].size? #=> false
File.size?("/to/file") #=> nil or Integer
.full?
if (ary.length) { ... }
Array#present?
Hash#present?
String#present?
x = 1
y = 2
h = {x:, y:} w
h = { nonexist: } #=> NameError
def foo
42
end
h = { foo: foo() }
h = { fork: }
h = { exit: }
def foo(if=>if_: nil)
if_
end
foo(if: 42) #=> 42
def foo(if:)
if_ = binding.local_variable_get(:if)
if_ = {if:}[:if]
{for:}[:for]
[if:][0][:if] # joke
{if:}[] # {if:}.first
{if:}.each_value.first
end
{ foo: }.values.first #=> 42
x = 42
s = "x"
{ "#{ s }": }.values.first # エラー
shugo's patch:
$ ./miniruby -e 'def foo; 42; end; p({ foo: })'
{:foo=>42}
$ ./miniruby -e 'p({ fork: })'
{:fork=>6978}
{:fork=>nil}
$ ./miniruby -e '{ "#{ "foo" }": }'
-e:1: syntax error, unexpected '}'
{ "#{ "foo" }": }
$ ./miniruby -e 'p({ "fork": })'
-e:1: syntax error, unexpected '}'
def foo; 42; end; p({ "fork": })
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing