8000 Tags · sharpobject/sorbet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: sharpobject/sorbet

Tags

0.5.5920.20200923190209-b89eb2630

Toggle 0.5.5920.20200923190209-b89eb2630's commit message

Verified

10000
This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Update Hash#merge! RBI definition (sorbet#3445)

Prior RBI definition did not know about Hash#merge! accepting
multiple a splat of Hashes and merging into self. This PR fixes that.

The method doc and code samples were also updated, copied from
Ruby 2.7's documentation.

0.5.5919.20200923190144-ca6db672d

Toggle 0.5.5919.20200923190144-ca6db672d's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
ruby27: Add kwargs field to parser::Hash (sorbet#3421)

* Add kwargs field to parser::Hash

This lets us model how Ruby 2.7 treats keyword args better.

Compare this (hash literal, mentions curly braces):

    ❯ ruby --dump=parsetree -e 'foo({x: 0})'
    ###########################################################
    ## Do NOT use this node dump for any purpose other than  ##
    ## debug and research.  Compatibility is not guaranteed. ##
    ###########################################################

    # @ NODE_SCOPE (line: 1, location: (1,0)-(1,11))
    # +- nd_tbl: (empty)
    # +- nd_args:
    # |   (null node)
    # +- nd_body:
    #     @ NODE_FCALL (line: 1, location: (1,0)-(1,11))*
    #     +- nd_mid: :foo
    #     +- nd_args:
    #         @ NODE_LIST (line: 1, location: (1,4)-(1,10))
    #         +- nd_alen: 1
    #         +- nd_head:
    #         |   @ NODE_HASH (line: 1, location: (1,4)-(1,10))
    #         |   +- nd_brace: 1 (hash literal)
    #         |   +- nd_head:
    #         |       @ NODE_LIST (line: 1, location: (1,5)-(1,9))
    #         |       +- nd_alen: 2
    #         |       +- nd_head:
    #         |       |   @ NODE_LIT (line: 1, location: (1,5)-(1,7))
    #         |       |   +- nd_lit: :x
    #         |       +- nd_head:
    #         |       |   @ NODE_LIT (line: 1, location: (1,8)-(1,9))
    #         |       |   +- nd_lit: 0
    #         |       +- nd_next:
    #         |           (null node)
    #         +- nd_next:
    #             (null node)

with this (keyword args, doesn't mention curly braces):

    ❯ ruby --dump=parsetree -e 'foo(x: 0)'
    ###########################################################
    ## Do NOT use this node dump for any purpose other than  ##
    ## debug and research.  Compatibility is not guaranteed. ##
    ###########################################################

    # @ NODE_SCOPE (line: 1, location: (1,0)-(1,9))
    # +- nd_tbl: (empty)
    # +- nd_args:
    # |   (null node)
    # +- nd_body:
    #     @ NODE_FCALL (line: 1, location: (1,0)-(1,9))*
    #     +- nd_mid: :foo
    #     +- nd_args:
    #         @ NODE_LIST (line: 1, location: (1,4)-(1,8))
    #         +- nd_alen: 1
    #         +- nd_head:
    #         |   @ NODE_HASH (line: 1, location: (1,4)-(1,8))
    #         |   +- nd_brace: 0 (keyword argument)
    #         |   +- nd_head:
    #         |       @ NODE_LIST (line: 1, location: (1,4)-(1,8))
    #         |       +- nd_alen: 2
    #         |       +- nd_head:
    #         |       |   @ NODE_LIT (line: 1, location: (1,4)-(1,6))
    #         |       |   +- nd_lit: :x
    #         |       +- nd_head:
    #         |       |   @ NODE_LIT (line: 1, location: (1,7)-(1,8))
    #         |       |   +- nd_lit: 0
    #         |       +- nd_next:
    #         |           (null node)
    #         +- nd_next:
    #             (null node)

Specifically, look for the `nd_brace` field on `NODE_HASH`.

* Update parse tree test output for Hash node changes

* Add a test for various kwargs parse trees

Co-authored-by: Trevor Elliott <awesomelyawesome@gmail.com>

0.5.5918.20200923165607-9f708e9d5

Toggle 0.5.5918.20200923165607-9f708e9d5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix master (sorbet#3450)

0.5.5917.20200923114640-a7a412fbd

Toggle 0.5.5917.20200923114640-a7a412fbd's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix crash when escaping JSON strings with UTF-8 characters (sorbet#3447)

Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>

0.5.5916.20200922095213-2f624af4c

Toggle 0.5.5916.20200922095213-2f624af4c's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Split metrics for modules and classes count (sorbet#3441)

Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>

0.5.5915.20200921143941-4b7905872

Toggle 0.5.5915.20200921143941-4b7905872's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Penelope add exception base (sorbet#3442)

* Add Exception as a possible argument to Exception's constructor.

This is to allow wrapping exceptions to be typed:

```
(penelope-add-exception-base)$ irb
irb(main):001:0> e = RuntimeError.new
=> #<RuntimeError: RuntimeError>
irb(main):002:0> Exception.new(e)
=> #<Exception: RuntimeError>
irb(main):003:0>
```

* add a test

0.5.5914.20200921122923-d7e530041

Toggle 0.5.5914.20200921122923-d7e530041's commit message
CAFC

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix wrong signature for `StringScanner#scan`. (sorbet#3438)

0.5.5913.20200917163821-95aa05408

Toggle 0.5.5913.20200917163821-95aa05408's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix easy Lint and Performance Rubocop TODOs (sorbet#3433)

* rubocop_todo: Lint/BinaryOperatorWithIdenticalOperands

* rubocop_todo: Lint/BooleanSymbol

* rubocop_todo: Lint/MissingSuper

* rubocop_todo: Lint/SafeNavigationChain

* rubocop_todo: Lint/UnusedBlockArgument

* rubocop_todo: Lint/UselessAssignment

* rubocop_todo: Lint/UselessMethodDefinition

* rubocop_todo: Performance/CollectionLiteralInLoop

* rubocop_todo: Performance/RegexpMatch

* rubocop_todo: Performance/StringInclude

0.5.5912.20200916141246-13faee465

Toggle 0.5.5912.20200916141246-13faee465's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Remove the big lub test. (sorbet#3430)

It's too slow.

0.5.5911.20200915132939-161f06ec5

Toggle 0.5.5911.20200915132939-161f06ec5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Fix `hidden-methods` failure in Ruby 2.7 (sorbet#3422)

Resolves sorbet#2771

Due to the way argument forwarding is implemented in Ruby 2.7, at
runtime Sorbet will see parameter names for the expanded method
parameters that are invalid. This causes a failure in the hidden methods
generation process since the output ends up being an invalid RBI file.

The fix is to sanitize the parameter names to be valid unique names so
that we still capture the runtime method signature but also have valid
parameter names as well.
0