Send a pull request to GitHub

First, refer to the previous "Trying Cocoa from Ruby". https://qiita.com/KoichiroEto/items/3e408e1420171f97fe61

Contents to be corrected

When I run it, I get a warning.

% ruby test1.rb /usr/local/lib/ruby/gems/2.7.0/gems/cocoa-0.1.6/lib/cocoa/objc/method_def.rb:154: warning: constant ::Fixnum is deprecated /usr/local/lib/ruby/gems/2.7.0/gems/cocoa-0.1.6/lib/cocoa/objc/method_def.rb:154: warning: constant ::Fixnum is deprecated /usr/local/lib/ruby/gems/2.7.0/gems/cocoa-0.1.6/lib/cocoa/objc/method_def.rb:154: warning: constant ::Bignum is deprecated

If you change Fixnum and Bignum to Integer as shown below, no warning will be issued.

% cd /usr/local/lib/ruby/gems/2.7.0/gems/cocoa-0.1.6/lib/cocoa/objc
% cp method_def.rb method_def.rb.org
% vi method_def.rb
% diff method_def.rb.org method_def.rb
154c154
<         when Fixnum, Bignum
---
>         when Integer

reference:

Creating a pull request

It's a big deal, so let's pull it.

1. Fork

--Display https://github.com/patrickhno/cocoa/. --Fork → eto on the upper right. --Then, https://github.com/eto/cocoa will be created.

2. clone

% cd ~/dev % git clone https://github.com/eto/cocoa.git % cd cocoa % git status On branch master Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

3. Cut the branch

% git checkout -b develop Switched to a new branch 'develop'

4. Correct

% cd lib/cocoa/objc % vi method_def.rb

Check for corrections.

% git diff diff --git a/lib/cocoa/objc/method_def.rb b/lib/cocoa/objc/method_def.rb index c588790..21779ba 100644 --- a/lib/cocoa/objc/method_def.rb +++ b/lib/cocoa/objc/method_def.rb @@ -177,7 +177,7 @@ module ObjC case value when TrueClass, FalseClass [:bool,value]

  •    when Fixnum, Bignum
    
  •    when Integer
         [TYPES[types[i]],value]
       when Float
         [:double,value]
    

5. push

% git add method_def.rb % git commit -m "Fix 'warning: constant ::Fixnum, Bignum is deprecated'." [master fdfaa0e] Fix 'warning: constant ::Fixnum, Bignum is deprecated'. 1 file changed, 1 insertion(+), 1 deletion(-)

% git push origin develop Enumerating objects: 11, done. Counting objects: 100% (11/11), done. Delta compression using up to 8 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (6/6), 526 bytes | 526.00 KiB/s, done. Total 6 (delta 3), reused 0 (delta 0) remote: Resolving deltas: 100% (3/3), completed with 3 local objects. remote: remote: Create a pull request for 'develop' on GitHub by visiting: remote: https://github.com/eto/cocoa/pull/new/develop remote: To https://github.com/eto/cocoa.git

  • [new branch] develop -> develop

6. Make a Pull Request

--Display https://github.com/eto/cocoa. --Go to "master" and select "develop". --https://github.com/eto/cocoa/blob/develop/lib/cocoa/objc/method_def.rb → Line 180 has been corrected. --Press "Pull request" to the right of "This branch is 1 commit ahead of patrickhno: master." --Leave a comment in "Leave a comment".

This pull request fixes the following warnings.
> /usr/local/lib/ruby/gems/2.7.0/gems/cocoa-0.1.6/lib/cocoa/objc/method_def.rb:154: warning: constant ::Fixnum is deprecated
> /usr/local/lib/ruby/gems/2.7.0/gems/cocoa-0.1.6/lib/cocoa/objc/method_def.rb:154: warning: constant ::Fixnum is deprecated
> /usr/local/lib/ruby/gems/2.7.0/gems/cocoa-0.1.6/lib/cocoa/objc/method_def.rb:154: warning: constant ::Bignum is deprecated

--Press "Create pull request". --Transition to the following page. You have now created a pull request. https://github.com/patrickhno/cocoa/pull/6

done!

Recommended Posts

Send a pull request to GitHub
[Swift] How to send a notification
Send a request to the backend after authenticating with Spring Cloud Gateway
A story about sending a pull request to MinGW to update the libgr version
Send me a roadmap to becoming a full-fledged Java engineer
[Java] How to get a request by HTTP communication
GitHub as a storage
Send a command to Spigot from an external process
How to request a CSV file as JSON with jMeter
[Personal notes] How to push a Docker image to GitHub Packages
How to leave a comment
Pass a variable to Scope.
Until you push to Github
GitHub Actions Introduction to self-made actions
To write a user-oriented program (1)
How to insert a video
Response to Github vulnerability alerts
How to create a method
Things to forget when intercepting a request with Android's WebView # shouldInterceptRequest
When you receive a call, send an SMS to that number