[前][次][番号順一覧][スレッド一覧]

ruby-changes:42522

From: hsbt <ko1@a...>
Date: Fri, 15 Apr 2016 19:31:02 +0900 (JST)
Subject: [ruby-changes:42522] hsbt:r54596 (trunk): * lib/irb/ext/save-history.rb: Fix NoMethodError when method is not defined.

hsbt	2016-04-15 20:27:38 +0900 (Fri, 15 Apr 2016)

  New Revision: 54596

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54596

  Log:
    * lib/irb/ext/save-history.rb: Fix NoMethodError when method is not defined.

  Modified files:
    trunk/ChangeLog
    trunk/lib/irb/ext/save-history.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 54595)
+++ ChangeLog	(revision 54596)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 15 20:27:16 2016  SHIBATA Hiroshi  <hsbt@r...>
+
+	* lib/irb/ext/save-history.rb: Fix NoMethodError when method is not defined.
+
 Fri Apr 15 15:38:58 2016  NARUSE, Yui  <naruse@r...>
 
 	* common.mk (benchmark): order options for built-ruby and compare-ruby.
Index: lib/irb/ext/save-history.rb
===================================================================
--- lib/irb/ext/save-history.rb	(revision 54595)
+++ lib/irb/ext/save-history.rb	(revision 54596)
@@ -27,7 +27,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/ext/save-history.rb#L27
       IRB.conf[:SAVE_HISTORY]
     end
 
-    remove_method :save_history=
+    remove_method :save_history= if respond_to?(:save_history=)
     # Sets <code>IRB.conf[:SAVE_HISTORY]</code> to the given +val+ and calls
     # #init_save_history with this context.
     #

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]