Bug 1420889 - Suppress deprecated Fixnum warnings
Summary: Suppress deprecated Fixnum warnings
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-flexmock
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-09 18:56 UTC by Jun Aruga
Modified: 2017-03-17 02:02 UTC (History)
2 users (show)

Fixed In Version: rubygem-flexmock-2.3.5-1.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-17 02:02:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch for suppress warnings and improve tests (3.86 KB, patch)
2017-02-09 18:56 UTC, Jun Aruga
no flags Details | Diff
lint.log (1.48 KB, text/plain)
2017-02-09 18:57 UTC, Jun Aruga
no flags Details
Patch for suppress warnings and improve tests (3.51 KB, patch)
2017-02-10 10:35 UTC, Jun Aruga
no flags Details | Diff
lint.log (1.48 KB, text/plain)
2017-02-10 10:36 UTC, Jun Aruga
no flags Details
Patch for suppress warnings and improve tests (3.51 KB, patch)
2017-02-10 10:49 UTC, Jun Aruga
no flags Details | Diff
Patch for suppress warnings and improve tests 2 (3.51 KB, patch)
2017-02-20 20:56 UTC, Jun Aruga
no flags Details | Diff

Description Jun Aruga 2017-02-09 18:56:45 UTC
Created attachment 1248881 [details]
Patch for suppress warnings and improve tests

Description of problem:

I uploaded a patch to suppress deprecated Fixnum warnings,
and improve tests as the tests file structure are changed from older version of flexmock.

Version-Release number of selected component (if applicable):
rubygem-flexmock-2.3.4-1

I did below tests.

- License check: ok
- rpmlint check: See attachment file lint.log
- Install check: ok

I like it will be merged.

Comment 1 Jun Aruga 2017-02-09 18:57:40 UTC
Created attachment 1248883 [details]
lint.log

Comment 2 Mamoru TASAKA 2017-02-10 00:22:36 UTC
I would appreciate it if you would try to make source compatible before 2.4 and make patches also acceptable by the upstream.

Comment 3 Vít Ondruch 2017-02-10 09:14:07 UTC
@jaruga: May be you did not noticed, but the upstream have changed to:

https://github.com/doudou/flexmock

(apparently due to the fact that the original author passed away)

@mtasaka: It would be probably good idea to update the URLs in the .spec file ...

Comment 4 Jun Aruga 2017-02-10 09:32:54 UTC
Hi,

Oh I thought the upstream URL is https://github.com/jimweirich/flexmock ..
I sent PR yesterday to https://github.com/jimweirich/flexmock/pull/22 ..


OK I will send same kind of PR to https://github.com/doudou/flexmock.

Comment 5 Jun Aruga 2017-02-10 09:45:44 UTC
Comment on attachment 1248881 [details]
Patch for suppress warnings and improve tests

I made mistake. I created the patch from old upstream repo.

Comment 6 Jun Aruga 2017-02-10 10:35:41 UTC
Created attachment 1249019 [details]
Patch for suppress warnings and improve tests

Comment 7 Jun Aruga 2017-02-10 10:36:01 UTC
Created attachment 1249020 [details]
lint.log

Comment 8 Jun Aruga 2017-02-10 10:42:50 UTC
@mtasaka: I uploaded my patch again now, because I mistook the upstream repo to create my patch.

> I would appreciate it if you would try to make source compatible before 2.4 and make patches also acceptable by the upstream.

OK. The patch for upstream is here.
We can wait upstream will accept the patch right now.
https://github.com/doudou/flexmock/pull/5

You can see not only Ruby 2.4, but also all tests before 2.4, were passed.
https://travis-ci.org/doudou/flexmock/builds/200290534

I checked below things.
I also updated LICENSE and URL by following the result of `gem2rpm flexmock-2.3.4.gem`.

- License check:
  License file is not included. Asking here.
  https://github.com/doudou/flexmock/issues/6
- rpmlint check: See attachment file lint.log
- Install check: ok

Thanks.

Comment 9 Jun Aruga 2017-02-10 10:49:42 UTC
Created attachment 1249021 [details]
Patch for suppress warnings and improve tests

Comment 10 Jun Aruga 2017-02-20 20:56:50 UTC
Created attachment 1255870 [details]
Patch for suppress warnings and improve tests 2

Hello mamoru.

My patch was merged at upstream.
https://github.com/doudou/flexmock/pull/5
And I uploaded my patch here again that is improved.
I used `0.class` instead of `Integer`.
It is better for the compatibility under Ruby 2.4.


Ruby 2.4.0

```
$ /usr/local/ruby-2.4.0/bin/irb 
irb(main):001:0> 0.class
=> Integer
```


Less than Ruby 2.4.0

```
$ /usr/local/ruby-2.3.1/bin/irb 
irb(main):001:0> 0.class
=> Fixnum
```

Comment 11 Vít Ondruch 2017-02-21 09:01:17 UTC
(In reply to Vít Ondruch from comment #3)
> @mtasaka: It would be probably good idea to update the URLs in the .spec
> file ...

I was referring not just to URL but also to Source0 ...

Comment 12 Fedora End Of Life 2017-02-28 11:14:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 13 Mamoru TASAKA 2017-03-17 02:02:44 UTC
Committed.
http://pkgs.fedoraproject.org/cgit/rpms/rubygem-flexmock.git/commit/?id=67b33746737e0fc2417de00fc145cbe79b0bc6dc

Note that now test suite warns against minitest:

se assert_nil if expecting nil from /builddir/build/BUILD/rubygem-flexmock-2.3.5/usr/share/gems/gems/flexmock-2.3.5/test/partial_mock_test.rb:142:in `test_original_behavior_can_be_restored'. This will fail in MT6.


Note You need to log in before you can comment on or make changes to this bug.