-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into ha/allow-multiple…
…-irbrb-files
- Loading branch information
Showing
68 changed files
with
1,280 additions
and
592 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
AllCops: | ||
TargetRubyVersion: 3.0 | ||
DisabledByDefault: true | ||
SuggestExtensions: false | ||
|
||
Layout/TrailingWhitespace: | ||
Enabled: true | ||
|
||
Layout/TrailingEmptyLines: | ||
Enabled: true | ||
|
||
Layout/IndentationConsistency: | ||
Enabled: true | ||
|
||
Layout/CaseIndentation: | ||
Enabled: true | ||
EnforcedStyle: end | ||
|
||
Layout/CommentIndentation: | ||
Enabled: true | ||
|
||
Layout/IndentationStyle: | ||
Enabled: true | ||
|
||
Layout/SpaceAroundKeyword: | ||
Enabled: true | ||
|
||
Layout/SpaceBeforeComma: | ||
Enabled: true | ||
|
||
Layout/SpaceAfterComma: | ||
Enabled: true |
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,4 @@ | ||
# frozen_string_literal: false | ||
# | ||
# nop.rb - | ||
# by Keiju ISHITSUKA(keiju@ruby-lang.org) | ||
# | ||
# frozen_string_literal: true | ||
|
||
module IRB | ||
# :stopdoc: | ||
|
||
module ExtendCommand | ||
class CommandArgumentError < StandardError; end | ||
|
||
class Nop | ||
class << self | ||
def category(category = nil) | ||
@category = category if category | ||
@category | ||
end | ||
|
||
def description(description = nil) | ||
@description = description if description | ||
@description | ||
end | ||
|
||
private | ||
|
||
def string_literal?(args) | ||
sexp = Ripper.sexp(args) | ||
sexp && sexp.size == 2 && sexp.last&.first&.first == :string_literal | ||
end | ||
end | ||
|
||
def self.execute(irb_context, *opts, **kwargs, &block) | ||
command = new(irb_context) | ||
command.execute(*opts, **kwargs, &block) | ||
rescue CommandArgumentError => e | ||
puts e.message | ||
end | ||
|
||
def initialize(irb_context) | ||
@irb_context = irb_context | ||
end | ||
|
||
attr_reader :irb_context | ||
|
||
def execute(*opts) | ||
#nop | ||
end | ||
end | ||
end | ||
|
||
# :startdoc: | ||
end | ||
# This file is just a placeholder for backward-compatibility. | ||
# Please require 'irb' and inheirt your command from `IRB::Command::Base` instead. |
Oops, something went wrong.