summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2019-05-02 23:42:18 +0300
committerGitHub <noreply@github.com>2019-05-02 23:42:18 +0300
commit16fd61be2ff344e0105af1764c6e6270bb393755 (patch)
tree7e97b929d030896b7d84d2f01a5d784628f12abf
parented45fb3087029f82d9a93497100b35235dd13335 (diff)
parent61fa19b1f04511173abb70f3d1814f03ed2d6a13 (diff)
downloadpry-16fd61be2ff344e0105af1764c6e6270bb393755.tar.gz
Merge pull request #2026 from pry/2006-show-source-formatting-fix
commands/show_info: fix formatting error for C method header
-rw-r--r--lib/pry/commands/show_info.rb2
-rw-r--r--lib/pry/method.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pry/commands/show_info.rb b/lib/pry/commands/show_info.rb
index a6648393..2f78d0c3 100644
--- a/lib/pry/commands/show_info.rb
+++ b/lib/pry/commands/show_info.rb
@@ -139,7 +139,7 @@ class Pry
def method_header(code_object, line_num)
h = ""
- h << (code_object.c_method? ? "(C Method):" : ":#{line_num}:")
+ h << (code_object.c_method? ? ' (C Method):' : ":#{line_num}:")
h << method_sections(code_object)[:owner]
h << method_sections(code_object)[:visibility]
h << method_sections(code_object)[:signature]
diff --git a/lib/pry/method.rb b/lib/pry/method.rb
index 6ef1535f..3301ae6f 100644
--- a/lib/pry/method.rb
+++ b/lib/pry/method.rb
@@ -514,7 +514,7 @@ class Pry
# @return [YARD::CodeObjects::MethodObject]
# @raise [CommandError] when the method can't be found or `pry-doc` isn't installed.
def pry_doc_info
- if Pry.config.has_pry_doc
+ if defined?(PryDoc)
Pry::MethodInfo.info_for(@method) ||
raise(
CommandError,